From 0c88e7eff569a6c1b0f354418daacb9ad2ac621a Mon Sep 17 00:00:00 2001 From: Torsten Ruger Date: Mon, 14 Jul 2014 18:03:34 +0300 Subject: [PATCH] derive Variable expression from name expression (to avoid the implementation that was there) --- lib/ast/basic_expressions.rb | 3 +++ lib/ast/call_site_expression.rb | 14 +------------- 2 files changed, 4 insertions(+), 13 deletions(-) diff --git a/lib/ast/basic_expressions.rb b/lib/ast/basic_expressions.rb index 05be240..27b82c1 100644 --- a/lib/ast/basic_expressions.rb +++ b/lib/ast/basic_expressions.rb @@ -50,6 +50,9 @@ module Ast end end + class VariableExpression < NameExpression + end + class ModuleName < NameExpression end diff --git a/lib/ast/call_site_expression.rb b/lib/ast/call_site_expression.rb index 90bad5a..5e5102b 100644 --- a/lib/ast/call_site_expression.rb +++ b/lib/ast/call_site_expression.rb @@ -20,17 +20,5 @@ module Ast def attributes [:name , :args , :receiver] 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 \ No newline at end of file