Struct BasicTokenSource
pub struct BasicTokenSource<'a> { /* private fields */ }Expand description
A TokenSource over the shared BasicLexer — the analogue of the
Lark test classes’ BasicLexer(copy(lexer_conf)) wrapper
(CustomLexerNew), and the building block the
conformance custom-lexer port drives. Owns its cursor (LexerState);
ignores the parser-state key like Lark’s BasicLexer.next_token.
Implementations§
§impl<'a> BasicTokenSource<'a>
impl<'a> BasicTokenSource<'a>
pub fn new(lexer: &'a BasicLexer, text: &'a str) -> Self
Trait Implementations§
§impl TokenSource for BasicTokenSource<'_>
impl TokenSource for BasicTokenSource<'_>
fn next_token( &mut self, _parser_state: Option<usize>, _expects: Option<&[u32]>, ) -> Result<Option<CustomToken>, CustomLexError>
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for BasicTokenSource<'a>
impl<'a> !UnwindSafe for BasicTokenSource<'a>
impl<'a> Freeze for BasicTokenSource<'a>
impl<'a> Send for BasicTokenSource<'a>
impl<'a> Sync for BasicTokenSource<'a>
impl<'a> Unpin for BasicTokenSource<'a>
impl<'a> UnsafeUnpin for BasicTokenSource<'a>
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