pub trait Lexer<AT: Default> {
// Required method
fn nextsym(&mut self) -> Option<Lextoken<AT>>;
// Provided methods
fn linenum(&self) -> usize { ... }
fn column(&self) -> usize { ... }
fn current_line(&self) -> &str { ... }
}
Expand description
This trait is deprecated by Tokenizer and is only
available with the legacy-parser
installation feature.
Required Methods§
Provided Methods§
Sourcefn linenum(&self) -> usize
fn linenum(&self) -> usize
returns the current line number. The default implementation returns 0.
Sourcefn column(&self) -> usize
fn column(&self) -> usize
returns the current column (character position) on the current line. The default implementation returns 0;
Sourcefn current_line(&self) -> &str
fn current_line(&self) -> &str
returns the current line being tokenized. The default implementation returns the empty string.