Function rusticata_macros::combinator::cond_else
source · [−]pub fn cond_else<I, O, E: ParseError<I>, C, F, G>(
cond: C,
first: F,
second: G
) -> impl FnMut(I) -> IResult<I, O, E> where
C: Fn() -> bool,
F: Parser<I, O, E>,
G: Parser<I, O, E>,
Expand description
Helper macro for nom parsers: run first parser if condition is true, else second parser