pub enum GsglElementType {
Show 141 variants
Root,
SourceFile,
FunctionDefinition,
VariableDeclaration,
StructDefinition,
Block,
IfStatement,
ForStatement,
WhileStatement,
ReturnStatement,
Shader,
Vertex,
Fragment,
Geometry,
Compute,
Uniform,
Attribute,
Varying,
In,
Out,
Inout,
Const,
Struct,
If,
Else,
For,
While,
Do,
Break,
Continue,
Return,
Discard,
True,
False,
Float,
Int,
Bool,
Vec2,
Vec3,
Vec4,
Mat2,
Mat3,
Mat4,
Sampler2D,
SamplerCube,
Void,
Identifier,
Number,
String,
Plus,
Minus,
Star,
Slash,
Percent,
Assign,
PlusAssign,
MinusAssign,
StarAssign,
SlashAssign,
Eq,
Ne,
Lt,
Le,
Gt,
Ge,
And,
Or,
Not,
BitAnd,
BitOr,
BitXor,
BitNot,
LeftShift,
RightShift,
LeftParen,
RightParen,
LeftBrace,
RightBrace,
LeftBracket,
RightBracket,
Semicolon,
Comma,
Dot,
Colon,
Question,
Hash,
At,
Preprocessor,
Include,
Define,
Ifdef,
Ifndef,
Endif,
Version,
Sin,
Cos,
Tan,
Sqrt,
Pow,
Exp,
Log,
Abs,
Sign,
Floor,
Ceil,
Fract,
Mod,
Min,
Max,
Clamp,
Mix,
Step,
Smoothstep,
Length,
Distance,
DotProduct,
Cross,
Normalize,
Faceforward,
Reflect,
Refract,
Whitespace,
Comment,
Newline,
Eof,
Error,
FunctionDecl,
VariableDecl,
StructDecl,
Statement,
Expression,
Parameter,
Argument,
FieldAccess,
ArrayAccess,
FunctionCall,
BinaryExpr,
UnaryExpr,
AssignmentExpr,
ConditionalExpr,
Literal,
}Expand description
Element types for the GSGL (Game Shader Graphics Language) language.
Variants§
Root
Root node of the AST.
SourceFile
A source file.
FunctionDefinition
A function definition.
VariableDeclaration
A variable declaration.
StructDefinition
A struct definition.
Block
A block of code.
IfStatement
An if statement.
ForStatement
A for statement.
WhileStatement
A while statement.
ReturnStatement
A return statement.
Shader
shader keyword.
Vertex
vertex keyword.
Fragment
fragment keyword.
Geometry
geometry keyword.
Compute
compute keyword.
Uniform
uniform keyword.
Attribute
attribute keyword.
Varying
varying keyword.
In
in keyword.
Out
out keyword.
Inout
inout keyword.
Const
const keyword.
Struct
struct keyword.
If
if keyword.
Else
else keyword.
For
for keyword.
While
while keyword.
Do
do keyword.
Break
break keyword.
Continue
continue keyword.
Return
return keyword.
Discard
discard keyword.
True
true keyword.
False
false keyword.
Float
float type.
Int
int type.
Bool
bool type.
Vec2
vec2 type.
Vec3
vec3 type.
Vec4
vec4 type.
Mat2
mat2 type.
Mat3
mat3 type.
Mat4
mat4 type.
Sampler2D
sampler2D type.
SamplerCube
samplerCube type.
Void
void type.
Identifier
An identifier.
Number
A number literal.
String
A string literal.
Plus
+.
Minus
-.
Star
*.
Slash
/.
Percent
%.
Assign
=.
PlusAssign
+=.
MinusAssign
-=.
StarAssign
*=.
SlashAssign
/=.
Eq
==.
Ne
!=.
Lt
<.
Le
<=.
Gt
>.
Ge
>=.
And
&&.
Or
||.
Not
!.
BitAnd
&.
BitOr
|.
BitXor
^.
BitNot
~.
LeftShift
<<.
RightShift
>>.
LeftParen
(.
RightParen
).
LeftBrace
{.
RightBrace
}.
LeftBracket
[.
RightBracket
].
Semicolon
;.
Comma
,.
Dot
..
Colon
:.
Question
?.
Hash
#.
At
@.
Preprocessor
Preprocessor directive.
Include
#include.
Define
#define.
Ifdef
#ifdef.
Ifndef
#ifndef.
Endif
#endif.
Version
#version.
Sin
sin function.
Cos
cos function.
Tan
tan function.
Sqrt
sqrt function.
Pow
pow function.
Exp
exp function.
Log
log function.
Abs
abs function.
Sign
sign function.
Floor
floor function.
Ceil
ceil function.
Fract
fract function.
Mod
mod function.
Min
min function.
Max
max function.
Clamp
clamp function.
Mix
mix function.
Step
step function.
Smoothstep
smoothstep function.
Length
length function.
Distance
distance function.
DotProduct
dot function.
Cross
cross function.
Normalize
normalize function.
Faceforward
faceforward function.
Reflect
reflect function.
Refract
refract function.
Whitespace
Whitespace.
Comment
A comment.
Newline
A newline.
Eof
End of stream.
Error
An error token.
FunctionDecl
A function declaration.
VariableDecl
A variable declaration.
StructDecl
A struct declaration.
Statement
A statement.
Expression
An expression.
Parameter
A parameter.
Argument
An argument.
FieldAccess
A field access.
ArrayAccess
An array access.
FunctionCall
A function call.
BinaryExpr
A binary expression.
UnaryExpr
A unary expression.
AssignmentExpr
An assignment expression.
ConditionalExpr
A conditional expression.
Literal
A literal.
Implementations§
Source§impl GsglElementType
impl GsglElementType
Sourcepub fn is_keyword(self) -> bool
pub fn is_keyword(self) -> bool
Checks if the kind is a keyword.
Sourcepub fn is_operator(self) -> bool
pub fn is_operator(self) -> bool
Checks if the kind is an operator.
Trait Implementations§
Source§impl Clone for GsglElementType
impl Clone for GsglElementType
Source§fn clone(&self) -> GsglElementType
fn clone(&self) -> GsglElementType
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more