popToRoot method
void
popToRoot()
Pops all contexts above the root, returning to interactive mode.
Useful for error recovery - unwinding the entire stack.
Implementation
void popToRoot() {
while (_stack.length > 1) {
_stack.removeLast();
}
}