#[non_exhaustive]pub enum Terminal {
Show 99 variants
Ident(String),
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,
Abstract,
Become,
Box,
Do,
Final,
Macro,
Override,
Priv,
Try,
Typeof,
Unsized,
Virtual,
Yield,
Literal(String),
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
A terminal symbol.
§Multi-character operators
Multi-character operators (+=, ->, …) must not be split in multiple
Terminal. Any use of the check_macro function that does not respect
this invariant will is subject to unexpected results.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Ident(String)
An identifier (foo, bar).
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.
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.
Yield
The yield keyword.
Literal(String)
A literal (42, "foo").
We use textual representation of literals because we don’t want to deal with the parsing of literals.
Plus
A plus (+).
Minus
A minus (-).
Star
A star (*).
Slash
A slash (/).
Percent
A percent (%).
Caret
A caret (^).
Not
A not (!).
And
An and (&).
Or
An or (|).
AndAnd
Lazy boolean and (&&).
OrOr
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-equal (^=).
AndEquals
An and-equals (&=).
OrEquals
An or-equals (|=).
ShlEquals
A shift-left-equals (<<=).
ShrEquals
A shift-right-equals (>>=).
Equals
An equal (=).
EqualsEquals
An equals equals (==).
NotEquals
A not-equal (!=).
GreaterThan
A greater than (>).
LessThan
A less than (<).
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
A right arrow (->).
FatArrow
A fat arrow (=>).
Pound
A pound (#).
Dollar
A dollar sign ($).
QuestionMark
A question mark (?).