class EleetScript::SetLocalNode

Public Instance Methods

eval(context) click to toggle source
# File lib/lang/interpreter.rb, line 178
def eval(context)
  if Lexer::RESERVED_WORDS.include?(name)
    Helpers.throw_eleet_error(context, "Cannot assign a value to reserved word \"#{name}\"")
  else
    context.local_var(name, value.eval(context))
  end
end