fix ruby class statement
This commit is contained in:
@ -17,8 +17,8 @@ module Ruby
|
||||
end
|
||||
|
||||
def to_vool
|
||||
meths = body.statements.collect{|meth| meth.normalize}
|
||||
ClassStatement.new(@name , @super_class_name, Statements.new(meths) )
|
||||
meths = body.statements.collect{|meth| meth.to_vool}
|
||||
Vool::ClassStatement.new(@name , @super_class_name, Vool::Statements.new(meths) )
|
||||
end
|
||||
|
||||
def to_s(depth = 0)
|
||||
|
@ -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)
|
||||
|
Reference in New Issue
Block a user