partialReset method
void
partialReset()
Partially reset, abandoning backpatches, but keeping already- compiled code. This would be used in a REPL, when the user may want to reset and continue after a botched loop or function.
Implementation
void partialReset() {
outputStack ??= [];
while (outputStack!.length > 1) {
outputStack!.removeLast();
}
output = outputStack!.last;
output?.backpatches.clear();
output?.jumpPoints.clear();
output?.nextTempNum = 0;
partialInput = null;
pendingState = null;
}