Skip to content

Commit

Permalink
fix(optimizer): process Parenthesized expression
Browse files Browse the repository at this point in the history
  • Loading branch information
KaguraMilet committed Dec 20, 2024
1 parent d5d7185 commit ef39f11
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions core/translate/optimizer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)),
Expand Down

0 comments on commit ef39f11

Please sign in to comment.