Class: Pione::Lang::VariableTable

Inherits:
DelegatableTable show all
Defined in:
lib/pione/lang/environment.rb

Overview

VariableTable is a table for recording variables and values.

Instance Method Summary collapse

Methods inherited from DelegatableTable

#bound?, #dumpable, #get, #get!, #get_value, #initialize, #inspect, #keys, #select_names_by, #set, #set!

Constructor Details

This class inherits a constructor from Pione::Lang::DelegatableTable

Instance Method Details

#evaluate_value(env, expr) ⇒ Object

Evaluate table value simply.



129
130
131
# File 'lib/pione/lang/environment.rb', line 129

def evaluate_value(env, expr)
  expr.eval(env)
end

#make_reference(package_id, name) ⇒ Object

Make a variable as a reference.



134
135
136
# File 'lib/pione/lang/environment.rb', line 134

def make_reference(package_id, name)
  Variable.new(name, package_id)
end