findVar method

LuaObject? findVar(
  1. String id
)

Implementation

LuaObject? findVar(String id) {
  Scope? next = this;
  while (next != null) {
    if (next.vars.containsKey(id)) {
      return next.vars[id]!;
    }

    next = next.parent;
  }

  // Not found
  return null;
}