Enum rhai::Token [−][src]
pub enum Token {}Show 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.
FloatConstant(FloatWrapper<FLOAT>)
A FLOAT
constant.
Reserved under the no_float
feature.
DecimalConstant(Decimal)
A Decimal
constant.
Requires the decimal
feature.
Identifier(String)
An identifier.
CharConstant(char)
A character constant.
StringConstant(String)
A string constant.
InterpolatedString(String)
An interpolated 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.
Comment(String)
A comment block.
Reserved(String)
A reserved symbol.
Custom(String)
A custom keyword.
End of the input stream.
Implementations
impl Token
[src]
impl Token
[src]pub fn keyword_syntax(&self) -> &'static str
[src]
pub fn keyword_syntax(&self) -> &'static str
[src]pub fn is_op_assignment(&self) -> bool
[src]
pub fn is_op_assignment(&self) -> bool
[src]Is this token an op-assignment operator?
pub fn map_op_assignment(&self) -> Option<Self>
[src]
pub fn map_op_assignment(&self) -> Option<Self>
[src]Get the corresponding operator of the token if it is an op-assignment operator.
pub fn has_op_assignment(&self) -> bool
[src]
pub fn has_op_assignment(&self) -> bool
[src]Has this token a corresponding op-assignment operator?
pub fn make_op_assignment(&self) -> Option<Self>
[src]
pub fn make_op_assignment(&self) -> Option<Self>
[src]Get the corresponding op-assignment operator of the token.
pub fn lookup_from_syntax(syntax: &str) -> Option<Self>
[src]
pub fn lookup_from_syntax(syntax: &str) -> Option<Self>
[src]Reverse lookup a token from a piece of syntax.
pub fn is_eof(&self) -> bool
[src]
pub fn is_next_unary(&self) -> bool
[src]
pub fn precedence(&self) -> Option<NonZeroU8>
[src]
pub fn precedence(&self) -> Option<NonZeroU8>
[src]Get the precedence number of the token.
pub fn is_bind_right(&self) -> bool
[src]
pub fn is_bind_right(&self) -> bool
[src]Does an expression bind to the right (instead of left)?
pub fn is_keyword(&self) -> bool
[src]
pub fn is_keyword(&self) -> bool
[src]Is this token an active standard keyword?
pub fn is_reserved(&self) -> bool
[src]
pub fn is_reserved(&self) -> bool
[src]Is this token a reserved symbol?
Trait Implementations
impl StructuralPartialEq for Token
[src]
Auto Trait Implementations
impl RefUnwindSafe for Token
impl Send for Token
impl Sync for Token
impl Unpin for Token
impl UnwindSafe for Token
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> CallHasher for T where
T: Hash + ?Sized,
[src]
impl<T> CallHasher for T where
T: Hash + ?Sized,
[src]impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more