fixes the tests after fixing hierarchy

This commit is contained in:
Torsten Ruger
2014-07-15 10:35:29 +03:00
parent 49f73c090d
commit 930740e1db
11 changed files with 79 additions and 25 deletions

View File

@ -34,7 +34,7 @@ module Ast
# otherwise it's a method without args and a send is ussued.
# this makes the namespace static, ie when eval and co are implemented method needs recompilation
def compile frame , method
return Virtual::SelfReference.new() if name == :self
return Virtual::Self.new( Virtual::Mystery.new ) if name == :self
if method.has_var(name)
frame.compile_get(method , name )
else
@ -75,6 +75,7 @@ module Ast
class VariableExpression < NameExpression
def compile frame ,method
method.add Virtual::ObjectGet.new(name)
Virtual::Return.new( Virtual::Mystery.new )
end
end
end