pub enum SimpleTokenKind {
Show 90 variants
Comment,
Whitespace,
EndOfFile,
Continuation,
Newline,
LParen,
RParen,
LBrace,
RBrace,
LBracket,
RBracket,
Comma,
Colon,
Semi,
Slash,
Star,
Dot,
Plus,
Minus,
Equals,
Greater,
Less,
Percent,
Ampersand,
Circumflex,
Vbar,
At,
Tilde,
EqEqual,
NotEqual,
LessEqual,
GreaterEqual,
LeftShift,
RightShift,
DoubleStar,
DoubleStarEqual,
PlusEqual,
MinusEqual,
StarEqual,
SlashEqual,
PercentEqual,
AmperEqual,
VbarEqual,
CircumflexEqual,
LeftShiftEqual,
RightShiftEqual,
DoubleSlash,
DoubleSlashEqual,
ColonEqual,
Ellipsis,
AtEqual,
RArrow,
And,
As,
Assert,
Async,
Await,
Break,
Class,
Continue,
Def,
Del,
Elif,
Else,
Except,
Finally,
For,
From,
Global,
If,
Import,
In,
Is,
Lambda,
Nonlocal,
Not,
Or,
Pass,
Raise,
Return,
Try,
While,
Match,
Type,
Case,
With,
Yield,
Name,
Other,
Bogus,
}Variants§
Comment
A comment, not including the trailing new line.
Whitespace
Sequence of ’ ’ or ‘\t’
EndOfFile
Start or end of the file
Continuation
\\
Newline
\n or \r or \r\n
LParen
(
RParen
)
LBrace
{
RBrace
}
LBracket
[
RBracket
]
Comma
,
Colon
:
Semi
;
Slash
/
Star
*
Dot
.
Plus
+
Minus
-
Equals
=
Greater
>
Less
<
Percent
%
Ampersand
&
Circumflex
^
Vbar
|
At
@
Tilde
~
EqEqual
==
NotEqual
!=
LessEqual
<=
GreaterEqual
>=
LeftShift
<<
RightShift
>>
DoubleStar
**
DoubleStarEqual
**=
PlusEqual
+=
MinusEqual
-=
StarEqual
*=
SlashEqual
/=
PercentEqual
%=
AmperEqual
&=
VbarEqual
|=
CircumflexEqual
^=
LeftShiftEqual
<<=
RightShiftEqual
>>=
DoubleSlash
//
DoubleSlashEqual
//=
ColonEqual
:=
Ellipsis
...
AtEqual
@=
RArrow
->
And
and
As
as
Assert
assert
Async
async
Await
await
Break
break
Class
class
Continue
continue
Def
def
Del
del
Elif
elif
Else
else
Except
except
Finally
finally
For
for
From
from
Global
global
If
if
Import
import
In
in
Is
is
Lambda
lambda
Nonlocal
nonlocal
Not
not
Or
or
Pass
pass
Raise
raise
Return
return
Try
try
While
while
Match
match
Type
type
Case
case
With
with
Yield
yield
Name
An identifier or keyword.
Other
Any other non trivia token.
Bogus
Returned for each character after SimpleTokenKind::Other has been returned once.
Implementations§
Trait Implementations§
Source§impl Clone for SimpleTokenKind
impl Clone for SimpleTokenKind
Source§fn clone(&self) -> SimpleTokenKind
fn clone(&self) -> SimpleTokenKind
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SimpleTokenKind
impl Debug for SimpleTokenKind
Source§impl Hash for SimpleTokenKind
impl Hash for SimpleTokenKind
Source§impl PartialEq for SimpleTokenKind
impl PartialEq for SimpleTokenKind
impl Copy for SimpleTokenKind
impl Eq for SimpleTokenKind
impl StructuralPartialEq for SimpleTokenKind
Auto Trait Implementations§
impl Freeze for SimpleTokenKind
impl RefUnwindSafe for SimpleTokenKind
impl Send for SimpleTokenKind
impl Sync for SimpleTokenKind
impl Unpin for SimpleTokenKind
impl UnsafeUnpin for SimpleTokenKind
impl UnwindSafe for SimpleTokenKind
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more