Function combine::not_followed_by[][src]

pub fn not_followed_by<Input, P>(parser: P) -> NotFollowedBy<P> where
    Input: Stream,
    P: Parser<Input>,
    P::Output: Into<Info<<Input as StreamOnce>::Token, <Input as StreamOnce>::Range, &'static str>>, 
Expand description

Succeeds only if parser fails. Never consumes any input.

let result = string("let")
    .skip(not_followed_by(alpha_num()))
    .parse("letx")
    .map(|x| x.0);
assert!(result.is_err());