#[non_exhaustive]pub enum TokenDescription {
Show 107 variants
LParen,
RParen,
LBracket,
RBracket,
LBrace,
RBrace,
Fragment(FragmentKind),
Invalid,
Ident,
As,
Async,
Await,
Break,
Const,
Continue,
Crate,
Dyn,
Else,
Enum,
Extern,
False,
Fn,
For,
If,
Impl,
In,
Let,
Loop,
Match,
Mod,
Move,
Mut,
Pub,
Ref,
Return,
Self_,
SelfUpper,
Static,
Struct,
Super,
Trait,
True,
Type,
Union,
Unsafe,
Use,
Where,
While,
Yield,
Abstract,
Become,
Box,
Do,
Final,
Macro,
Override,
Priv,
Try,
Typeof,
Unsized,
Virtual,
Literal,
Plus,
Minus,
Star,
Slash,
Percent,
Caret,
Not,
And,
Or,
AndAnd,
OrOr,
Shl,
Shr,
PlusEquals,
MinusEquals,
StarEquals,
SlashEquals,
PercentEquals,
CaretEquals,
AndEquals,
OrEquals,
ShlEquals,
ShrEquals,
Equals,
EqualsEquals,
NotEquals,
GreaterThan,
LessThan,
GreaterThanEquals,
LessThanEquals,
At,
Underscore,
Dot,
DotDot,
DotDotDot,
DotDotEquals,
Comma,
Semicolon,
Colon,
ColonColon,
RightArrow,
FatArrow,
Pound,
Dollar,
QuestionMark,
}
Expand description
Describes a Terminal
.
This allows library user to accurately report what kind of token is expected.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
LParen
An opening parenthesis.
RParen
A closing parenthesis.
LBracket
An opening bracket.
RBracket
A closing bracket.
LBrace
An opening brace.
RBrace
A closing brace.
Fragment(FragmentKind)
A fragment.
Invalid
An invalid token.
Ident
An identifier. Does not include keywords.
As
The as
keyword.
Async
The async
keyword.
Await
The await
keyword.
Break
The break
keyword.
Const
The const
keyword.
Continue
The continue
keyword.
Crate
The crate
keyword.
Dyn
The dyn
keyword.
Else
The else
keyword.
Enum
The enum
keyword.
Extern
The extern
keyword.
False
The false
keyword.
Fn
The fn
keyword.
For
The for
keyword.
If
The if
keyword.
Impl
The impl
keyword.
In
The in
keyword.
Let
The let
keyword.
Loop
The loop
keyword.
Match
The match
keyword.
Mod
The mod
keyword.
Move
The move
keyword.
Mut
The mut
keyword.
Pub
The pub
keyword.
Ref
The ref
keyword.
Return
The return
keyword.
Self_
The self
keyword.
SelfUpper
The Self
keyword.
Static
The static
keyword.
Struct
The struct
keyword.
Super
The super
keyword.
Trait
The trait
keyword.
True
The true
keyword.
Type
The type
keyword.
Union
The union
keyword.
Unsafe
The unsafe
keyword.
Use
The use
keyword.
Where
The where
keyword.
While
The while
keyword.
Yield
The async
keyword.
Abstract
The abstract
keyword.
Become
The become
keyword.
Box
The box
keyword.
Do
The do
keyword.
Final
The final
keyword.
Macro
The macro
keyword.
Override
The override
keyword.
Priv
The priv
keyword.
Try
The try
keyword.
Typeof
The typeof
keyword.
Unsized
The unsized
keyword.
Virtual
The virtual
keyword.
Literal
A literal
Plus
A plus (+
).
Minus
A minus (-
).
Star
A star (*
).
Slash
A slash (/
).
Percent
A percent sign (%
).
Caret
A caret (^
).
Not
A not (!
).
And
An ampersand (&
).
Or
An or (|
).
AndAnd
A lazy boolean and (&&
).
OrOr
A lazy boolean or (||
).
Shl
A shift left (<<
).
Shr
A shift right (>>
).
PlusEquals
A plus-equals (+=
).
MinusEquals
A minus-equals (-=
).
StarEquals
A star-equals (*=
).
SlashEquals
A slash-equals (/=
).
PercentEquals
A percent-equals (%=
).
CaretEquals
A caret-equals (^=
).
AndEquals
An and-equals (&=
).
OrEquals
An or-equals (|=
).
ShlEquals
A shift-left-equals (<<=
).
ShrEquals
A shift-right-equals (>>=
).
Equals
An equals (=
).
EqualsEquals
An equals equals (==
).
NotEquals
A not equals (!=
).
GreaterThan
A greater than (>
).
LessThan
A left chevron (<
).
GreaterThanEquals
A greater than equals (>=
).
LessThanEquals
A less than equals (<=
).
At
An at (@
).
Underscore
An underscore (_
).
Dot
A dot (.
).
DotDot
A dot dot (..
).
DotDotDot
A dot dot dot (...
).
DotDotEquals
A dot dot equals (..=
).
Comma
A comma (,
).
Semicolon
A semicolon (;
).
Colon
A colon (:
).
ColonColon
A colon colon (::
).
RightArrow
An arrow (->
).
FatArrow
A fat arrow (=>
).
Pound
The pound sign (#
).
Dollar
The dollar sign ($
).
QuestionMark
A question mark (?
).
Trait Implementations§
Source§impl Clone for TokenDescription
impl Clone for TokenDescription
Source§fn clone(&self) -> TokenDescription
fn clone(&self) -> TokenDescription
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more