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

Ident

A basic or extended identifier.

Tuple Fields of Ident

0: Name
Lit

A literal.

Tuple Fields of Lit

0: Literal
OpenDelim

An opening delimiter.

Tuple Fields of OpenDelim

0: DelimToken
CloseDelim

A closing delimiter.

Tuple Fields of CloseDelim

0: DelimToken
Keyword

A keyword.

Tuple Fields of Keyword

0: 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

The end of the input file.

Implementations

Checks if this token is a identifier.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Formats the value using the given formatter. Read more

Feeds this value into the given Hasher. Read more

Feeds a slice of this type into the given Hasher. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Look ahead at a token in the stream.

Consume the current token.

Get the number of tokens consumed. Excludes tokens skipped with skip.

Get the span of the last token consumed token (bumped or skipped).

Emit a diagnostic.

Get the severity of the worst diagnostic emitted so far.

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).

Check whether a fatal diagnostic has been emitted.

Check whether an error diagnostic has been emitted.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.