derive Variable expression from name expression (to avoid the implementation that was there)
This commit is contained in:
parent
5f1ffee706
commit
0c88e7eff5
@ -50,6 +50,9 @@ module Ast
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
class VariableExpression < NameExpression
|
||||||
|
end
|
||||||
|
|
||||||
class ModuleName < NameExpression
|
class ModuleName < NameExpression
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -20,17 +20,5 @@ module Ast
|
|||||||
def attributes
|
def attributes
|
||||||
[:name , :args , :receiver]
|
[:name , :args , :receiver]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
class VariableExpression < CallSiteExpression
|
|
||||||
|
|
||||||
def initialize name
|
|
||||||
super( :_get_instance_variable , [StringExpression.new(name)] )
|
|
||||||
end
|
|
||||||
def inspect
|
|
||||||
self.class.name + ".new(" + args[0].string.inspect + ")"
|
|
||||||
end
|
|
||||||
|
|
||||||
end
|
|
||||||
|
|
||||||
end
|
end
|
Loading…
x
Reference in New Issue
Block a user