adds variable, something compliles , but...
This commit is contained in:
@ -23,6 +23,11 @@ module Ast
|
||||
def initialize name
|
||||
@name = name
|
||||
end
|
||||
def compile context
|
||||
variable = Vm::Variable.new(@name)
|
||||
context.locals[@name] = variable
|
||||
variable
|
||||
end
|
||||
def inspect
|
||||
self.class.name + ".new(" + name + ")"
|
||||
end
|
||||
|
Reference in New Issue
Block a user