5fe0ba06ab
moving on to getting mom to work and can’t have both interpreter and elf broke, about 100 tests went
31 lines
460 B
Ruby
31 lines
460 B
Ruby
module Vm
|
|
module Tree
|
|
|
|
class Assignment < Statement
|
|
attr_accessor :name , :value
|
|
|
|
def initialize(name , value = nil )
|
|
@name , @value = name , value
|
|
end
|
|
|
|
def to_s
|
|
"#{name} = #{value}\n"
|
|
end
|
|
|
|
end
|
|
|
|
class IvarAssignment < Assignment
|
|
def to_s
|
|
"@#{name} = #{value}\n"
|
|
end
|
|
end
|
|
|
|
class ArgAssignment < Assignment
|
|
end
|
|
|
|
class LocalAssignment < Assignment
|
|
end
|
|
|
|
end
|
|
end
|