Fix bug in optimizer.

This commit is contained in:
Stephen Chung
2021-01-12 23:52:50 +08:00
parent 8c47d61456
commit fe65bf6137
5 changed files with 64 additions and 21 deletions

View File

@@ -1995,7 +1995,14 @@ fn parse_custom_syntax(
}
}
Ok(Expr::Custom(Box::new(CustomExpr { keywords, tokens }), pos))
Ok(Expr::Custom(
Box::new(CustomExpr {
keywords,
tokens,
scope_delta: syntax.scope_delta,
}),
pos,
))
}
/// Parse an expression.