pub enum Token {
Show 129 variants IDENT(SmolStr), TYPE_NAME(TypeName), FLOAT_CONST(f32), INT_CONST(i32), UINT_CONST(u32), BOOL_CONST(bool), DOUBLE_CONST(f64), LEFT_OP, RIGHT_OP, INC_OP, DEC_OP, LE_OP, GE_OP, EQ_OP, NE_OP, AND_OP, OR_OP, XOR_OP, MUL_ASSIGN, DIV_ASSIGN, ADD_ASSIGN, MOD_ASSIGN, LEFT_ASSIGN, RIGHT_ASSIGN, AND_ASSIGN, XOR_ASSIGN, OR_ASSIGN, SUB_ASSIGN, LPAREN, RPAREN, LBRACKET, RBRACKET, LBRACE, RBRACE, PERIOD, COMMA, COLON, EQUAL, SEMICOLON, BANG, DASH, TILDE, PLUS, ASTERISK, SLASH, PERCENT, LANGLE, RANGLE, BAR, CARET, AMPERSAND, QUESTION, HASH, CONST, UNIFORM, BUFFER, SHARED, ATTRIBUTE, VARYING, COHERENT, VOLATILE, RESTRICT, READONLY, WRITEONLY, LAYOUT, CENTROID, FLAT, SMOOTH, NOPERSPECTIVE, PATCH, SAMPLE, INVARIANT, PRECISE, BREAK, CONTINUE, DO, FOR, WHILE, SWITCH, CASE, DEFAULT, IF, ELSE, SUBROUTINE, IN, OUT, INOUT, DISCARD, RETURN, LOWP, MEDIUMP, HIGHP, PRECISION, STRUCT, COMMON, PARTITION, ACTIVE, ASM, CLASS, UNION, ENUM, TYPEDEF, TEMPLATE, THIS, RESOURCE, GOTO, INLINE, NOINLINE, PUBLIC, STATIC, EXTERN, EXTERNAL, INTERFACE, LONG, SHORT, HALF, FIXED, UNSIGNED, SUPERP, INPUT, OUTPUT, FILTER, SIZEOF, CAST, NAMESPACE, USING, WS, COMMENT, ERROR(ErrorKind),
}

Variants

IDENT(SmolStr)

Identifier

TYPE_NAME(TypeName)

Type name

FLOAT_CONST(f32)

Float constant

INT_CONST(i32)

Int constant

UINT_CONST(u32)

Unsigned int constant

BOOL_CONST(bool)

Bool constant

DOUBLE_CONST(f64)

Double constant

LEFT_OP

<<

RIGHT_OP

INC_OP

++

DEC_OP

LE_OP

<=

GE_OP

=

EQ_OP

==

NE_OP

!=

AND_OP

&&

OR_OP

||

XOR_OP

^^

MUL_ASSIGN

*=

DIV_ASSIGN

/=

ADD_ASSIGN

+=

MOD_ASSIGN

%=

LEFT_ASSIGN

<<=

RIGHT_ASSIGN

=

AND_ASSIGN

&=

XOR_ASSIGN

^=

OR_ASSIGN

|=

SUB_ASSIGN

-=

LPAREN

(

RPAREN

)

LBRACKET

[

RBRACKET

]

LBRACE

{

RBRACE

}

PERIOD

.

COMMA

,

COLON

:

EQUAL

=

SEMICOLON

;

BANG

!

DASH

TILDE

~

PLUS

ASTERISK

SLASH

/

PERCENT

%

LANGLE

<

RANGLE

BAR

|

CARET

^

AMPERSAND

&

QUESTION

?

HASH

CONST

“const”

UNIFORM

“uniform”

BUFFER

“buffer”

SHARED

“shared”

ATTRIBUTE

“attribute”

VARYING

“varying”

COHERENT

“coherent”

VOLATILE

“volatile”

RESTRICT

“restrict”

READONLY

“readonly”

WRITEONLY

“writeonly”

LAYOUT

“layout”

CENTROID

“centroid”

FLAT

“flat”

SMOOTH

“smooth”

NOPERSPECTIVE

“noperspective”

PATCH

“patch”

SAMPLE

“sample”

INVARIANT

“invariant”

PRECISE

“precise”

BREAK

“break”

CONTINUE

“continue”

DO

“do”

FOR

“for”

WHILE

“while”

SWITCH

“switch”

CASE

“case”

DEFAULT

“default”

IF

“if”

ELSE

“else”

SUBROUTINE

“subroutine”

IN

“in”

OUT

“out”

INOUT

“inout”

DISCARD

“discard”

RETURN

“return”

LOWP

“lowp”

MEDIUMP

“mediump”

HIGHP

“highp”

PRECISION

“precision”

STRUCT

“struct”

COMMON

“common”

PARTITION

“partition”

ACTIVE

“active”

ASM

“asm”

CLASS

“class”

UNION

“union”

ENUM

“enum”

TYPEDEF

“typedef”

TEMPLATE

“template”

THIS

“this”

RESOURCE

“resource”

GOTO

“goto”

INLINE

“inline”

NOINLINE

“noinline”

PUBLIC

“public”

STATIC

“static”

EXTERN

“extern”

EXTERNAL

“external”

INTERFACE

“interface”

LONG

“long”

SHORT

“short”

HALF

“half”

FIXED

“fixed”

UNSIGNED

“unsigned”

SUPERP

“superp”

INPUT

“input”

OUTPUT

“output”

FILTER

“filter”

SIZEOF

“sizeof”

CAST

“cast”

NAMESPACE

“namespace”

USING

“using”

WS

Whitespaace

COMMENT

Comment (single-line or multi-line)

ERROR(ErrorKind)

Marker for invalid tokens

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

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method returns an ordering between self and other values if one exists. Read more

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

Return the variant name of the current token

Return the name used by the lalrpop parser for this token

Return the token kinds this token belongs to

Return the descriptions for all known tokens

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

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

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

🔬 This is a nightly-only experimental API. (toowned_clone_into)

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.