macro_rules! parser_with_context { ($name:ident,$typ:ty,$inp:ident,$context:ident,$fnbody:block) => { pub fn $name>( $context: &mut NomContext, ) -> impl for<'a> FnMut(&'a str) -> IResult<&'a str, $typ, VerboseError<&'a str>> { |$inp: &str| $fnbody } }; } pub(crate) use parser_with_context;