[][src]Trait generic_lexer::Matcher

pub trait Matcher<K> {
    fn try_match(
        &self,
        first_char: char,
        input: &mut BufferedInput
    ) -> MatchResult<K>; }

A matcher fn matches a character (and and any following characters) and returns a T to indicate the kind of token (see Token)

input is always fresh (i.e. its buffer is empty)

Required methods

fn try_match(
    &self,
    first_char: char,
    input: &mut BufferedInput
) -> MatchResult<K>

Loading content...

Implementors

impl<F, K> Matcher<K> for F where
    F: Fn(char, &mut BufferedInput) -> MatchResult<K>, 
[src]

Loading content...