rubyx/lib/vool/statements/local_statement.rb

20 lines
412 B
Ruby
Raw Normal View History

module Vool
class LocalAssignment < Assignment
# used to collect frame information
def add_local( array )
array << @name
end
def to_mom( method )
2017-04-13 14:14:43 +03:00
if method.args_type.variable_index(@name)
type = :arguments
else
type = :frame
end
2018-03-13 12:30:51 +05:30
@value.slot_class.new(Mom::SlotDefinition.new(:message , [type , @name]) , @value.to_mom(method))
end
end
end