Macro nom::verify [−][src]
macro_rules! verify { ($i:expr, $submac:ident!( $($args:tt)* ), $g:expr) => { ... }; ($i:expr, $submac:ident!( $($args:tt)* ), $submac2:ident!( $($args2:tt)* )) => { ... }; ($i:expr, $f:expr, $g:expr) => { ... }; ($i:expr, $f:expr, $submac:ident!( $($args:tt)* )) => { ... }; }
verify!(I -> IResult<I, O>, O -> bool) => I -> IResult<I, O>
returns the result of the child parser if it satisfies a verification function
named!(check<u32>, verify!(nom::number::streaming::be_u32, |val: &u32| *val < 3));