Struct moore_vhdl_syntax::parser::basic::BasicParser
[−]
[src]
pub struct BasicParser<T> where
T: Grinder<Item = Option<u8>, Error = DiagBuilder2>, { /* fields omitted */ }
Methods
impl<T> BasicParser<T> where
T: Grinder<Item = Option<u8>, Error = DiagBuilder2>,
[src]
T: Grinder<Item = Option<u8>, Error = DiagBuilder2>,
fn new(input: Lexer<T>) -> BasicParser<T>
[src]
Create a new parser which consumes input from the given lexer.
Trait Implementations
impl<T> TokenStream<Token> for BasicParser<T> where
T: Grinder<Item = Option<u8>, Error = DiagBuilder2>,
[src]
T: Grinder<Item = Option<u8>, Error = DiagBuilder2>,
fn peek(&mut self, offset: usize) -> Spanned<Token>
[src]
Look ahead at a token in the stream.
fn bump(&mut self)
[src]
Consume the current token.
fn consumed(&self) -> usize
[src]
Get the number of tokens consumed. Excludes tokens skipped with skip
.
fn last_span(&self) -> Span
[src]
Get the span of the last token consumed token (bumped or skipped).
fn emit(&mut self, diag: DiagBuilder2)
[src]
Emit a diagnostic.
fn severity(&self) -> Severity
[src]
Get the severity of the worst diagnostic emitted so far.
fn skip(&mut self)
[src]
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
fn last_loc(&self) -> Location
[src]
Get the tail location of the last consumed token (bumped or skipped).
fn is_fatal(&self) -> bool
[src]
Check whether a fatal diagnostic has been emitted.
fn is_error(&self) -> bool
[src]
Check whether an error diagnostic has been emitted.