Trait parce::lexer::Lexer[][src]

pub trait Lexer: Display + Debug {
    type Lexemes: Eq + Copy + Debug;
    fn lex(self, s: &str) -> Result<Vec<Lexeme<Self::Lexemes>>, ParceError>;
}
Expand description

Enables lexing a string into a vector of lexemes. The parce_macros::lexer attribute macro generates impls of this trait.

Associated Types

The enum type that the parce_macros::lexer attribute macro was applied to. These are wrapped in the Lexeme type in the output.

Required methods

Lexes an input string into a vector of lexemes.

Implementors