Class: Crisp::Nodes::SymbolLiteral
Overview
The symbol node
Instance Method Summary collapse
-
#resolve(env) ⇒ Object
return the value for the key in the env the symbol stays for.
Methods inherited from Primitive
Methods inherited from Base
Instance Method Details
#resolve(env) ⇒ Object
return the value for the key in the env the symbol stays for
6 7 8 9 10 11 12 |
# File 'lib/crisp/nodes/symbol_literal.rb', line 6 def resolve(env) if !env.has_key?(text_value) raise Crisp::EnvironmentError, "#{text_value} is unbound" end env[text_value] end |