Function parsimonious::token [] [src]

pub fn token<F>(f: F) -> TokenParser<F>

A parser that reads one token.

The parser token(f) reads one token tok from the input, if f(tok) is true then it commits and the result is tok, otherwise it backtracks.