Fix some minor things required for unittest

This commit is contained in:
Noah 2020-08-12 16:03:20 -05:00
parent d8c8b11726
commit 7f0798b235

View file

@ -479,7 +479,9 @@ impl<O: OutputStream> Compiler<O> {
self.compile_statements(body)?; self.compile_statements(body)?;
for end_label in end_labels { // sort of "stack up" the layers of with blocks:
// with a, b: body -> start_with(a) start_with(b) body() end_with(b) end_with(a)
for end_label in end_labels.into_iter().rev() {
self.emit(Instruction::PopBlock); self.emit(Instruction::PopBlock);
self.emit(Instruction::EnterFinally); self.emit(Instruction::EnterFinally);
self.set_label(end_label); self.set_label(end_label);