2017-04-01 20:28:57 +02:00
|
|
|
module Vool
|
|
|
|
class Statements < Statement
|
2017-04-06 15:06:51 +02:00
|
|
|
attr_reader :statements
|
2017-04-02 12:24:09 +02:00
|
|
|
def initialize(statements)
|
|
|
|
@statements = statements
|
|
|
|
end
|
2017-04-02 18:12:42 +02:00
|
|
|
def empty?
|
|
|
|
@statements.empty?
|
|
|
|
end
|
|
|
|
def single?
|
|
|
|
@statements.length == 1
|
|
|
|
end
|
|
|
|
def first
|
|
|
|
@statements.first
|
|
|
|
end
|
2017-04-05 13:03:48 +02:00
|
|
|
def length
|
|
|
|
@statements.length
|
|
|
|
end
|
2017-04-08 11:10:42 +02:00
|
|
|
|
|
|
|
def collect(arr)
|
|
|
|
@statements.each { |s| s.collect(arr) }
|
|
|
|
super
|
|
|
|
end
|
2017-04-09 09:14:28 +02:00
|
|
|
|
|
|
|
def create_objects
|
|
|
|
@statements.each{ |s| s.create_objects }
|
|
|
|
end
|
2017-04-02 12:24:09 +02:00
|
|
|
end
|
|
|
|
|
|
|
|
class ScopeStatement < Statements
|
2017-04-01 20:28:57 +02:00
|
|
|
end
|
|
|
|
end
|