Function combine::token[][src]

pub fn token<Input>(c: Input::Token) -> Token<Input> where
    Input: Stream,
    Input::Token: PartialEq
Expand description

Parses a character and succeeds if the character is equal to c.

let result = token('!')
    .parse("!")
    .map(|x| x.0);
assert_eq!(result, Ok('!'));