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