Trait kconfig_parser::lex::traits::LexerBase
source · pub trait LexerBase {
fn next_token(&mut self) -> Token;
fn current_stream(&self) -> Option<String> { ... }
}
Expand description
Every lexer implements LexerBase and next_token allows to move to the next token of a given stream, until the end has been reached.
Required Methods
sourcefn next_token(&mut self) -> Token
fn next_token(&mut self) -> Token
Goes forward to the next token in the stream, if available.
Provided Methods
sourcefn current_stream(&self) -> Option<String>
fn current_stream(&self) -> Option<String>
Returns the current stream’s name, if any (for example, the normal lexer does know this value)