Skip to main content

CSharpTokenType

Enum CSharpTokenType 

Source
pub enum CSharpTokenType {
Show 253 variants Whitespace, Newline, Comment, Identifier, Number, String, Character, VerbatimString, InterpolatedString, NumberLiteral, StringLiteral, CharLiteral, Abstract, As, Async, Await, Base, Bool, Break, Byte, Case, Catch, Char, Checked, Class, Const, Continue, Decimal, Default, Delegate, Do, Double, Else, Enum, Event, Explicit, Extern, False, Finally, Fixed, Float, For, Foreach, Goto, If, Implicit, In, Int, Interface, Internal, Is, Lock, Long, Namespace, New, Null, Object, Operator, Out, Override, Params, Private, Protected, Public, Readonly, Record, Ref, Return, Sbyte, Sealed, Short, Sizeof, Stackalloc, Static, Struct, Switch, This, Throw, True, Try, Typeof, Uint, Ulong, Unchecked, Unsafe, Ushort, Using, Virtual, Void, Volatile, While, AbstractKeyword, AsKeyword, AsyncKeyword, AwaitKeyword, BaseKeyword, BoolKeyword, BreakKeyword, ByteKeyword, CaseKeyword, CatchKeyword, CharKeyword, CheckedKeyword, ClassKeyword, ConstKeyword, ContinueKeyword, DecimalKeyword, DefaultKeyword, DelegateKeyword, DoKeyword, DoubleKeyword, ElseKeyword, EnumKeyword, EventKeyword, ExplicitKeyword, ExternKeyword, FalseKeyword, FinallyKeyword, FixedKeyword, FloatKeyword, ForKeyword, ForeachKeyword, GotoKeyword, IfKeyword, ImplicitKeyword, InKeyword, IntKeyword, InterfaceKeyword, InternalKeyword, IsKeyword, LockKeyword, LongKeyword, NamespaceKeyword, NewKeyword, NullKeyword, ObjectKeyword, OperatorKeyword, OutKeyword, OverrideKeyword, ParamsKeyword, PrivateKeyword, ProtectedKeyword, PublicKeyword, ReadonlyKeyword, RefKeyword, ReturnKeyword, SbyteKeyword, SealedKeyword, ShortKeyword, SizeofKeyword, StackallocKeyword, StaticKeyword, StringKeyword, StructKeyword, SwitchKeyword, ThisKeyword, ThrowKeyword, TrueKeyword, TryKeyword, TypeofKeyword, UintKeyword, UlongKeyword, UncheckedKeyword, UnsafeKeyword, UshortKeyword, UsingKeyword, VirtualKeyword, VoidKeyword, VolatileKeyword, WhileKeyword, AddKeyword, AliasKeyword, AscendingKeyword, ByKeyword, DescendingKeyword, FromKeyword, GetKeyword, GlobalKeyword, GroupKeyword, IntoKeyword, JoinKeyword, LetKeyword, OrderbyKeyword, PartialKeyword, RemoveKeyword, SelectKeyword, SetKeyword, ValueKeyword, VarKeyword, WhereKeyword, YieldKeyword, Plus, Minus, Star, Slash, Percent, Ampersand, Pipe, Caret, Tilde, BitAnd, BitOr, BitXor, BitNot, LeftShift, RightShift, Equal, NotEqual, Less, LessEqual, Greater, GreaterEqual, LogicalAnd, LogicalOr, LogicalNot, Question, QuestionQuestion, Increment, Decrement, Arrow, Lambda, Assign, PlusAssign, MinusAssign, StarAssign, SlashAssign, PercentAssign, AmpersandAssign, PipeAssign, CaretAssign, LeftShiftAssign, RightShiftAssign, QuestionQuestionAssign, AndAssign, OrAssign, XorAssign, LeftParen, RightParen, LeftBracket, RightBracket, LeftBrace, RightBrace, Comma, Semicolon, Colon, ColonColon, Dot, QuestionDot, At, Hash, Dollar, Eof, Error,
}
Expand description

Token types for the C# language.

Variants§

§

Whitespace

Whitespace characters.

§

Newline

Line breaks.

§

Comment

Comments.

§

Identifier

An identifier.

§

Number

A numeric literal.

§

String

A string literal.

§

Character

A character literal.

§

VerbatimString

A verbatim string literal.

§

InterpolatedString

An interpolated string literal.

§

NumberLiteral

A number literal (generic).

§

StringLiteral

A string literal (generic).

§

CharLiteral

A character literal (generic).

§

Abstract

The abstract keyword.

§

As

The as keyword.

§

Async

The async keyword.

§

Await

The await keyword.

§

Base

The base keyword.

§

Bool

The bool keyword.

§

Break

The break keyword.

§

Byte

The byte keyword.

§

Case

The case keyword.

§

Catch

The catch keyword.

§

Char

The char keyword.

§

Checked

The checked keyword.

§

Class

The class keyword.

§

Const

The const keyword.

§

Continue

The continue keyword.

§

Decimal

The decimal keyword.

§

Default

The default keyword.

§

Delegate

The delegate keyword.

§

Do

The do keyword.

§

Double

The double keyword.

§

Else

The else keyword.

§

Enum

The enum keyword.

§

Event

The event keyword.

§

Explicit

The explicit keyword.

§

Extern

The extern keyword.

§

False

The false keyword.

§

Finally

The finally keyword.

§

Fixed

The fixed keyword.

§

Float

The float keyword.

§

For

The for keyword.

§

Foreach

The foreach keyword.

§

Goto

The goto keyword.

§

If

The if keyword.

§

Implicit

The implicit keyword.

§

In

The in keyword.

§

Int

The int keyword.

§

Interface

The interface keyword.

§

Internal

The internal keyword.

§

Is

The is keyword.

§

Lock

The lock keyword.

§

Long

The long keyword.

§

Namespace

The namespace keyword.

§

New

The new keyword.

§

Null

The null keyword.

§

Object

The object keyword.

§

Operator

The operator keyword.

§

Out

The out keyword.

§

Override

The override keyword.

§

Params

The params keyword.

§

Private

The private keyword.

§

Protected

The protected keyword.

§

Public

The public keyword.

§

Readonly

The readonly keyword.

§

Record

The record keyword.

§

Ref

The ref keyword.

§

Return

The return keyword.

§

Sbyte

The sbyte keyword.

§

Sealed

The sealed keyword.

§

Short

The short keyword.

§

Sizeof

The sizeof keyword.

§

Stackalloc

The stackalloc keyword.

§

Static

The static keyword.

§

Struct

The struct keyword.

§

Switch

The switch keyword.

§

This

The this keyword.

§

Throw

The throw keyword.

§

True

The true keyword.

§

Try

The try keyword.

§

Typeof

The typeof keyword.

§

Uint

The uint keyword.

§

Ulong

The ulong keyword.

§

Unchecked

The unchecked keyword.

§

Unsafe

The unsafe keyword.

§

Ushort

The ushort keyword.

§

Using

The using keyword.

§

Virtual

The virtual keyword.

§

Void

The void keyword.

§

Volatile

The volatile keyword.

§

While

The while keyword.

§

AbstractKeyword

Variant of abstract keyword.

§

AsKeyword

Variant of as keyword.

§

AsyncKeyword

Variant of async keyword.

§

AwaitKeyword

Variant of await keyword.

§

BaseKeyword

Variant of base keyword.

§

BoolKeyword

Variant of bool keyword.

§

BreakKeyword

Variant of break keyword.

§

ByteKeyword

Variant of byte keyword.

§

CaseKeyword

Variant of case keyword.

§

CatchKeyword

Variant of catch keyword.

§

CharKeyword

Variant of char keyword.

§

CheckedKeyword

Variant of checked keyword.

§

ClassKeyword

Variant of class keyword.

§

ConstKeyword

Variant of const keyword.

§

ContinueKeyword

Variant of continue keyword.

§

DecimalKeyword

Variant of decimal keyword.

§

DefaultKeyword

Variant of default keyword.

§

DelegateKeyword

Variant of delegate keyword.

§

DoKeyword

Variant of do keyword.

§

DoubleKeyword

Variant of double keyword.

§

ElseKeyword

Variant of else keyword.

§

EnumKeyword

Variant of enum keyword.

§

EventKeyword

Variant of event keyword.

§

ExplicitKeyword

Variant of explicit keyword.

§

ExternKeyword

Variant of extern keyword.

§

FalseKeyword

Variant of false keyword.

§

FinallyKeyword

Variant of finally keyword.

§

FixedKeyword

Variant of fixed keyword.

§

FloatKeyword

Variant of float keyword.

§

ForKeyword

Variant of for keyword.

§

ForeachKeyword

Variant of foreach keyword.

§

GotoKeyword

Variant of goto keyword.

§

IfKeyword

Variant of if keyword.

§

ImplicitKeyword

Variant of implicit keyword.

§

InKeyword

Variant of in keyword.

§

IntKeyword

Variant of int keyword.

§

InterfaceKeyword

Variant of interface keyword.

§

InternalKeyword

Variant of internal keyword.

§

IsKeyword

Variant of is keyword.

§

LockKeyword

Variant of lock keyword.

§

LongKeyword

Variant of long keyword.

§

NamespaceKeyword

Variant of namespace keyword.

§

NewKeyword

Variant of new keyword.

§

NullKeyword

Variant of null keyword.

§

ObjectKeyword

Variant of object keyword.

§

OperatorKeyword

Variant of operator keyword.

§

OutKeyword

Variant of out keyword.

§

OverrideKeyword

Variant of override keyword.

§

ParamsKeyword

Variant of params keyword.

§

PrivateKeyword

Variant of private keyword.

§

ProtectedKeyword

Variant of protected keyword.

§

PublicKeyword

Variant of public keyword.

§

ReadonlyKeyword

Variant of readonly keyword.

§

RefKeyword

Variant of ref keyword.

§

ReturnKeyword

Variant of return keyword.

§

SbyteKeyword

Variant of sbyte keyword.

§

SealedKeyword

Variant of sealed keyword.

§

ShortKeyword

Variant of short keyword.

§

SizeofKeyword

Variant of sizeof keyword.

§

StackallocKeyword

Variant of stackalloc keyword.

§

StaticKeyword

Variant of static keyword.

§

StringKeyword

Variant of string keyword.

§

StructKeyword

Variant of struct keyword.

§

SwitchKeyword

Variant of switch keyword.

§

ThisKeyword

Variant of this keyword.

§

ThrowKeyword

Variant of throw keyword.

§

TrueKeyword

Variant of true keyword.

§

TryKeyword

Variant of try keyword.

§

TypeofKeyword

Variant of typeof keyword.

§

UintKeyword

Variant of uint keyword.

§

UlongKeyword

Variant of ulong keyword.

§

UncheckedKeyword

Variant of unchecked keyword.

§

UnsafeKeyword

Variant of unsafe keyword.

§

UshortKeyword

Variant of ushort keyword.

§

UsingKeyword

Variant of using keyword.

§

VirtualKeyword

Variant of virtual keyword.

§

VoidKeyword

Variant of void keyword.

§

VolatileKeyword

Variant of volatile keyword.

§

WhileKeyword

Variant of while keyword.

§

AddKeyword

The add keyword (contextual).

§

AliasKeyword

The alias keyword (contextual).

§

AscendingKeyword

The ascending keyword (contextual).

§

ByKeyword

The by keyword (contextual).

§

DescendingKeyword

The descending keyword (contextual).

§

FromKeyword

The from keyword (contextual).

§

GetKeyword

The get keyword (contextual).

§

GlobalKeyword

The global keyword (contextual).

§

GroupKeyword

The group keyword (contextual).

§

IntoKeyword

The into keyword (contextual).

§

JoinKeyword

The join keyword (contextual).

§

LetKeyword

The let keyword (contextual).

§

OrderbyKeyword

The orderby keyword (contextual).

§

PartialKeyword

The partial keyword (contextual).

§

RemoveKeyword

The remove keyword (contextual).

§

SelectKeyword

The select keyword (contextual).

§

SetKeyword

The set keyword (contextual).

§

ValueKeyword

The value keyword (contextual).

§

VarKeyword

The var keyword (contextual).

§

WhereKeyword

The where keyword (contextual).

§

YieldKeyword

The yield keyword (contextual).

§

Plus

The + operator.

§

Minus

The - operator.

§

Star

The * operator.

§

Slash

The / operator.

§

Percent

The % operator.

§

Ampersand

The & operator.

§

Pipe

The | operator.

§

Caret

The ^ operator.

§

Tilde

The ~ operator.

§

BitAnd

Bitwise AND operator.

§

BitOr

Bitwise OR operator.

§

BitXor

Bitwise XOR operator.

§

BitNot

Bitwise NOT operator.

§

LeftShift

Left shift operator (<<).

§

RightShift

Right shift operator (>>).

§

Equal

Equality operator (==).

§

NotEqual

Inequality operator (!=).

§

Less

Less than operator (<).

§

LessEqual

Less than or equal operator (<=).

§

Greater

Greater than operator (>).

§

GreaterEqual

Greater than or equal operator (>=).

§

LogicalAnd

Logical AND operator (&&).

§

LogicalOr

Logical OR operator (||).

§

LogicalNot

Logical NOT operator (!).

§

Question

Question mark (?).

§

QuestionQuestion

Null-coalescing operator (??).

§

Increment

Increment operator (++).

§

Decrement

Decrement operator (--).

§

Arrow

Arrow operator (->).

§

Lambda

Lambda operator (=>).

§

Assign

Simple assignment operator (=).

§

PlusAssign

Addition assignment operator (+=).

§

MinusAssign

Subtraction assignment operator (-=).

§

StarAssign

Multiplication assignment operator (*=).

§

SlashAssign

Division assignment operator (/=).

§

PercentAssign

Modulo assignment operator (%=).

§

AmpersandAssign

Bitwise AND assignment operator (&=).

§

PipeAssign

Bitwise OR assignment operator (|=).

§

CaretAssign

Bitwise XOR assignment operator (^=).

§

LeftShiftAssign

Left shift assignment operator (<<=).

§

RightShiftAssign

Right shift assignment operator (>>=).

§

QuestionQuestionAssign

Null-coalescing assignment operator (??=).

§

AndAssign

Logical AND assignment operator (&&=).

§

OrAssign

Logical OR assignment operator (||=).

§

XorAssign

Logical XOR assignment operator (^=).

§

LeftParen

Opening parenthesis (().

§

RightParen

Closing parenthesis ()).

§

LeftBracket

Opening bracket ([).

§

RightBracket

Closing bracket (]).

§

LeftBrace

Opening brace ({).

§

RightBrace

Closing brace (}).

§

Comma

Comma (,).

§

Semicolon

Semicolon (;).

§

Colon

Colon (:).

§

ColonColon

Double colon (::).

§

Dot

Dot (.).

§

QuestionDot

Null-conditional operator (?.).

§

At

At sign (@).

§

Hash

Hash sign (#).

§

Dollar

Dollar sign ($).

§

Eof

End of file.

§

Error

An error token.

Implementations§

Source§

impl CSharpTokenType

Source

pub fn is_keyword(&self) -> bool

Returns true if the token type is a keyword.

Trait Implementations§

Source§

impl Clone for CSharpTokenType

Source§

fn clone(&self) -> CSharpTokenType

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 CSharpTokenType

Source§

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

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

impl<'de> Deserialize<'de> for CSharpTokenType

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<CSharpTokenType> for CSharpElementType

Source§

fn from(token: CSharpTokenType) -> Self

Converts to this type from the input type.
Source§

impl Hash for CSharpTokenType

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 CSharpTokenType

Source§

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

Source§

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

Source§

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

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 CSharpTokenType

Source§

const END_OF_STREAM: Self = Self::Eof

A constant representing the end of the input stream.
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.).
Source§

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

Returns the general syntactic role of this token.
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_comment(&self) -> bool

Returns true if this token represents a comment.
Source§

fn is_whitespace(&self) -> bool

Returns true if this token represents whitespace.
Source§

fn is_error(&self) -> bool

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

fn is_end_of_stream(&self) -> bool

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

impl Copy for CSharpTokenType

Source§

impl Eq for CSharpTokenType

Source§

impl StructuralPartialEq for CSharpTokenType

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