operator [] method

num operator [](
  1. String variableName
)

Get the variable value

Throws UndefinedVariableException if variable is not set

Implementation

num operator [](String variableName) {
  final v = _values[variableName];
  if (v is num) {
    return v;
  } else {
    throw UndefinedVariableException(variableName);
  }
}