Skip to main content

TypeScriptTokenType

Enum TypeScriptTokenType 

Source
#[repr(u16)]
pub enum TypeScriptTokenType {
Show 244 variants NamedImports = 0, Decorator = 1, ArrowFunction = 2, PredefinedType = 3, Abstract = 4, Any = 5, As = 6, Asserts = 7, Async = 8, Await = 9, Boolean = 10, Break = 11, Case = 12, Catch = 13, Class = 14, Const = 15, Constructor = 16, Continue = 17, Debugger = 18, Declare = 19, Default = 20, Delete = 21, Do = 22, Else = 23, Enum = 24, Export = 25, Extends = 26, False = 27, Finally = 28, For = 29, From = 30, Function = 31, Get = 32, Global = 33, If = 34, Implements = 35, Import = 36, In = 37, Infer = 38, Instanceof = 39, Interface = 40, Is = 41, Keyof = 42, Let = 43, Namespace = 44, Never = 45, New = 46, Null = 47, Number = 48, Object = 49, Of = 50, Override = 51, Package = 52, Private = 53, Protected = 54, Public = 55, Readonly = 56, Require = 57, Return = 58, Set = 59, Static = 60, String = 61, Super = 62, Switch = 63, Symbol = 64, This = 65, Throw = 66, True = 67, Try = 68, Type = 69, Typeof = 70, Undefined = 71, Unique = 72, Unknown = 73, Var = 74, Void = 75, While = 76, With = 77, Yield = 78, Plus = 79, Minus = 80, Star = 81, Slash = 82, Percent = 83, StarStar = 84, Question = 85, DotDotDot = 86, Less = 87, Greater = 88, LessEqual = 89, GreaterEqual = 90, EqualEqual = 91, NotEqual = 92, EqualEqualEqual = 93, NotEqualEqual = 94, AmpersandAmpersand = 95, PipePipe = 96, Exclamation = 97, Ampersand = 98, Pipe = 99, Caret = 100, Tilde = 101, LeftShift = 102, RightShift = 103, UnsignedRightShift = 104, Equal = 105, PlusEqual = 106, MinusEqual = 107, StarEqual = 108, SlashEqual = 109, PercentEqual = 110, StarStarEqual = 111, LeftShiftEqual = 112, RightShiftEqual = 113, UnsignedRightShiftEqual = 114, AmpersandEqual = 115, PipeEqual = 116, CaretEqual = 117, AmpersandAmpersandEqual = 118, PipePipeEqual = 119, QuestionQuestionEqual = 120, PlusPlus = 121, MinusMinus = 122, QuestionQuestion = 123, QuestionDot = 124, Arrow = 125, LeftParen = 126, RightParen = 127, LeftBrace = 128, RightBrace = 129, LeftBracket = 130, RightBracket = 131, Semicolon = 132, Comma = 133, Dot = 134, Colon = 135, At = 136, StringLiteral = 137, NumericLiteral = 138, BigIntLiteral = 139, BooleanLiteral = 140, TemplateString = 141, RegexLiteral = 142, IdentifierName = 143, LineComment = 144, BlockComment = 145, Whitespace = 146, Newline = 147, Eof = 148, Root = 149, SourceFile = 150, Module = 151, VariableDeclaration = 152, FunctionDeclaration = 153, ClassDeclaration = 154, InterfaceDeclaration = 155, TypeAliasDeclaration = 156, EnumDeclaration = 157, NamespaceDeclaration = 158, ClassBody = 159, ImportDeclaration = 160, ExportDeclaration = 161, ImportClause = 162, ImportSpecifier = 163, Parameter = 164, CallArgument = 165, PropertyDeclaration = 166, MethodDeclaration = 167, ConstructorDeclaration = 168, PropertyAssignment = 169, ShorthandPropertyAssignment = 170, SpreadElement = 171, Error = 172, JsxElement = 173, JsxSelfClosingElement = 174, JsxOpeningElement = 175, JsxClosingElement = 176, JsxFragment = 177, JsxOpeningFragment = 178, JsxClosingFragment = 179, JsxAttribute = 180, JsxAttributes = 181, JsxExpressionContainer = 182, JsxSpreadAttribute = 183, JsxText = 184, BinaryExpression = 185, UnaryExpression = 186, ConditionalExpression = 187, CallExpression = 188, NewExpression = 189, MemberExpression = 190, ArrayExpression = 191, ObjectExpression = 192, FunctionExpression = 193, TemplateExpression = 194, TaggedTemplateExpression = 195, AsExpression = 196, TypeAssertionExpression = 197, NonNullExpression = 198, UpdateExpression = 199, ExpressionStatement = 200, BlockStatement = 201, IfStatement = 202, WhileStatement = 203, ForStatement = 204, ForInStatement = 205, ForOfStatement = 206, DoWhileStatement = 207, SwitchStatement = 208, CaseClause = 209, DefaultClause = 210, TryStatement = 211, CatchClause = 212, FinallyClause = 213, ThrowStatement = 214, ReturnStatement = 215, BreakStatement = 216, ContinueStatement = 217, DebuggerStatement = 218, WithStatement = 219, BindingPattern = 220, ArrayBindingPattern = 221, ObjectBindingPattern = 222, BindingElement = 223, TypeReference = 224, TypeLiteral = 225, FunctionType = 226, ConstructorType = 227, ArrayType = 228, TupleType = 229, UnionType = 230, IntersectionType = 231, ConditionalType = 232, MappedType = 233, IndexedAccessType = 234, PropertySignature = 235, MethodSignature = 236, LiteralType = 237, TypeQuery = 238, TypePredicate = 239, TypeAnnotation = 240, TypeParameter = 241, HeritageClause = 242, EnumMember = 243,
}

Variants§

§

NamedImports = 0

§

Decorator = 1

§

ArrowFunction = 2

§

PredefinedType = 3

§

Abstract = 4

§

Any = 5

§

As = 6

§

Asserts = 7

§

Async = 8

§

Await = 9

§

Boolean = 10

§

Break = 11

§

Case = 12

§

Catch = 13

§

Class = 14

§

Const = 15

§

Constructor = 16

§

Continue = 17

§

Debugger = 18

§

Declare = 19

§

Default = 20

§

Delete = 21

§

Do = 22

§

Else = 23

§

Enum = 24

§

Export = 25

§

Extends = 26

§

False = 27

§

Finally = 28

§

For = 29

§

From = 30

§

Function = 31

§

Get = 32

§

Global = 33

§

If = 34

§

Implements = 35

§

Import = 36

§

In = 37

§

Infer = 38

§

Instanceof = 39

§

Interface = 40

§

Is = 41

§

Keyof = 42

§

Let = 43

§

Namespace = 44

§

Never = 45

§

New = 46

§

Null = 47

§

Number = 48

§

Object = 49

§

Of = 50

§

Override = 51

§

Package = 52

§

Private = 53

§

Protected = 54

§

Public = 55

§

Readonly = 56

§

Require = 57

§

Return = 58

§

Set = 59

§

Static = 60

§

String = 61

§

Super = 62

§

Switch = 63

§

Symbol = 64

§

This = 65

§

Throw = 66

§

True = 67

§

Try = 68

§

Type = 69

§

Typeof = 70

§

Undefined = 71

§

Unique = 72

§

Unknown = 73

§

Var = 74

§

Void = 75

§

While = 76

§

With = 77

§

Yield = 78

§

Plus = 79

§

Minus = 80

§

Star = 81

§

Slash = 82

§

Percent = 83

§

StarStar = 84

§

Question = 85

§

DotDotDot = 86

§

Less = 87

§

Greater = 88

§

LessEqual = 89

§

GreaterEqual = 90

§

EqualEqual = 91

§

NotEqual = 92

§

EqualEqualEqual = 93

§

NotEqualEqual = 94

§

AmpersandAmpersand = 95

§

PipePipe = 96

§

Exclamation = 97

§

Ampersand = 98

§

Pipe = 99

§

Caret = 100

§

Tilde = 101

§

LeftShift = 102

§

RightShift = 103

§

UnsignedRightShift = 104

§

Equal = 105

§

PlusEqual = 106

§

MinusEqual = 107

§

StarEqual = 108

§

SlashEqual = 109

§

PercentEqual = 110

§

StarStarEqual = 111

§

LeftShiftEqual = 112

§

RightShiftEqual = 113

§

UnsignedRightShiftEqual = 114

§

AmpersandEqual = 115

§

PipeEqual = 116

§

CaretEqual = 117

§

AmpersandAmpersandEqual = 118

§

PipePipeEqual = 119

§

QuestionQuestionEqual = 120

§

PlusPlus = 121

§

MinusMinus = 122

§

QuestionQuestion = 123

§

QuestionDot = 124

§

Arrow = 125

§

LeftParen = 126

§

RightParen = 127

§

LeftBrace = 128

§

RightBrace = 129

§

LeftBracket = 130

§

RightBracket = 131

§

Semicolon = 132

§

Comma = 133

§

Dot = 134

§

Colon = 135

§

At = 136

§

StringLiteral = 137

§

NumericLiteral = 138

§

BigIntLiteral = 139

§

BooleanLiteral = 140

§

TemplateString = 141

§

RegexLiteral = 142

§

IdentifierName = 143

§

LineComment = 144

§

BlockComment = 145

§

Whitespace = 146

§

Newline = 147

§

Eof = 148

§

Root = 149

§

SourceFile = 150

§

Module = 151

§

VariableDeclaration = 152

§

FunctionDeclaration = 153

§

ClassDeclaration = 154

§

InterfaceDeclaration = 155

§

TypeAliasDeclaration = 156

§

EnumDeclaration = 157

§

NamespaceDeclaration = 158

§

ClassBody = 159

§

ImportDeclaration = 160

§

ExportDeclaration = 161

§

ImportClause = 162

§

ImportSpecifier = 163

§

Parameter = 164

§

CallArgument = 165

§

PropertyDeclaration = 166

§

MethodDeclaration = 167

§

ConstructorDeclaration = 168

§

PropertyAssignment = 169

§

ShorthandPropertyAssignment = 170

§

SpreadElement = 171

§

Error = 172

§

JsxElement = 173

§

JsxSelfClosingElement = 174

§

JsxOpeningElement = 175

§

JsxClosingElement = 176

§

JsxFragment = 177

§

JsxOpeningFragment = 178

§

JsxClosingFragment = 179

§

JsxAttribute = 180

§

JsxAttributes = 181

§

JsxExpressionContainer = 182

§

JsxSpreadAttribute = 183

§

JsxText = 184

§

BinaryExpression = 185

§

UnaryExpression = 186

§

ConditionalExpression = 187

§

CallExpression = 188

§

NewExpression = 189

§

MemberExpression = 190

§

ArrayExpression = 191

§

ObjectExpression = 192

§

FunctionExpression = 193

§

TemplateExpression = 194

§

TaggedTemplateExpression = 195

§

AsExpression = 196

§

TypeAssertionExpression = 197

§

NonNullExpression = 198

§

UpdateExpression = 199

§

ExpressionStatement = 200

§

BlockStatement = 201

§

IfStatement = 202

§

WhileStatement = 203

§

ForStatement = 204

§

ForInStatement = 205

§

ForOfStatement = 206

§

DoWhileStatement = 207

§

SwitchStatement = 208

§

CaseClause = 209

§

DefaultClause = 210

§

TryStatement = 211

§

CatchClause = 212

§

FinallyClause = 213

§

ThrowStatement = 214

§

ReturnStatement = 215

§

BreakStatement = 216

§

ContinueStatement = 217

§

DebuggerStatement = 218

§

WithStatement = 219

§

BindingPattern = 220

§

ArrayBindingPattern = 221

§

ObjectBindingPattern = 222

§

BindingElement = 223

§

TypeReference = 224

§

TypeLiteral = 225

§

FunctionType = 226

§

ConstructorType = 227

§

ArrayType = 228

§

TupleType = 229

§

UnionType = 230

§

IntersectionType = 231

§

ConditionalType = 232

§

MappedType = 233

§

IndexedAccessType = 234

§

PropertySignature = 235

§

MethodSignature = 236

§

LiteralType = 237

§

TypeQuery = 238

§

TypePredicate = 239

§

TypeAnnotation = 240

§

TypeParameter = 241

§

HeritageClause = 242

§

EnumMember = 243

Implementations§

Trait Implementations§

Source§

impl Clone for TypeScriptTokenType

Source§

fn clone(&self) -> TypeScriptTokenType

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 TypeScriptTokenType

Source§

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

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

impl<'de> Deserialize<'de> for TypeScriptTokenType

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<TypeScriptTokenType> for TypeScriptElementType

Source§

fn from(token: TypeScriptTokenType) -> Self

Converts to this type from the input type.
Source§

impl Hash for TypeScriptTokenType

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 PartialEq for TypeScriptTokenType

Source§

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

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 TypeScriptTokenType

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 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_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 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 TypeScriptTokenType

Source§

impl Eq for TypeScriptTokenType

Source§

impl StructuralPartialEq for TypeScriptTokenType

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