[][src]Trait generic_lexer::Matcher

pub trait Matcher<K> {
    fn try_match(
        &self,
        first_char: char,
        input: &mut LexerInput
    ) -> 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)

Required methods

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

Loading content...

Implementors

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

Loading content...