pop method
Pops the current context and returns to the parent.
Returns the popped context.
Throws StateError if attempting to pop the root context.
Implementation
ExecutionContext pop() {
if (_stack.length <= 1) {
throw StateD4rtException('Cannot pop the root execution context');
}
return _stack.removeLast();
}