pub enum SyntaxType {
Show 25 variants
Keyword,
Punctuation,
Operator,
Number,
Boolean,
Comment,
Parameter,
LayoutQualifier,
UncheckedIdent,
Ident,
UnresolvedIdent,
Invalid,
ObjectMacro,
FunctionMacro,
Directive,
DirectiveConcat,
DirectiveHash,
DirectiveName,
DirectiveVersion,
DirectiveProfile,
DirectiveExtName,
DirectiveExtBehaviour,
DirectiveLineNumber,
DirectiveError,
DirectivePragma,
}
Expand description
The type of syntax highlighting token.
For semantic highlighting purposes, any UncheckedIdent
tokens must be
name-resolved into a more concrete identifier type. This functionality is currently waiting on the analyzer
module.
Variants§
Keyword
A keyword.
Punctuation
A punctuation symbol.
Operator
An operator symbol.
Number
A number.
Boolean
A boolean.
Comment
A comment.
Parameter
A function or function-like macro parameter.
LayoutQualifier
A valid layout qualifier identifier.
UncheckedIdent
An identifier which has not gone through name resolution yet.
Ident
An identifier which has not gone through name resolution and never will. This token is only used for any identifiers within macro bodies.
UnresolvedIdent
An unresolved identifier. This could be an unresolved variable identifier, an unresolved type name, or an illegal layout qualifier identifier.
Invalid
An invalid character.
ObjectMacro
An object-like macro identifier. This is used at the macro definition, and at any call sites.
FunctionMacro
A function-like macro identifier. This is used at the macro definition, and at any call sites.
Directive
A general bit of text in a directive.
DirectiveConcat
The macro concatenation operator (##
).
DirectiveHash
The hash #
symbol in a directive.
DirectiveName
The name of the directive, e.g. version
or ifdef
.
DirectiveVersion
The GLSL version in a #version
directive.
DirectiveProfile
The GLSL profile in a #version
directive.
DirectiveExtName
The extension name in a #extension
directive.
DirectiveExtBehaviour
The extension behaviour in a #extension
directive.
DirectiveLineNumber
The line number in a #line
directive.
DirectiveError
The message in an #error
directive.
DirectivePragma
The compiler option in a #pragma
directive.
Trait Implementations§
Source§impl Clone for SyntaxType
impl Clone for SyntaxType
Source§fn clone(&self) -> SyntaxType
fn clone(&self) -> SyntaxType
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more