fix(optimizer): process Parenthesized expression

This commit is contained in:
KaguraMilet
2024-12-20 23:11:17 +08:00
parent d5d7185995
commit ef39f11a9f

View File

@@ -881,6 +881,9 @@ fn convert_between_expr(expr: ast::Expr) -> ast::Expr {
)
}
}
ast::Expr::Parenthesized(mut exprs) => {
ast::Expr::Parenthesized(exprs.drain(..).map(convert_between_expr).collect())
}
// Process other expressions recursively
ast::Expr::Binary(lhs, op, rhs) => ast::Expr::Binary(
Box::new(convert_between_expr(*lhs)),