rubyx/lib/vool/statements/local_statement.rb

20 lines
397 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 13:14:43 +02:00
if method.args_type.variable_index(@name)
type = :arguments
else
type = :frame
end
2017-09-04 20:31:49 +02:00
Mom::SlotConstant.new(Mom::SlotDefinition.new(:message , [type , @name]) , @value)
end
end
end