rubyx/lib/vool/ivar_assignment.rb
Torsten Rüger c213cf874b Fix ruby normalising to_vool
So that vool layer never has complex conditions or returns
Start with while, next if, return and assign
2019-08-16 14:20:06 +03:00

17 lines
338 B
Ruby

module Vool
class IvarAssignment < Assignment
def to_s(depth = 0)
"@#{super(depth)}"
end
def to_mom( compiler )
to = Mom::SlotDefinition.new(:message ,[ :receiver , @name])
from = @value.slot_definition(compiler)
return chain_assign( Mom::SlotLoad.new(self,to,from) , compiler)
end
end
end