Skip to main content

CTokenType

Enum CTokenType 

Source
#[repr(u16)]
pub enum CTokenType {
Show 100 variants LeftParen = 0, RightParen = 1, LeftBracket = 2, RightBracket = 3, LeftBrace = 4, RightBrace = 5, Comma = 6, Semicolon = 7, Colon = 8, Dot = 9, Question = 10, Plus = 11, Minus = 12, Star = 13, Slash = 14, Percent = 15, Assign = 16, PlusAssign = 17, MinusAssign = 18, StarAssign = 19, SlashAssign = 20, PercentAssign = 21, Equal = 22, NotEqual = 23, Less = 24, Greater = 25, LessEqual = 26, GreaterEqual = 27, LogicalAnd = 28, LogicalOr = 29, LogicalNot = 30, BitAnd = 31, BitOr = 32, BitXor = 33, BitNot = 34, LeftShift = 35, RightShift = 36, AndAssign = 37, OrAssign = 38, XorAssign = 39, LeftShiftAssign = 40, RightShiftAssign = 41, Increment = 42, Decrement = 43, Arrow = 44, Auto = 45, Register = 46, Static = 47, Extern = 48, Typedef = 49, Void = 50, Char = 51, Short = 52, Int = 53, Long = 54, Float = 55, Double = 56, Signed = 57, Unsigned = 58, Struct = 59, Union = 60, Enum = 61, Const = 62, Volatile = 63, Restrict = 64, If = 65, Else = 66, Switch = 67, Case = 68, Default = 69, For = 70, While = 71, Do = 72, Break = 73, Continue = 74, Goto = 75, Return = 76, Sizeof = 77, Inline = 78, Bool = 79, Complex = 80, Imaginary = 81, Alignas = 82, Alignof = 83, Atomic = 84, StaticAssert = 85, ThreadLocal = 86, Generic = 87, Noreturn = 88, IntegerLiteral = 89, FloatLiteral = 90, CharLiteral = 91, StringLiteral = 92, Identifier = 93, Whitespace = 94, Comment = 95, PreprocessorDirective = 96, Text = 97, Error = 98, Eof = 99,
}

Variants§

§

LeftParen = 0

Left parenthesis: (

§

RightParen = 1

Right parenthesis: )

§

LeftBracket = 2

Left bracket: [

§

RightBracket = 3

Right bracket: ]

§

LeftBrace = 4

Left brace: {

§

RightBrace = 5

Right brace: }

§

Comma = 6

Comma: ,

§

Semicolon = 7

Semicolon: ;

§

Colon = 8

Colon: :

§

Dot = 9

Dot: .

§

Question = 10

Question mark: ?

§

Plus = 11

Addition operator: +

§

Minus = 12

Subtraction operator: -

§

Star = 13

Multiplication operator: *

§

Slash = 14

Division operator: /

§

Percent = 15

Modulo operator: %

§

Assign = 16

Assignment operator: =

§

PlusAssign = 17

Addition assignment: +=

§

MinusAssign = 18

Subtraction assignment: -=

§

StarAssign = 19

Multiplication assignment: *=

§

SlashAssign = 20

Division assignment: /=

§

PercentAssign = 21

Modulo assignment: %=

§

Equal = 22

Equality comparison: ==

§

NotEqual = 23

Inequality comparison: !=

§

Less = 24

Less than: <

§

Greater = 25

Greater than: >

§

LessEqual = 26

Less than or equal: <=

§

GreaterEqual = 27

Greater than or equal: >=

§

LogicalAnd = 28

Logical AND: &&

§

LogicalOr = 29

Logical OR: ||

§

LogicalNot = 30

Logical NOT: !

§

BitAnd = 31

Bitwise AND: &

§

BitOr = 32

Bitwise OR: |

§

BitXor = 33

Bitwise XOR: ^

§

BitNot = 34

Bitwise NOT: ~

§

LeftShift = 35

Left shift: <<

§

RightShift = 36

Right shift: >>

§

AndAssign = 37

Bitwise AND assignment: &=

§

OrAssign = 38

Bitwise OR assignment: |=

§

XorAssign = 39

Bitwise XOR assignment: ^=

§

LeftShiftAssign = 40

Left shift assignment: <<=

§

RightShiftAssign = 41

Right shift assignment: >>=

§

Increment = 42

Increment: ++

§

Decrement = 43

Decrement: --

§

Arrow = 44

Arrow operator: ->

§

Auto = 45

auto keyword

§

Register = 46

register keyword

§

Static = 47

static keyword

§

Extern = 48

extern keyword

§

Typedef = 49

typedef keyword

§

Void = 50

void keyword

§

Char = 51

char keyword

§

Short = 52

short keyword

§

Int = 53

int keyword

§

Long = 54

long keyword

§

Float = 55

float keyword

§

Double = 56

double keyword

§

Signed = 57

signed keyword

§

Unsigned = 58

unsigned keyword

§

Struct = 59

struct keyword

§

Union = 60

union keyword

§

Enum = 61

enum keyword

§

Const = 62

const keyword

§

Volatile = 63

volatile keyword

§

Restrict = 64

restrict keyword

§

If = 65

if keyword

§

Else = 66

else keyword

§

Switch = 67

switch keyword

§

Case = 68

case keyword

§

Default = 69

default keyword

§

For = 70

for keyword

§

While = 71

while keyword

§

Do = 72

do keyword

§

Break = 73

break keyword

§

Continue = 74

continue keyword

§

Goto = 75

goto keyword

§

Return = 76

return keyword

§

Sizeof = 77

sizeof keyword

§

Inline = 78

inline keyword

§

Bool = 79

_Bool keyword

§

Complex = 80

_Complex keyword

§

Imaginary = 81

_Imaginary keyword

§

Alignas = 82

_Alignas keyword

§

Alignof = 83

_Alignof keyword

§

Atomic = 84

_Atomic keyword

§

StaticAssert = 85

_Static_assert keyword

§

ThreadLocal = 86

_Thread_local keyword

§

Generic = 87

_Generic keyword

§

Noreturn = 88

_Noreturn keyword

§

IntegerLiteral = 89

Integer literal

§

FloatLiteral = 90

Floating-point literal

§

CharLiteral = 91

Character literal

§

StringLiteral = 92

String literal

§

Identifier = 93

Identifier

§

Whitespace = 94

Whitespace

§

Comment = 95

Comments

§

PreprocessorDirective = 96

Preprocessor directives

§

Text = 97

Text

§

Error = 98

Error token

§

Eof = 99

End of file marker

Implementations§

Trait Implementations§

Source§

impl Clone for CTokenType

Source§

fn clone(&self) -> CTokenType

Returns a duplicate 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 CTokenType

Source§

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

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

impl<'de> Deserialize<'de> for CTokenType

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl From<CTokenType> for CElementType

Source§

fn from(token: CTokenType) -> Self

Converts to this type from the input type.
Source§

impl Hash for CTokenType

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 CTokenType

Source§

fn cmp(&self, other: &CTokenType) -> 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,

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

impl PartialEq for CTokenType

Source§

fn eq(&self, other: &CTokenType) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialOrd for CTokenType

Source§

fn partial_cmp(&self, other: &CTokenType) -> 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

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

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

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

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl Serialize for CTokenType

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl TokenType for CTokenType

Source§

const END_OF_STREAM: Self = Self::Eof

A constant representing the end of the input stream. Read more
Source§

type Role = UniversalTokenRole

The associated role type for this token kind.
Source§

fn is_ignored(&self) -> bool

Returns true if this token represents trivia (whitespace, comments, etc.). Read more
Source§

fn is_comment(&self) -> bool

Returns true if this token represents a comment. Read more
Source§

fn is_whitespace(&self) -> bool

Returns true if this token represents whitespace. Read more
Source§

fn role(&self) -> Self::Role

Returns the general syntactic role of this token. Read more
Source§

fn is_role(&self, role: Self::Role) -> bool

Returns true if this token matches the specified language-specific role.
Source§

fn is_universal(&self, role: UniversalTokenRole) -> bool

Returns true if this token matches the specified universal role.
Source§

fn is_error(&self) -> bool

Returns true if this token represents an error condition. Read more
Source§

fn is_end_of_stream(&self) -> bool

Returns true if this token represents the end of the input stream. Read more
Source§

impl Copy for CTokenType

Source§

impl Eq for CTokenType

Source§

impl StructuralPartialEq for CTokenType

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

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

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>,

Source§

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>,

Source§

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.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,