Enum moore_vhdl_syntax::lexer::token::Token [−][src]
pub enum Token {}Show 37 variants
Ident(Name), Lit(Literal), OpenDelim(DelimToken), CloseDelim(DelimToken), Keyword(Kw), Period, Comma, Colon, Semicolon, Apostrophe, Ampersand, Arrow, Condition, LtGt, VarAssign, Lshift, Rshift, Eq, Neq, Lt, Leq, Gt, Geq, MatchEq, MatchNeq, MatchLt, MatchLeq, MatchGt, MatchGeq, Add, Sub, Mul, Div, Pow, Pipe, Qmark, Eof,
Expand description
A primary token as emitted by the lexer.
Variants
A basic or extended identifier.
Tuple Fields of Ident
0: Name
A literal.
Tuple Fields of Lit
0: Literal
An opening delimiter.
Tuple Fields of OpenDelim
0: DelimToken
A closing delimiter.
Tuple Fields of CloseDelim
0: DelimToken
A keyword.
Tuple Fields of Keyword
0: Kw
The end of the input file.
Implementations
Trait Implementations
impl<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>,
Get the number of tokens consumed. Excludes tokens skipped with skip
.
Emit a diagnostic.
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
Get the tail location of the last consumed token (bumped or skipped).
Auto Trait Implementations
impl RefUnwindSafe for Token
impl UnwindSafe for Token
Blanket Implementations
Mutably borrows from an owned value. Read more