pub struct StackedLexer<T> { /* private fields */ }
Expand description
A lexer chaining the tokens of multiple other lexers after another. Lexers can be pushed onto an internal stack and will then be queried for tokens until their respective Eof has been reached. At that point, the lexer is popped off the stack and the next lexer’s tokens are produced. An Eof is returned once all lexers have been drained.
Implementations§
Source§impl<T> StackedLexer<T>
impl<T> StackedLexer<T>
Trait Implementations§
Source§impl<T: Clone + PartialEq> Lexer<T> for StackedLexer<T>
impl<T: Clone + PartialEq> Lexer<T> for StackedLexer<T>
fn next_token<'td>(&mut self) -> DiagResult<'td, T>
Auto Trait Implementations§
impl<T> Freeze for StackedLexer<T>where
T: Freeze,
impl<T> !RefUnwindSafe for StackedLexer<T>
impl<T> !Send for StackedLexer<T>
impl<T> !Sync for StackedLexer<T>
impl<T> Unpin for StackedLexer<T>where
T: Unpin,
impl<T> !UnwindSafe for StackedLexer<T>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more