2017-04-01 20:28:57 +02:00
|
|
|
module Vool
|
|
|
|
class Statements < Statement
|
2017-09-06 11:33:46 +02:00
|
|
|
include Common::Statements
|
2017-04-12 10:52:23 +02:00
|
|
|
|
|
|
|
# create machine instructions
|
|
|
|
def to_mom( method )
|
2018-03-15 16:03:38 +01:00
|
|
|
raise "Empty list ? #{statements.length}" unless @statements[0]
|
|
|
|
flat = @statements.shift.to_mom(method)
|
|
|
|
while( nekst = @statements.shift )
|
|
|
|
flat.append nekst.to_mom(method)
|
|
|
|
end
|
|
|
|
flat
|
2017-04-08 11:10:42 +02:00
|
|
|
end
|
2017-04-09 09:14:28 +02:00
|
|
|
|
|
|
|
def create_objects
|
|
|
|
@statements.each{ |s| s.create_objects }
|
|
|
|
end
|
2018-03-10 14:31:38 +01:00
|
|
|
|
2018-03-15 12:52:56 +01:00
|
|
|
def each(&block)
|
|
|
|
block.call(self)
|
|
|
|
@statements.each{|a| a.each(block)}
|
|
|
|
end
|
|
|
|
|
2017-04-02 12:24:09 +02:00
|
|
|
end
|
|
|
|
|
|
|
|
class ScopeStatement < Statements
|
2017-04-01 20:28:57 +02:00
|
|
|
end
|
|
|
|
end
|