Enum rhai::Token [−][src]
pub enum Token {
Show 75 variants
IntegerConstant(INT),
FloatConstant(FLOAT),
Identifier(String),
CharConstant(char),
StringConstant(String),
LeftBrace,
RightBrace,
LeftParen,
RightParen,
LeftBracket,
RightBracket,
Plus,
UnaryPlus,
Minus,
UnaryMinus,
Multiply,
Divide,
Modulo,
PowerOf,
LeftShift,
RightShift,
SemiColon,
Colon,
DoubleColon,
Comma,
Period,
MapStart,
Equals,
True,
False,
Let,
Const,
If,
Else,
While,
Loop,
For,
In,
LessThan,
GreaterThan,
LessThanEqualsTo,
GreaterThanEqualsTo,
EqualsTo,
NotEqualsTo,
Bang,
Pipe,
Or,
XOr,
Ampersand,
And,
Fn,
Continue,
Break,
Return,
Throw,
PlusAssign,
MinusAssign,
MultiplyAssign,
DivideAssign,
LeftShiftAssign,
RightShiftAssign,
AndAssign,
OrAssign,
XOrAssign,
ModuloAssign,
PowerOfAssign,
Private,
Import,
Export,
As,
LexError(Box<LexError>),
Comment(String),
Reserved(String),
Custom(String),
EOF,
}
Expand description
[INTERNALS] A Rhai language token.
Exported under the internals
feature only.
WARNING
This type is volatile and may change.
Variants
IntegerConstant(INT)
Tuple Fields
0: INT
An INT
constant.
FloatConstant(FLOAT)
Tuple Fields
0: FLOAT
A FLOAT
constant.
Reserved under the no_float
feature.
Identifier(String)
Tuple Fields
0: String
An identifier.
CharConstant(char)
Tuple Fields
0: char
A character constant.
StringConstant(String)
Tuple Fields
0: String
A string constant.
LeftBrace
{
RightBrace
}
LeftParen
(
RightParen
)
LeftBracket
[
RightBracket
]
Plus
+
UnaryPlus
+
(unary)
Minus
-
UnaryMinus
-
(unary)
Multiply
*
Divide
/
Modulo
%
PowerOf
~
LeftShift
<<
RightShift
>>
SemiColon
;
Colon
:
DoubleColon
::
Comma
,
Period
.
MapStart
#{
Equals
=
True
true
False
false
Let
let
Const
const
If
if
Else
else
While
while
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
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(Box<LexError>)
A lexer error.
Comment(String)
Tuple Fields
0: String
A comment block.
Reserved(String)
Tuple Fields
0: String
A reserved symbol.
Custom(String)
Tuple Fields
0: String
A custom keyword.
EOF
End of the input stream.
Implementations
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 operator?
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