fix local assignment
was missing a method that got lost in copy/paste also renaming to get guard to pick up tests
This commit is contained in:
parent
d14eca3e70
commit
f4402ba30f
@ -9,7 +9,7 @@ end
|
||||
|
||||
require_relative "ruby/statement"
|
||||
require_relative "ruby/statements"
|
||||
require_relative "ruby/assignment_statement"
|
||||
require_relative "ruby/assignment"
|
||||
require_relative "ruby/array_statement"
|
||||
require_relative "ruby/block_statement"
|
||||
require_relative "ruby/if_statement"
|
||||
|
@ -39,10 +39,6 @@ module Ruby
|
||||
|
||||
class IvarAssignment < Assignment
|
||||
|
||||
def to_vool()
|
||||
super()
|
||||
return Vool::IvarAssignment.new(@name , @value)
|
||||
end
|
||||
end
|
||||
|
||||
class LocalAssignment < Assignment
|
@ -8,6 +8,11 @@ module Vool
|
||||
from = @value.slot_definition(compiler)
|
||||
return chain_assign( Mom::SlotLoad.new(to,from) , compiler)
|
||||
end
|
||||
|
||||
def chain_assign(assign , compiler)
|
||||
return assign unless @value.is_a?(SendStatement)
|
||||
@value.to_mom(compiler) << assign
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user