Skip to main content

prefix_operand_needs_parens

Function prefix_operand_needs_parens 

Source
pub fn prefix_operand_needs_parens<T>(op: &Op, operand: &Expr<T>) -> bool
where T: AstInfo,
Expand description

Whether the operand of a prefix operator (an Op with no second operand) must be parenthesized so the printed expression reparses to the same tree. Both printers (AstDisplay and mz-sql-pretty) must use it, so they agree.