pushScope method
A reverse linked list implementation where tail points towards head (the parent chain). Calling this function adds a new Scope node in the linked list as the new tail and sets scope to point to the latest tail node. Every node points to its Scope.parent.
If parent is non-null, then the new Scope.parent
will point to it.
Implementation
void pushScope({LuaObject? context, Scope? parent}) {
// scope.dump();
scope = Scope(parent: parent ?? scope, context: context);
// print('scope depth: ${scope.depth}');
}