pushScope method

void pushScope({
  1. LuaObject? context,
})
inherited

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.

Implementation

void pushScope({LuaObject? context}) {
  // scope.dump();
  scope = Scope(parent: scope, context: context);
  // print('scope depth: ${scope.depth}');
}