(
expr: rq::Expr,
is_left: bool,
parent_strength: i32,
parent_associativity: Associativity,
context: &mut Context,
)
| 968 | } |
| 969 | |
| 970 | pub(super) fn translate_operand( |
| 971 | expr: rq::Expr, |
| 972 | is_left: bool, |
| 973 | parent_strength: i32, |
| 974 | parent_associativity: Associativity, |
| 975 | context: &mut Context, |
| 976 | ) -> Result<ExprOrSource> { |
| 977 | let expr = translate_expr(expr, context)?; |
| 978 | |
| 979 | if needs_parentheses(&expr, is_left, parent_strength, parent_associativity) { |
| 980 | Ok(expr.wrap_in_parenthesis()) |
| 981 | } else { |
| 982 | Ok(expr) |
| 983 | } |
| 984 | } |
| 985 | |
| 986 | /// For an operation represented as `a child b` with a surrounding parent |
| 987 | /// operation (e.g., `(a child b) parent c` or `a parent (b child c)`): |
no test coverage detected