[msl] clean up emitted expressions at the end of a block

This commit is contained in:
Dzmitry Malyshau
2021-03-31 23:18:33 -04:00
committed by Dzmitry Malyshau
parent 62fe72be2e
commit cf3a6da3ce

View File

@@ -969,6 +969,16 @@ impl<W: Write> Writer<W> {
}
}
}
// un-emit expressions
//TODO: take care of loop/continuing?
for statement in statements {
if let crate::Statement::Emit(ref range) = *statement {
for handle in range.clone() {
self.named_expressions.remove(handle.index());
}
}
}
Ok(())
}