Fix some minor things required for unittest

This commit is contained in:
Noah 2020-08-12 16:03:20 -05:00 committed by Jeong YunWon
parent f9fe1c0423
commit a251109090

View file

@ -479,7 +479,9 @@ impl<O: OutputStream> Compiler<O> {
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::EnterFinally);
self.set_label(end_label);