fix ruby class statement

This commit is contained in:
Torsten Ruger
2018-07-19 21:44:48 +03:00
parent 238f09b5ad
commit a5168ef818
3 changed files with 28 additions and 18 deletions

View File

@ -28,20 +28,12 @@ module Ruby
self
end
# create mom instructions
def to_mom( compiler )
raise "Empty list ? #{statements.length}" if empty?
stats = @statements.dup
flat = stats.shift.to_mom(compiler)
while( nekst = stats.shift )
flat.append nekst.to_mom(compiler)
def to_vool
if( single? )
first.to_vool
else
vool_brother.new(@statements.collect{|s| s.to_vool})
end
flat
end
def each(&block)
block.call(self)
@statements.each{|a| a.each(&block)}
end
def to_s(depth = 0)