Skip to main content

Tok

Enum Tok 

Source
pub enum Tok {
Show 130 variants Invalid, NullTok, Eof, MacroFormal, MacroForeach, MacroArgCount, MacroIfEmpty, MacroIfNEmpty, Sym, Int, SStr, SStrStart, SStrMid, SStrEnd, DStr, DStrStart, DStrMid, DStrEnd, ReStr, LPar, RPar, Comma, Dot, LBrace, RBrace, LBrack, RBrack, Eq, EqEq, Asi, Plus, Minus, Times, Div, Mod, Gt, Lt, Ge, Le, Ne, Arrow, Colon, Sem, And, AndAnd, Or, OrOr, Xor, Shl, AShr, LShr, Inc, Dec, PlusEq, MinEq, TimesEq, DivEq, ModEq, AndEq, OrEq, XorEq, ShlEq, AShrEq, LShrEq, Not, BNot, Pound, PoundPound, PoundAt, Ellipsis, Question, QQ, ColonColon, Float, BigInt, At, DotDot, FmtSpec, SelfKw, Inherited, ArgCount, If, Else, For, While, Do, Switch, Case, Default, Goto, Break, Continue, Function, Return, Local, Object, Nil, True, Pass, External, Extern, FormatString, Class, Replace, Modify, New, Delete, Throw, Try, Catch, Finally, Builtin, Dictionary, Grammar, Enum, Template, Static, Foreach, Export, Delegated, TargetProp, PropertySet, TargetObj, DefiningObj, Transient, Replaced, Property, Operator, Method, Invokee,
}
Expand description

The kinds of token. They are in the order the reference compiler has them in, so that a kind’s number here is its number there, which is what lets the two tokenizers’ output be compared.

Variants§

§

Invalid

§

NullTok

Nothing: the reader should go on to the next token.

§

Eof

The end of the line, or of the source.

§

MacroFormal

§

MacroForeach

§

MacroArgCount

§

MacroIfEmpty

§

MacroIfNEmpty

§

Sym

§

Int

§

SStr

§

SStrStart

§

SStrMid

§

SStrEnd

§

DStr

§

DStrStart

§

DStrMid

§

DStrEnd

§

ReStr

§

LPar

§

RPar

§

Comma

§

Dot

§

LBrace

§

RBrace

§

LBrack

§

RBrack

§

Eq

§

EqEq

§

Asi

:=, which the language no longer has.

§

Plus

§

Minus

§

Times

§

Div

§

Mod

§

Gt

§

Lt

§

Ge

§

Le

§

Ne

§

Arrow

§

Colon

§

Sem

§

And

§

AndAnd

§

Or

§

OrOr

§

Xor

§

Shl

§

AShr

§

LShr

§

Inc

§

Dec

§

PlusEq

§

MinEq

§

TimesEq

§

DivEq

§

ModEq

§

AndEq

§

OrEq

§

XorEq

§

ShlEq

§

AShrEq

§

LShrEq

§

Not

§

BNot

§

Pound

§

PoundPound

§

PoundAt

§

Ellipsis

§

Question

§

QQ

§

ColonColon

§

Float

§

BigInt

An integer too big to be one, to be made a floating-point number.

§

At

§

DotDot

§

FmtSpec

The format in <<%fmt expr>>.

§

SelfKw

§

Inherited

§

ArgCount

§

If

§

Else

§

For

§

While

§

Do

§

Switch

§

Case

§

Default

§

Goto

§

Break

§

Continue

§

Function

§

Return

§

Local

§

Object

§

Nil

§

True

§

Pass

§

External

§

Extern

§

FormatString

§

Class

§

Replace

§

Modify

§

New

§

Delete

§

Throw

§

Try

§

Catch

§

Finally

§

Builtin

§

Dictionary

§

Grammar

§

Enum

§

Template

§

Static

§

Foreach

§

Export

§

Delegated

§

TargetProp

§

PropertySet

§

TargetObj

§

DefiningObj

§

Transient

§

Replaced

§

Property

§

Operator

§

Method

§

Invokee

Trait Implementations§

Source§

impl Clone for Tok

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for Tok

Source§

impl Debug for Tok

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for Tok

Source§

impl PartialEq for Tok

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for Tok

Auto Trait Implementations§

§

impl Forget for Tok

§

impl Freeze for Tok

§

impl Move for Tok

§

impl RefUnwindSafe for Tok

§

impl Send for Tok

§

impl Sync for Tok

§

impl Unpin for Tok

§

impl UnsafeUnpin for Tok

§

impl UnwindSafe for Tok

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.