expr

Function expr 

Source
pub fn expr(i: &str) -> IResult<&str, Expr, Error<'_>>
Expand description

Top-lever parser for an expression. Expression parsers are layered in order to support operator precedence (see https://en.wikipedia.org/wiki/Operator-precedence_parser).

See https://github.com/biscuit-auth/biscuit/blob/master/SPECIFICATIONS.md#grammar for the precedence order of operators in biscuit datalog.

The operators with the lowest precedence are parsed at the outer level, and their operands delegate to parsers that progressively handle more tightly binding operators.

This level handles the last operator in the precedence list: || || is left associative, so multiple || expressions can be combined: a || b || c <=> (a || b) || c