#[repr(u8)]
pub enum TokenKind {
Show 83 variants Symbol, NatLit, IntLit, RatioLit, BoolLit, StrLit, StrInterpLeft, StrInterpMid, StrInterpRight, NoneLit, NoImplLit, EllipsisLit, InfLit, DocComment, 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, Inclusion, 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

e.g. 0, 1

§

IntLit

e.g. -1, -2

§

RatioLit

§

BoolLit

§

StrLit

§

StrInterpLeft

e.g. “abc{

§

StrInterpMid

e.g. }abc{

§

StrInterpRight

e.g. }def“

§

NoneLit

§

NoImplLit

§

EllipsisLit

§

InfLit

§

DocComment

§

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

=

§

Inclusion

<-

§

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
Converts to this type from the input type.
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 ==.
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.

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.