From ef39f11a9fcde3c5ddc6629e39a4782aa08a8250 Mon Sep 17 00:00:00 2001 From: KaguraMilet Date: Fri, 20 Dec 2024 23:11:17 +0800 Subject: [PATCH] fix(optimizer): process `Parenthesized` expression --- core/translate/optimizer.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/core/translate/optimizer.rs b/core/translate/optimizer.rs index 962e2ea80..443448860 100644 --- a/core/translate/optimizer.rs +++ b/core/translate/optimizer.rs @@ -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)),