rubyx/lib/vm/tree/assignment.rb

14 lines
248 B
Ruby
Raw Normal View History

2017-01-14 18:28:44 +01:00
module Vm
2016-12-09 12:20:48 +01:00
module Tree
class Assignment < Statement
attr_accessor :name , :value
def initialize(n = nil , v = nil )
@name , @value = n , v
end
2016-12-28 13:11:05 +01:00
def to_s
"#{name} = #{value}\n"
end
end
end
end