Enum rhai::Token [−][src]
(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)
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.
{
}
(
)
[
]
+
+
(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]
pub fn syntax(&self) -> Cow<'static, str>
[src]
Get the syntax of the token.
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]
Get the precedence number of the token.
pub fn is_bind_right(&self) -> bool
[src]
Does an expression bind to the right (instead of left)?
pub fn is_symbol(&self) -> bool
[src]
Is this token a standard symbol used in the language?
pub fn is_keyword(&self) -> bool
[src]
Is this token an active standard keyword?
pub fn is_reserved(&self) -> bool
[src]
Is this token a reserved symbol?
pub fn is_custom(&self) -> bool
[src]
Is this token a custom keyword?
Trait Implementations
impl Clone for Token
[src]
impl Debug for Token
[src]
impl From<Token> for String
[src]
impl Hash for Token
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
pub fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl PartialEq<Token> for Token
[src]
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> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow(&self) -> &TⓘNotable traits for &'_ mut R
impl<'_, R> Read for &'_ mut R where
R: Read + ?Sized, impl<'_, W> Write for &'_ mut W where
W: Write + ?Sized, impl<'_, I> Iterator for &'_ mut I where
I: Iterator + ?Sized, type Item = <I as Iterator>::Item;impl<'_, F> Future for &'_ mut F where
F: Unpin + Future + ?Sized, type Output = <F as Future>::Output;
[src]
Notable traits for &'_ mut R
impl<'_, R> Read for &'_ mut R where
R: Read + ?Sized, impl<'_, W> Write for &'_ mut W where
W: Write + ?Sized, impl<'_, I> Iterator for &'_ mut I where
I: Iterator + ?Sized, type Item = <I as Iterator>::Item;impl<'_, F> Future for &'_ mut F where
F: Unpin + Future + ?Sized, type Output = <F as Future>::Output;
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut TⓘNotable traits for &'_ mut R
impl<'_, R> Read for &'_ mut R where
R: Read + ?Sized, impl<'_, W> Write for &'_ mut W where
W: Write + ?Sized, impl<'_, I> Iterator for &'_ mut I where
I: Iterator + ?Sized, type Item = <I as Iterator>::Item;impl<'_, F> Future for &'_ mut F where
F: Unpin + Future + ?Sized, type Output = <F as Future>::Output;
[src]
Notable traits for &'_ mut R
impl<'_, R> Read for &'_ mut R where
R: Read + ?Sized, impl<'_, W> Write for &'_ mut W where
W: Write + ?Sized, impl<'_, I> Iterator for &'_ mut I where
I: Iterator + ?Sized, type Item = <I as Iterator>::Item;impl<'_, F> Future for &'_ mut F where
F: Unpin + Future + ?Sized, type Output = <F as Future>::Output;
impl<T> CallHasher for T where
T: Hash + ?Sized,
[src]
T: Hash + ?Sized,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,