pub struct BasicParser<T>{ /* private fields */ }Implementations§
Source§impl<T> BasicParser<T>
impl<T> BasicParser<T>
Sourcepub fn new(input: Lexer<T>) -> BasicParser<T>
pub fn new(input: Lexer<T>) -> BasicParser<T>
Create a new parser which consumes input from the given lexer.
Trait Implementations§
Source§impl<T> TokenStream<Token> for BasicParser<T>
impl<T> TokenStream<Token> for BasicParser<T>
Source§fn consumed(&self) -> usize
fn consumed(&self) -> usize
Get the number of tokens consumed. Excludes tokens skipped with
skip.Source§fn last_span(&self) -> Span
fn last_span(&self) -> Span
Get the span of the last token consumed token (bumped or skipped).
Source§fn emit(&mut self, diag: DiagBuilder2)
fn emit(&mut self, diag: DiagBuilder2)
Emit a diagnostic.
Source§fn skip(&mut self)
fn skip(&mut self)
Skip the current token. Usually the same as
bump, but may be used to
keep skipped tokens out of the consumed tokens count by some parsers.Auto Trait Implementations§
impl<T> Freeze for BasicParser<T>where
T: Freeze,
impl<T> RefUnwindSafe for BasicParser<T>where
T: RefUnwindSafe,
impl<T> Send for BasicParser<T>where
T: Send,
impl<T> Sync for BasicParser<T>where
T: Sync,
impl<T> Unpin for BasicParser<T>where
T: Unpin,
impl<T> UnwindSafe for BasicParser<T>where
T: UnwindSafe,
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