pub fn unary_op<I, O, E, P, Q>(
precedence: Q,
parser: P,
) -> impl FnMut(I) -> IResult<I, Unary<O, Q>, E>
Expand description
Runs the inner parser and transforms the result into an unary operator with the given precedence.
Intended for use with precedence.
§Arguments
precedence
The precedence of the operator.parser
The parser to apply.