macro_rules! parser_with_context { ($name:ident,$inp:ident,$context:ident,$fnbody:block) => { pub fn $name<'c, I: Clone, O, E: nom::error::ParseError>( $context: &mut NomContext<'c, I, O, E>, ) -> impl for<'a> FnMut(I) -> IResult + 'c { |$inp: I| $fnbody } }; } pub(crate) use parser_with_context;