get method

Object? get(
  1. Token name
)

Implementation

Object? get(Token name) {
  if (values.containsKey(name.lexeme)) {
    return values[name.lexeme];
  }
  if (enclosing != null) {
    return enclosing!.get(name);
  }

  throw RuntimeError(name, "Undefined variable '${name.lexeme}'.");
}