Enum rhai::Token [−][src]
pub enum Token {
Show 84 variants
IntegerConstant(INT),
FloatConstant(FloatWrapper<FLOAT>),
DecimalConstant(Decimal),
Identifier(String),
CharConstant(char),
StringConstant(String),
InterpolatedString(String),
LeftBrace,
RightBrace,
LeftParen,
RightParen,
LeftBracket,
RightBracket,
Plus,
UnaryPlus,
Minus,
UnaryMinus,
Multiply,
Divide,
Modulo,
PowerOf,
LeftShift,
RightShift,
SemiColon,
Colon,
DoubleColon,
DoubleArrow,
Underscore,
Comma,
Period,
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(String),
Reserved(String),
Custom(String),
EOF,
}
Expand description
(internals) A Rhai language token.
Exported under the internals
feature only.
Volatile Data Structure
This type is volatile and may change.
Variants
IntegerConstant(INT)
An INT
constant.
Tuple Fields of IntegerConstant
0: INT
FloatConstant(FloatWrapper<FLOAT>)
A FLOAT
constant.
Reserved under the no_float
feature.
Tuple Fields of FloatConstant
0: FloatWrapper<FLOAT>
DecimalConstant(Decimal)
A Decimal
constant.
Requires the decimal
feature.
Tuple Fields of DecimalConstant
0: Decimal
Identifier(String)
An identifier.
Tuple Fields of Identifier
0: String
CharConstant(char)
A character constant.
Tuple Fields of CharConstant
0: char
StringConstant(String)
A string constant.
Tuple Fields of StringConstant
0: String
InterpolatedString(String)
An interpolated string.
Tuple Fields of InterpolatedString
0: String
{
}
(
)
[
]
+
+
(unary)
-
-
(unary)
*
/
%
**
<<
>>
;
:
::
=>
_
,
.
#{
=
true
false
let
const
if
else
switch
do
while
until
loop
for
in
<
>
<=
>=
==
!=
!
|
||
^
&
&&
fn
Reserved under the no_function
feature.
continue
break
return
throw
try
catch
+=
-=
*=
/=
<<=
>>=
&=
|=
^=
%=
**=
private
Reserved under the no_function
feature.
import
Reserved under the no_module
feature.
export
Reserved under the no_module
feature.
as
Reserved under the no_module
feature.
LexError(LexError)
A lexer error.
Tuple Fields of LexError
0: LexError
Comment(String)
A comment block.
Tuple Fields of Comment
0: String
Reserved(String)
A reserved symbol.
Tuple Fields of Reserved
0: String
Custom(String)
A custom keyword.
Tuple Fields of Custom
0: String
End of the input stream.
Implementations
Get the syntax of the token if it is a keyword.
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 an active standard keyword?
Is this token a reserved symbol?
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Token
impl UnwindSafe for Token
Blanket Implementations
Mutably borrows from an owned value. Read more