Enum glsl_lang_lexer::token::Token
source · 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
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§
Trait Implementations§
source§impl Token for Token
impl Token for Token
source§fn variant_name(&self) -> &'static str
fn variant_name(&self) -> &'static str
Return the variant name of the current token
source§fn parser_token(&self) -> &'static str
fn parser_token(&self) -> &'static str
Return the name used by the lalrpop parser for this token
source§fn all_tokens() -> &'static [TokenDescriptor]
fn all_tokens() -> &'static [TokenDescriptor]
Return the descriptions for all known tokens
impl StructuralPartialEq for Token
Auto Trait Implementations§
impl Freeze for Token
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> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more§impl<T> ToSmolStr for T
impl<T> ToSmolStr for T
fn to_smolstr(&self) -> SmolStr
§impl<T> TokenExt for Twhere
T: Token,
impl<T> TokenExt for Twhere
T: Token,
§fn description(&self) -> TokenDescription
fn description(&self) -> TokenDescription
Return a descriptor for the current token