Skip to main content

binding_power

Function binding_power 

Source
pub fn binding_power(op: BinOpKind) -> (u8, u8)
Expand description

The binding powers (left, right) of a binary operator: the one precedence table of the language (polydat_grammar.md §6.1), whose levels parse_expr_bp lists. Expressions and comprehension where predicates (crate::comprehension::predicate) both parse with it. A higher power binds tighter; left < right associates to the left and left > right to the right. The unary operators - and ! bind tighter than every binary operator: each applies to the atom after it.