pub enum Token {
Show 281 variants Const, Bool, Float, Int, UInt, Double, BVec2, BVec3, BVec4, IVec2, IVec3, IVec4, UVec2, UVec3, UVec4, Vec2, Vec3, Vec4, Mat2, Mat3, Mat4, Mat2x2, Mat2x3, Mat2x4, Mat3x2, Mat3x3, Mat3x4, Mat4x2, Mat4x3, Mat4x4, DVec2, DVec3, DVec4, DMat2, DMat3, DMat4, DMat2x2, DMat2x3, DMat2x4, DMat3x2, DMat3x3, DMat3x4, DMat4x2, DMat4x3, DMat4x4, Centroid, In, Out, InOut, Uniform, Patch, Sample, Buffer, Shared, Coherent, Volatile, Restrict, ReadOnly, WriteOnly, Attribute, Varying, NoPerspective, Flat, Smooth, Layout, AtomicUInt, Sampler1D, Sampler1DShadow, Sampler1DArray, Sampler1DArrayShadow, ISampler1D, ISampler1DArray, USampler1D, USampler1DArray, Sampler2D, Sampler2DShadow, Sampler2DArray, Sampler2DArrayShadow, ISampler2D, ISampler2DArray, USampler2D, USampler2DArray, Sampler2DRect, Sampler2DRectShadow, ISampler2DRect, USampler2DRect, Sampler2DMs, ISampler2DMs, USampler2DMs, Sampler2DMsArray, ISampler2DMsArray, USampler2DMsArray, Sampler3D, ISampler3D, USampler3D, SamplerCube, SamplerCubeShadow, ISamplerCube, USamplerCube, SamplerCubeArray, SamplerCubeArrayShadow, ISamplerCubeArray, USamplerCubeArray, SamplerBuffer, ISamplerBuffer, USamplerBuffer, Image1D, IImage1D, UImage1D, Image1DArray, IImage1DArray, UImage1DArray, Image2D, IImage2D, UImage2D, Image2DArray, IImage2DArray, UImage2DArray, Image2DRect, IImage2DRect, UImage2DRect, Image2DMs, IImage2DMs, UImage2DMs, Image2DMsArray, IImage2DMsArray, UImage2DMsArray, Image3D, IImage3D, UImage3D, ImageCube, IImageCube, UImageCube, ImageCubeArray, IImageCubeArray, UImageCubeArray, ImageBuffer, IImageBuffer, UImageBuffer, Texture1D, Texture1DArray, ITexture1D, ITexture1DArray, UTexture1D, UTexture1DArray, Texture2D, Texture2DArray, ITexture2D, ITexture2DArray, UTexture2D, UTexture2DArray, Texture2DRect, ITexture2DRect, UTexture2DRect, Texture2DMs, ITexture2DMs, UTexture2DMs, Texture2DMsArray, ITexture2DMsArray, UTexture2DMsArray, Texture3D, ITexture3D, UTexture3D, TextureCube, ITextureCube, UTextureCube, TextureCubeArray, ITextureCubeArray, UTextureCubeArray, TextureBuffer, ITextureBuffer, UTextureBuffer, Sampler, SamplerShadow, SubpassInput, ISubpassInput, USubpassInput, SubpassInputMs, ISubpassInputMs, USubpassInputMs, Struct, Void, While, Break, Continue, Do, Else, For, If, Discard, Return, Switch, Case, Default, Subroutine, Identifier(SmolStr), TypeName(SmolStr), FloatConstant(f32), IntConstant(i32), UIntConstant(u32), BoolConstant(bool), DoubleConstant(f64), LeftOp, RightOp, IncOp, DecOp, LeOp, GeOp, EqOp, NeOp, AndOp, OrOp, XorOp, MulAssign, DivAssign, AddAssign, ModAssign, LeftAssign, RightAssign, AndAssign, XorAssign, OrAssign, SubAssign, LeftParen, RightParen, LeftBracket, RightBracket, LeftBrace, RightBrace, Dot, Comma, Colon, Equal, Semicolon, Bang, Dash, Tilde, Plus, Star, Slash, Percent, LeftAngle, RightAngle, VerticalBar, Caret, Ampersand, Question, Invariant, Precise, HighPrecision, MediumPrecision, LowPrecision, Precision, Whitespace, SingleLineComment, MultiLineComment, PpDefine, PpElse, PpElif, PpEndIf, PpError, PpIf, PpIfDef, PpIfNDef, PpInclude, PpLine, PpPragma, PpUndef, PpVersion, PpExtension, PpRest(String), PpCore, PpCompatibility, PpEs, PpExtRequire, PpExtEnable, PpExtWarn, PpExtDisable, PpPathAbsolute(String), PpPathRelative(String), Error,
}

Variants§

§

Const

§

Bool

§

Float

§

Int

§

UInt

§

Double

§

BVec2

§

BVec3

§

BVec4

§

IVec2

§

IVec3

§

IVec4

§

UVec2

§

UVec3

§

UVec4

§

Vec2

§

Vec3

§

Vec4

§

Mat2

§

Mat3

§

Mat4

§

Mat2x2

§

Mat2x3

§

Mat2x4

§

Mat3x2

§

Mat3x3

§

Mat3x4

§

Mat4x2

§

Mat4x3

§

Mat4x4

§

DVec2

§

DVec3

§

DVec4

§

DMat2

§

DMat3

§

DMat4

§

DMat2x2

§

DMat2x3

§

DMat2x4

§

DMat3x2

§

DMat3x3

§

DMat3x4

§

DMat4x2

§

DMat4x3

§

DMat4x4

§

Centroid

§

In

§

Out

§

InOut

§

Uniform

§

Patch

§

Sample

§

Buffer

§

Shared

§

Coherent

§

Volatile

§

Restrict

§

ReadOnly

§

WriteOnly

§

Attribute

§

Varying

§

NoPerspective

§

Flat

§

Smooth

§

Layout

§

AtomicUInt

§

Sampler1D

§

Sampler1DShadow

§

Sampler1DArray

§

Sampler1DArrayShadow

§

ISampler1D

§

ISampler1DArray

§

USampler1D

§

USampler1DArray

§

Sampler2D

§

Sampler2DShadow

§

Sampler2DArray

§

Sampler2DArrayShadow

§

ISampler2D

§

ISampler2DArray

§

USampler2D

§

USampler2DArray

§

Sampler2DRect

§

Sampler2DRectShadow

§

ISampler2DRect

§

USampler2DRect

§

Sampler2DMs

§

ISampler2DMs

§

USampler2DMs

§

Sampler2DMsArray

§

ISampler2DMsArray

§

USampler2DMsArray

§

Sampler3D

§

ISampler3D

§

USampler3D

§

SamplerCube

§

SamplerCubeShadow

§

ISamplerCube

§

USamplerCube

§

SamplerCubeArray

§

SamplerCubeArrayShadow

§

ISamplerCubeArray

§

USamplerCubeArray

§

SamplerBuffer

§

ISamplerBuffer

§

USamplerBuffer

§

Image1D

§

IImage1D

§

UImage1D

§

Image1DArray

§

IImage1DArray

§

UImage1DArray

§

Image2D

§

IImage2D

§

UImage2D

§

Image2DArray

§

IImage2DArray

§

UImage2DArray

§

Image2DRect

§

IImage2DRect

§

UImage2DRect

§

Image2DMs

§

IImage2DMs

§

UImage2DMs

§

Image2DMsArray

§

IImage2DMsArray

§

UImage2DMsArray

§

Image3D

§

IImage3D

§

UImage3D

§

ImageCube

§

IImageCube

§

UImageCube

§

ImageCubeArray

§

IImageCubeArray

§

UImageCubeArray

§

ImageBuffer

§

IImageBuffer

§

UImageBuffer

§

Texture1D

§

Texture1DArray

§

ITexture1D

§

ITexture1DArray

§

UTexture1D

§

UTexture1DArray

§

Texture2D

§

Texture2DArray

§

ITexture2D

§

ITexture2DArray

§

UTexture2D

§

UTexture2DArray

§

Texture2DRect

§

ITexture2DRect

§

UTexture2DRect

§

Texture2DMs

§

ITexture2DMs

§

UTexture2DMs

§

Texture2DMsArray

§

ITexture2DMsArray

§

UTexture2DMsArray

§

Texture3D

§

ITexture3D

§

UTexture3D

§

TextureCube

§

ITextureCube

§

UTextureCube

§

TextureCubeArray

§

ITextureCubeArray

§

UTextureCubeArray

§

TextureBuffer

§

ITextureBuffer

§

UTextureBuffer

§

Sampler

§

SamplerShadow

§

SubpassInput

§

ISubpassInput

§

USubpassInput

§

SubpassInputMs

§

ISubpassInputMs

§

USubpassInputMs

§

Struct

§

Void

§

While

§

Break

§

Continue

§

Do

§

Else

§

For

§

If

§

Discard

§

Return

§

Switch

§

Case

§

Default

§

Subroutine

§

Identifier(SmolStr)

§

TypeName(SmolStr)

§

FloatConstant(f32)

§

IntConstant(i32)

§

UIntConstant(u32)

§

BoolConstant(bool)

§

DoubleConstant(f64)

§

LeftOp

§

RightOp

§

IncOp

§

DecOp

§

LeOp

§

GeOp

§

EqOp

§

NeOp

§

AndOp

§

OrOp

§

XorOp

§

MulAssign

§

DivAssign

§

AddAssign

§

ModAssign

§

LeftAssign

§

RightAssign

§

AndAssign

§

XorAssign

§

OrAssign

§

SubAssign

§

LeftParen

§

RightParen

§

LeftBracket

§

RightBracket

§

LeftBrace

§

RightBrace

§

Dot

§

Comma

§

Colon

§

Equal

§

Semicolon

§

Bang

§

Dash

§

Tilde

§

Plus

§

Star

§

Slash

§

Percent

§

LeftAngle

§

RightAngle

§

VerticalBar

§

Caret

§

Ampersand

§

Question

§

Invariant

§

Precise

§

HighPrecision

§

MediumPrecision

§

LowPrecision

§

Precision

§

Whitespace

§

SingleLineComment

§

MultiLineComment

§

PpDefine

§

PpElse

§

PpElif

§

PpEndIf

§

PpError

§

PpIf

§

PpIfDef

§

PpIfNDef

§

PpInclude

§

PpLine

§

PpPragma

§

PpUndef

§

PpVersion

§

PpExtension

§

PpRest(String)

§

PpCore

§

PpCompatibility

§

PpEs

§

PpExtRequire

§

PpExtEnable

§

PpExtWarn

§

PpExtDisable

§

PpPathAbsolute(String)

§

PpPathRelative(String)

§

Error

Implementations§

source§

impl Token

source

pub fn is_pp(&self) -> bool

Return true if this token is a preprocessor token

source

pub fn as_str(&self) -> &str

Return this token’s inner text as a string slice

Trait Implementations§

source§

impl Clone for Token

source§

fn clone(&self) -> Token

Returns a copy of the value. Read more
1.0.0 · source§

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

Performs copy-assignment from source. Read more
source§

impl Debug for Token

source§

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

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

impl Display for Token

source§

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

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

impl From<Token> for String

source§

fn from(value: Token) -> Self

Converts to this type from the input type.
source§

impl From<Token> for bool

source§

fn from(value: Token) -> Self

Converts to this type from the input type.
source§

impl From<Token> for f32

source§

fn from(value: Token) -> Self

Converts to this type from the input type.
source§

impl From<Token> for f64

source§

fn from(value: Token) -> Self

Converts to this type from the input type.
source§

impl From<Token> for i32

source§

fn from(value: Token) -> Self

Converts to this type from the input type.
source§

impl From<Token> for u32

source§

fn from(value: Token) -> Self

Converts to this type from the input type.
source§

impl PartialEq for Token

source§

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

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Token for Token

source§

fn variant_name(&self) -> &'static str

Return the variant name of the current token
source§

fn parser_token(&self) -> &'static str

Return the name used by the lalrpop parser for this token
source§

fn kinds(&self) -> &'static [&'static str]

Return the token kinds this token belongs to
source§

fn all_tokens() -> &'static [TokenDescriptor]

Return the descriptions for all known tokens
source§

impl StructuralPartialEq for Token

Auto Trait Implementations§

§

impl RefUnwindSafe for Token

§

impl Send for Token

§

impl Sync for Token

§

impl Unpin for Token

§

impl UnwindSafe for Token

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere 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 Twhere T: Clone,

§

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> ToString for Twhere T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T> TokenExt for Twhere T: Token,

source§

fn description(&self) -> TokenDescription

Return a descriptor for the current token
source§

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

§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

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

§

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.