Struct moore_vhdl_syntax::parser::basic::BasicParser
source · [−]pub struct BasicParser<T> where
T: Grinder<Item = Option<u8>, Error = DiagBuilder2>, { /* private fields */ }
Implementations
sourceimpl<T> BasicParser<T> where
T: Grinder<Item = Option<u8>, Error = DiagBuilder2>,
impl<T> BasicParser<T> where
T: Grinder<Item = Option<u8>, Error = DiagBuilder2>,
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
sourceimpl<T> TokenStream<Token> for BasicParser<T> where
T: Grinder<Item = Option<u8>, Error = DiagBuilder2>,
impl<T> TokenStream<Token> for BasicParser<T> where
T: Grinder<Item = Option<u8>, Error = DiagBuilder2>,
sourcefn consumed(&self) -> usize
fn consumed(&self) -> usize
Get the number of tokens consumed. Excludes tokens skipped with skip
.
sourcefn emit(&mut self, diag: DiagBuilder2)
fn emit(&mut self, diag: DiagBuilder2)
Emit a diagnostic.
sourcefn 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. Read more
Auto Trait Implementations
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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more