#[repr(u8)]
pub enum TokenKind {
Show 78 variants Symbol, NatLit, IntLit, RatioLit, BoolLit, StrLit, NoneLit, NoImplLit, EllipsisLit, InfLit, PrePlus, PreMinus, PreBitNot, Mutate, Try, Plus, Minus, Star, Slash, FloorDiv, Pow, Mod, Closed, RightOpen, LeftOpen, Open, BitAnd, BitOr, BitXor, Shl, Shr, Less, Gre, LessEq, GreEq, DblEq, NotEq, InOp, NotInOp, SubOp, IsOp, IsNotOp, AndOp, OrOp, DotOp, CrossOp, RefOp, RefMutOp, Equal, Walrus, FuncArrow, ProcArrow, LParen, RParen, LSqBr, RSqBr, LBrace, RBrace, Indent, Dedent, Dot, Pipe, Colon, DblColon, SupertypeOf, SubtypeOf, Comma, Caret, Amper, AtSign, VBar, UBar, Spread, Newline, Semi, Illegal, BOF, EOF,
}
Expand description

意味論的名前と記号自体の名前が混在しているが、Pythonの名残である

Variants

Symbol

e.g. i, p!, $s, T, +, and, ‘d/dx’

NatLit

IntLit

RatioLit

BoolLit

StrLit

NoneLit

NoImplLit

EllipsisLit

InfLit

PrePlus

+ (unary)

PreMinus

- (unary)

PreBitNot

~ (unary)

Mutate

! (unary)

Try

? (postfix)

Plus

+

Minus

-

Star

*

Slash

/

FloorDiv

//

Pow

**

Mod

%

Closed

..

RightOpen

..<

LeftOpen

<..

Open

<..<

BitAnd

&&

BitOr

||

BitXor

^^

Shl

<<

Shr

Less

<

Gre

LessEq

<=

GreEq

=

DblEq

==

NotEq

!=

InOp

in

NotInOp

notin

SubOp

sub (subtype of)

IsOp

is

IsNotOp

isnot

AndOp

and

OrOp

or

DotOp

dot (scalar product)

CrossOp

cross (vector product)

RefOp

ref (special unary)

RefMutOp

ref! (special unary)

Equal

=

Walrus

:=

FuncArrow

->

ProcArrow

=>

LParen

(

RParen

)

LSqBr

[

RSqBr

]

LBrace

{

RBrace

}

Indent

Dedent

Dot

.

Pipe

|>

Colon

:

DblColon

::

SupertypeOf

:>

SubtypeOf

<:

Comma

,

Caret

^

Amper

&

AtSign

@

VBar

|

UBar

_

Spread

Newline

\n

Semi

;

Illegal

BOF

Beginning Of File

EOF

Implementations

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Formats the value using the given formatter. Read more
Feeds this value into the given Hasher. Read more
Feeds a slice of this type into the given Hasher. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
Converts the given value to a String. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.