[−][src]Enum rhai::Token
[INTERNALS] A Rhai language token.
Exported under the internals feature only.
WARNING
This type is volatile and may change.
Variants
IntegerConstant(INT)An INT constant.
FloatConstant(FLOAT)A FLOAT constant.
Reserved under the no_float feature.
Identifier(String)An identifier.
CharConstant(char)A character constant.
StringConstant(String)A string constant.
{
}
(
)
[
]
+
+ (unary)
-
- (unary)
*
/
%
~
<<
>>
;
:
::
,
.
#{
=
true
false
let
const
if
else
while
loop
for
in
<
>
<=
>=
==
!=
!
|
||
^
&
&&
fn
Reserved under the no_function feature.
continue
break
return
throw
+=
-=
*=
/=
<<=
>>=
&=
|=
^=
%=
~=
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.
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, custom: Option<&HashMap<String, u8>>) -> u8[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_operator(&self) -> bool[src]
Is this token an operator?
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 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,
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<'_, F> Future for &'_ mut F where
F: Unpin + Future + ?Sized, type Output = <F as Future>::Output;impl<'_, I> Iterator for &'_ mut I where
I: Iterator + ?Sized, type Item = <I as Iterator>::Item;[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<'_, F> Future for &'_ mut F where
F: Unpin + Future + ?Sized, type Output = <F as Future>::Output;impl<'_, I> Iterator for &'_ mut I where
I: Iterator + ?Sized, type Item = <I as Iterator>::Item;impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
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<'_, F> Future for &'_ mut F where
F: Unpin + Future + ?Sized, type Output = <F as Future>::Output;impl<'_, I> Iterator for &'_ mut I where
I: Iterator + ?Sized, type Item = <I as Iterator>::Item;[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<'_, F> Future for &'_ mut F where
F: Unpin + Future + ?Sized, type Output = <F as Future>::Output;impl<'_, I> Iterator for &'_ mut I where
I: Iterator + ?Sized, type Item = <I as Iterator>::Item;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.
fn to_owned(&self) -> T[src]
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.
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>,