Macro abortable_parser::not [−][src]
macro_rules! not {
($i : expr, $f : ident! ($($args : tt) *)) => { ... };
($i : expr, $f : ident($($args : tt) *)) => { ... };
($i : expr, $f : ident) => { ... };
}
Expand description
Turns a matcher into it’s inverse, only succeeding if the the matcher returns a Fail. Does not consume it’s input and only returns ().
let tok = not!(iter, text_token!("bar"));
assert!(tok.is_complete());
if let Result::Complete(i, o) = tok {
assert_eq!(i.get_offset(), 0);
assert_eq!(o, ());
}