[][src]Trait generic_lexer::MatcherFn

pub trait MatcherFn<T> {
    fn try_match(
        &mut self,
        first_char: u8,
        input: &mut LexerInput
    ) -> MatcherResult<T>; }

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(
    &mut self,
    first_char: u8,
    input: &mut LexerInput
) -> MatcherResult<T>

Loading content...

Implementors

impl<T, F> MatcherFn<T> for F where
    F: Fn(u8, &mut LexerInput) -> MatcherResult<T>, 
[src]

Loading content...