Enum glsl_lang_pp::parser::syntax_kind::SyntaxKind
source · #[repr(u16)]pub enum SyntaxKind {
Show 86 variants
IDENT_KW = 1,
DEFINED = 2,
DIGITS = 3,
PERIOD = 4,
PLUS = 5,
DASH = 6,
SLASH = 7,
ASTERISK = 8,
PERCENT = 9,
LANGLE = 10,
RANGLE = 11,
LBRACKET = 12,
RBRACKET = 13,
LPAREN = 14,
RPAREN = 15,
LBRACE = 16,
RBRACE = 17,
CARET = 18,
BAR = 19,
AMPERSAND = 20,
TILDE = 21,
EQUAL = 22,
BANG = 23,
COLON = 24,
SEMICOLON = 25,
COMMA = 26,
QUESTION = 27,
HASH = 28,
QUOTE_STRING = 29,
ANGLE_STRING = 30,
BACKSLASH = 31,
WS = 32,
NEWLINE = 33,
COMMENT = 34,
ERROR = 36,
LEFT_OP = 37,
RIGHT_OP = 38,
INC_OP = 39,
DEC_OP = 40,
LE_OP = 41,
GE_OP = 42,
EQ_OP = 43,
NE_OP = 44,
AND_OP = 45,
OR_OP = 46,
XOR_OP = 47,
MUL_ASSIGN = 48,
DIV_ASSIGN = 49,
ADD_ASSIGN = 50,
MOD_ASSIGN = 51,
LEFT_ASSIGN = 52,
RIGHT_ASSIGN = 53,
AND_ASSIGN = 54,
XOR_ASSIGN = 55,
OR_ASSIGN = 56,
SUB_ASSIGN = 57,
PP_CONCAT_OP = 58,
PP_CONCAT = 59,
PP_EMPTY = 60,
PP_INCLUDE = 61,
PP_INCLUDE_PATH = 62,
PP_DEFINE = 63,
PP_DEFINE_ARGS = 64,
PP_DEFINE_ARG = 65,
PP_DEFINE_BODY = 66,
PP_UNDEF = 67,
PP_IDENT = 68,
PP_IF = 69,
PP_IF_EXPR = 70,
PP_IFDEF = 71,
PP_IFNDEF = 72,
PP_ELSE = 73,
PP_ELIF = 74,
PP_ENDIF = 75,
PP_ERROR = 76,
PP_ERROR_BODY = 77,
PP_PRAGMA = 78,
PP_PRAGMA_BODY = 79,
PP_EXTENSION = 80,
PP_VERSION = 81,
PP_VERSION_NUMBER = 82,
PP_VERSION_PROFILE = 83,
PP_LINE = 84,
PP_LINE_BODY = 85,
ROOT = 86,
_LAST = 87,
}
Variants§
IDENT_KW = 1
Identifier or keyword
DEFINED = 2
defined preprocessor keyword
DIGITS = 3
Digit sequence
PERIOD = 4
.
PLUS = 5
DASH = 6
SLASH = 7
/
ASTERISK = 8
PERCENT = 9
%
LANGLE = 10
<
RANGLE = 11
LBRACKET = 12
[
RBRACKET = 13
]
LPAREN = 14
(
RPAREN = 15
)
LBRACE = 16
{
RBRACE = 17
}
CARET = 18
^
BAR = 19
|
AMPERSAND = 20
&
TILDE = 21
~
EQUAL = 22
=
BANG = 23
!
COLON = 24
:
SEMICOLON = 25
;
COMMA = 26
,
QUESTION = 27
?
HASH = 28
QUOTE_STRING = 29
“string”
ANGLE_STRING = 30
BACKSLASH = 31
\
WS = 32
Whitespace
NEWLINE = 33
Newline
COMMENT = 34
Comment (single-line or multi-line)
ERROR = 36
Invalid token
LEFT_OP = 37
<<
RIGHT_OP = 38
INC_OP = 39
++
DEC_OP = 40
–
LE_OP = 41
<=
GE_OP = 42
=
EQ_OP = 43
==
NE_OP = 44
!=
AND_OP = 45
&&
OR_OP = 46
||
XOR_OP = 47
^^
MUL_ASSIGN = 48
*=
DIV_ASSIGN = 49
/=
ADD_ASSIGN = 50
+=
MOD_ASSIGN = 51
%=
LEFT_ASSIGN = 52
<<=
RIGHT_ASSIGN = 53
=
AND_ASSIGN = 54
&=
XOR_ASSIGN = 55
^=
OR_ASSIGN = 56
|=
SUB_ASSIGN = 57
-=
PP_CONCAT_OP = 58
PP_CONCAT = 59
Concatenation expression
PP_EMPTY = 60
PP_INCLUDE = 61
#include
PP_INCLUDE_PATH = 62
#include path
PP_DEFINE = 63
#define
PP_DEFINE_ARGS = 64
PP_DEFINE_ARG = 65
PP_DEFINE_BODY = 66
PP_UNDEF = 67
#undef
PP_IDENT = 68
PP_IF = 69
#if
PP_IF_EXPR = 70
PP_IFDEF = 71
#ifdef
PP_IFNDEF = 72
#ifndef
PP_ELSE = 73
#else
PP_ELIF = 74
#elif
PP_ENDIF = 75
#endif
PP_ERROR = 76
#error
PP_ERROR_BODY = 77
#error body
PP_PRAGMA = 78
#pragma
PP_PRAGMA_BODY = 79
#pragma body
PP_EXTENSION = 80
#extension
PP_VERSION = 81
#version
PP_VERSION_NUMBER = 82
PP_VERSION_PROFILE = 83
PP_LINE = 84
#line
PP_LINE_BODY = 85
#line body
ROOT = 86
AST root
_LAST = 87
Implementations§
source§impl SyntaxKind
impl SyntaxKind
Trait Implementations§
source§impl Clone for SyntaxKind
impl Clone for SyntaxKind
source§fn clone(&self) -> SyntaxKind
fn clone(&self) -> SyntaxKind
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for SyntaxKind
impl Debug for SyntaxKind
source§impl From<SyntaxKind> for SyntaxKind
impl From<SyntaxKind> for SyntaxKind
source§fn from(kind: SyntaxKind) -> Self
fn from(kind: SyntaxKind) -> Self
Converts to this type from the input type.
source§impl From<Token> for SyntaxKind
impl From<Token> for SyntaxKind
source§impl Hash for SyntaxKind
impl Hash for SyntaxKind
source§impl Ord for SyntaxKind
impl Ord for SyntaxKind
source§fn cmp(&self, other: &SyntaxKind) -> Ordering
fn cmp(&self, other: &SyntaxKind) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq for SyntaxKind
impl PartialEq for SyntaxKind
source§impl PartialOrd for SyntaxKind
impl PartialOrd for SyntaxKind
impl Copy for SyntaxKind
impl Eq for SyntaxKind
impl StructuralPartialEq for SyntaxKind
Auto Trait Implementations§
impl Freeze for SyntaxKind
impl RefUnwindSafe for SyntaxKind
impl Send for SyntaxKind
impl Sync for SyntaxKind
impl Unpin for SyntaxKind
impl UnwindSafe for SyntaxKind
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
)§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
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