Struct slr_lexer::Lexer
[−]
[src]
pub struct Lexer<'l, 's> where
's: 'l, { pub cur_token: Option<Result<Token<'s>, Error>>, pub next_token: Option<Result<Token<'s>, Error>>, // some fields omitted }
A type handling the lexing.
Fields
cur_token: Option<Result<Token<'s>, Error>>
next_token: Option<Result<Token<'s>, Error>>
Methods
impl<'l, 's> Lexer<'l, 's>
[src]
fn new(source: &'l mut Source<'s>) -> Lexer<'l, 's>
Creates a new lexer from a source. The source will be reset by this operation, and must not be used with any spans created from a previous lexing done with that source.