getGlobalValue method

Value? getGlobalValue(
  1. String varName
)

Get a value from the global namespace of this interpreter.

Implementation

Value? getGlobalValue(String varName) {
  if (vm == null) return null;
  tac.Context c = vm!.globalContext!;
  try {
    return c.getVar(varName);
  } on UndefinedIdentifierException {
    return null;
  }
}