Struct kconfig_parser::lex::lexer::Lexer
source · pub struct Lexer<T>where
T: Read,{ /* private fields */ }
Expand description
This structure holds the data of the actual lexer. It is expected
that this structure can be mutated by the next_token
function,
which advances to the next token, and returns the term found by
the lexer.
Implementations
Trait Implementations
sourceimpl<T: Read> LexerBase for Lexer<T>
impl<T: Read> LexerBase for Lexer<T>
sourcefn next_token(&mut self) -> Token
fn next_token(&mut self) -> Token
Finds the next token in a mutable self. If the next token can be found, returns it into Token. If the file or stream of data is found, the special term EOT is returned. If an error occurred of some sort, the special term Error is returned.
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) Read more
Auto Trait Implementations
impl<T> RefUnwindSafe for Lexer<T>where
T: RefUnwindSafe,
impl<T> Send for Lexer<T>where
T: Send,
impl<T> Sync for Lexer<T>where
T: Sync,
impl<T> Unpin for Lexer<T>where
T: Unpin,
impl<T> UnwindSafe for Lexer<T>where
T: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more