#[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§
Source§impl TypeScriptTokenType
impl TypeScriptTokenType
pub fn from_keyword(text: &str) -> Option<Self>
Trait Implementations§
Source§impl Clone for TypeScriptTokenType
impl Clone for TypeScriptTokenType
Source§fn clone(&self) -> TypeScriptTokenType
fn clone(&self) -> TypeScriptTokenType
Returns a duplicate 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 TypeScriptTokenType
impl Debug for TypeScriptTokenType
Source§impl<'de> Deserialize<'de> for TypeScriptTokenType
impl<'de> Deserialize<'de> for TypeScriptTokenType
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
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
impl From<TypeScriptTokenType> for TypeScriptElementType
Source§fn from(token: TypeScriptTokenType) -> Self
fn from(token: TypeScriptTokenType) -> Self
Converts to this type from the input type.
Source§impl Hash for TypeScriptTokenType
impl Hash for TypeScriptTokenType
Source§impl PartialEq for TypeScriptTokenType
impl PartialEq for TypeScriptTokenType
Source§impl Serialize for TypeScriptTokenType
impl Serialize for TypeScriptTokenType
Source§impl TokenType for TypeScriptTokenType
impl TokenType for TypeScriptTokenType
Source§const END_OF_STREAM: Self = Self::Eof
const END_OF_STREAM: Self = Self::Eof
A constant representing the end of the input stream. Read more
Source§type Role = UniversalTokenRole
type Role = UniversalTokenRole
The associated role type for this token kind.
Source§fn is_ignored(&self) -> bool
fn is_ignored(&self) -> bool
Returns true if this token represents trivia (whitespace, comments, etc.). Read more
Source§fn is_role(&self, role: Self::Role) -> bool
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
fn is_universal(&self, role: UniversalTokenRole) -> bool
Returns true if this token matches the specified universal role.
Source§fn is_comment(&self) -> bool
fn is_comment(&self) -> bool
Returns true if this token represents a comment. Read more
Source§fn is_whitespace(&self) -> bool
fn is_whitespace(&self) -> bool
Returns true if this token represents whitespace. Read more
Source§fn is_error(&self) -> bool
fn is_error(&self) -> bool
Returns true if this token represents an error condition. Read more
Source§fn is_end_of_stream(&self) -> bool
fn is_end_of_stream(&self) -> bool
Returns true if this token represents the end of the input stream. Read more
impl Copy for TypeScriptTokenType
impl Eq for TypeScriptTokenType
impl StructuralPartialEq for TypeScriptTokenType
Auto Trait Implementations§
impl Freeze for TypeScriptTokenType
impl RefUnwindSafe for TypeScriptTokenType
impl Send for TypeScriptTokenType
impl Sync for TypeScriptTokenType
impl Unpin for TypeScriptTokenType
impl UnwindSafe for TypeScriptTokenType
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