Enum quad_compat_rhai::Token [−][src]
pub enum Token {
Show 86 variants
IntegerConstant(INT),
FloatConstant(FloatWrapper<FLOAT>),
DecimalConstant(Decimal),
Identifier(Box<str>),
CharConstant(char),
StringConstant(Box<str>),
InterpolatedString(Box<str>),
LeftBrace,
RightBrace,
LeftParen,
RightParen,
LeftBracket,
RightBracket,
Plus,
UnaryPlus,
Minus,
UnaryMinus,
Multiply,
Divide,
Modulo,
PowerOf,
LeftShift,
RightShift,
SemiColon,
Colon,
DoubleColon,
DoubleArrow,
Underscore,
Comma,
Period,
ExclusiveRange,
InclusiveRange,
MapStart,
Equals,
True,
False,
Let,
Const,
If,
Else,
Switch,
Do,
While,
Until,
Loop,
For,
In,
LessThan,
GreaterThan,
LessThanEqualsTo,
GreaterThanEqualsTo,
EqualsTo,
NotEqualsTo,
Bang,
Pipe,
Or,
XOr,
Ampersand,
And,
Fn,
Continue,
Break,
Return,
Throw,
Try,
Catch,
PlusAssign,
MinusAssign,
MultiplyAssign,
DivideAssign,
LeftShiftAssign,
RightShiftAssign,
AndAssign,
OrAssign,
XOrAssign,
ModuloAssign,
PowerOfAssign,
Private,
Import,
Export,
As,
LexError(LexError),
Comment(Box<str>),
Reserved(Box<str>),
Custom(Box<str>),
EOF,
}
Expand description
(internals) A Rhai language token.
Exported under the internals
feature only.
Variants
IntegerConstant(INT)
Tuple Fields
0: INT
An INT
constant.
FloatConstant(FloatWrapper<FLOAT>)
Tuple Fields
0: FloatWrapper<FLOAT>
A FLOAT
constant.
Reserved under the no_float
feature.
DecimalConstant(Decimal)
Tuple Fields
0: Decimal
A Decimal
constant.
Requires the decimal
feature.
Identifier(Box<str>)
An identifier.
CharConstant(char)
Tuple Fields
0: char
A character constant.
StringConstant(Box<str>)
A string constant.
InterpolatedString(Box<str>)
An interpolated string.
LeftBrace
{
RightBrace
}
LeftParen
(
RightParen
)
LeftBracket
[
RightBracket
]
Plus
+
UnaryPlus
+
(unary)
Minus
-
UnaryMinus
-
(unary)
Multiply
*
Divide
/
Modulo
%
PowerOf
**
LeftShift
<<
RightShift
>>
SemiColon
;
Colon
:
DoubleColon
::
DoubleArrow
=>
Underscore
_
Comma
,
Period
.
ExclusiveRange
..
InclusiveRange
..=
MapStart
#{
Equals
=
True
true
False
false
Let
let
Const
const
If
if
Else
else
Switch
switch
Do
do
While
while
Until
until
Loop
loop
For
for
In
in
LessThan
<
GreaterThan
>
LessThanEqualsTo
<=
GreaterThanEqualsTo
>=
EqualsTo
==
NotEqualsTo
!=
Bang
!
Pipe
|
Or
||
XOr
^
Ampersand
&
And
&&
Fn
fn
Reserved under the no_function
feature.
Continue
continue
Break
break
Return
return
Throw
throw
Try
try
Catch
catch
PlusAssign
+=
MinusAssign
-=
MultiplyAssign
*=
DivideAssign
/=
LeftShiftAssign
<<=
RightShiftAssign
>>=
AndAssign
&=
OrAssign
|=
XOrAssign
^=
ModuloAssign
%=
PowerOfAssign
**=
Private
private
Reserved under the no_function
feature.
Import
import
Reserved under the no_module
feature.
Export
export
Reserved under the no_module
feature.
As
as
Reserved under the no_module
feature.
LexError(LexError)
Tuple Fields
0: LexError
A lexer error.
Comment(Box<str>)
A comment block.
Reserved(Box<str>)
A reserved symbol.
Custom(Box<str>)
A custom keyword.
EOF
End of the input stream.
Implementations
Get the literal syntax of the token.
Is this token an op-assignment operator?
Get the corresponding operator of the token if it is an op-assignment operator.
Has this token a corresponding op-assignment operator?
Get the corresponding op-assignment operator of the token.
Reverse lookup a token from a piece of syntax.
Get the precedence number of the token.
Does an expression bind to the right (instead of left)?
Is this token a standard symbol used in the language?
Is this token a standard keyword?
Is this token a reserved keyword or symbol?
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Token
impl UnwindSafe for Token
Blanket Implementations
Mutably borrows from an owned value. Read more