No need to specify number of variables added/removed for custom syntax.

This commit is contained in:
Stephen Chung
2021-05-11 10:58:28 +08:00
parent 3a47ed7c46
commit 97c8194d17
6 changed files with 56 additions and 41 deletions

View File

@@ -1024,7 +1024,7 @@ fn optimize_expr(expr: &mut Expr, state: &mut State) {
// Custom syntax
Expr::Custom(x, _) => {
if x.scope_delta != 0 {
if x.scope_changed {
state.propagate_constants = false;
}
x.keywords.iter_mut().for_each(|expr| optimize_expr(expr, state));