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

source

pub fn is_whitespace(&self) -> bool

source

pub fn is_trivia(&self) -> bool

source

pub fn is_newline(&self) -> bool

source

pub fn paste(lhs: Self, rhs: Self) -> Self

Trait Implementations§

source§

impl Clone for SyntaxKind

source§

fn clone(&self) -> SyntaxKind

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 SyntaxKind

source§

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

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

impl From<SyntaxKind> for SyntaxKind

source§

fn from(kind: SyntaxKind) -> Self

Converts to this type from the input type.
source§

impl From<Token> for SyntaxKind

source§

fn from(s: Token) -> Self

Converts to this type from the input type.
source§

impl Hash for SyntaxKind

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl Ord for SyntaxKind

source§

fn cmp(&self, other: &SyntaxKind) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
source§

impl PartialEq for SyntaxKind

source§

fn eq(&self, other: &SyntaxKind) -> 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 PartialOrd for SyntaxKind

source§

fn partial_cmp(&self, other: &SyntaxKind) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

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

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

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

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

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

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

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

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl Copy for SyntaxKind

source§

impl Eq for SyntaxKind

source§

impl StructuralPartialEq for SyntaxKind

Auto Trait Implementations§

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

source§

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

Mutably borrows from an owned value. Read more
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. 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 T
where 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> IntoEither for T

source§

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 more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
source§

impl<T> ToOwned for T
where 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, U> TryFrom<U> for T
where 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 T
where 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.