pub fn binary_op<I, O, E, P, Q>(
precedence: Q,
assoc: Assoc,
parser: P,
) -> impl FnMut(I) -> IResult<I, Binary<O, Q>, E>
Expand description
Runs the inner parser and transforms the result into a binary operator with the given precedence and associativity.
Intended for use with precedence.
§Arguments
precedence
The precedence of the operator.assoc
The associativity of the operator.parser
The parser to apply.