Class: Plasma::Interpreter::SymNode

Inherits:
PlasmaNode show all
Defined in:
lib/plasma/interpreter/plasma_grammarnode.rb

Instance Method Summary collapse

Methods inherited from PlasmaNode

#empty?

Instance Method Details

#evaluate(env) ⇒ Object

Raises:



322
323
324
325
326
# File 'lib/plasma/interpreter/plasma_grammarnode.rb', line 322

def evaluate(env)
  result = env.resolve(self.text_value.to_sym)
  raise UnresolvedSymbolException.new(self.text_value), "unresolved symbol #{self.text_value}", caller if result.nil?
  result
end