#[derive(Clone, Debug, PartialEq)]
pub enum Tsx {
End = 0,
Identifier = 1,
HashBangLine = 2,
Export = 3,
STAR = 4,
Default = 5,
EQ = 6,
As = 7,
Namespace = 8,
LBRACE = 9,
COMMA = 10,
RBRACE = 11,
Type2 = 12,
Typeof = 13,
Import2 = 14,
From = 15,
Var = 16,
Let = 17,
Const = 18,
If = 19,
Else = 20,
Switch = 21,
For = 22,
LPAREN = 23,
RPAREN = 24,
Await = 25,
In = 26,
Of = 27,
While = 28,
Do = 29,
Try = 30,
With = 31,
Break = 32,
Continue = 33,
Debugger = 34,
Return = 35,
Throw = 36,
SEMI = 37,
COLON = 38,
Case = 39,
Catch = 40,
Finally = 41,
Yield = 42,
LBRACK = 43,
RBRACK = 44,
LT = 45,
GT = 46,
SLASH = 47,
JsxText = 48,
Identifier2 = 49,
DOT = 50,
Class2 = 51,
Async = 52,
Function2 = 53,
EQGT = 54,
New = 55,
PLUSEQ = 56,
DASHEQ = 57,
STAREQ = 58,
SLASHEQ = 59,
PERCENTEQ = 60,
CARETEQ = 61,
AMPEQ = 62,
PIPEEQ = 63,
GTGTEQ = 64,
GTGTGTEQ = 65,
LTLTEQ = 66,
STARSTAREQ = 67,
DOTDOTDOT = 68,
QMARK = 69,
AMPAMP = 70,
PIPEPIPE = 71,
GTGT = 72,
GTGTGT = 73,
LTLT = 74,
AMP = 75,
CARET = 76,
PIPE = 77,
PLUS = 78,
DASH = 79,
PERCENT = 80,
STARSTAR = 81,
LTEQ = 82,
EQEQ = 83,
EQEQEQ = 84,
BANGEQ = 85,
BANGEQEQ = 86,
GTEQ = 87,
QMARKQMARK = 88,
Instanceof = 89,
BANG = 90,
TILDE = 91,
Void = 92,
Delete = 93,
PLUSPLUS = 94,
DASHDASH = 95,
DQUOTE = 96,
StringToken1 = 97,
SQUOTE = 98,
StringToken2 = 99,
EscapeSequence = 100,
Comment = 101,
BQUOTE = 102,
DOLLARLBRACE = 103,
SLASH2 = 104,
RegexPattern = 105,
RegexFlags = 106,
Number = 107,
Target = 108,
This = 109,
Super = 110,
True = 111,
False = 112,
Null = 113,
Undefined = 114,
AT = 115,
Static = 116,
Abstract = 117,
Get = 118,
Set = 119,
Declare = 120,
Public = 121,
Private = 122,
Protected = 123,
Module3 = 124,
Any = 125,
Number2 = 126,
Boolean = 127,
String2 = 128,
Symbol = 129,
Require = 130,
Implements = 131,
Global = 132,
Interface = 133,
Extends = 134,
Enum = 135,
Readonly = 136,
Is = 137,
Keyof = 138,
LBRACEPIPE = 139,
PIPERBRACE = 140,
AutomaticSemicolon = 141,
TemplateChars = 142,
Program = 143,
ExportStatement = 144,
ExportClause = 145,
ImportExportSpecifier = 146,
Declaration = 147,
Import = 148,
ImportStatement = 149,
ImportClause = 150,
FromClause = 151,
NamespaceImport = 152,
NamedImports = 153,
ExpressionStatement = 154,
VariableDeclaration = 155,
LexicalDeclaration = 156,
VariableDeclarator = 157,
StatementBlock = 158,
IfStatement = 159,
SwitchStatement = 160,
ForStatement = 161,
ForInStatement = 162,
ForHeader = 163,
WhileStatement = 164,
DoStatement = 165,
TryStatement = 166,
WithStatement = 167,
BreakStatement = 168,
ContinueStatement = 169,
DebuggerStatement = 170,
ReturnStatement = 171,
ThrowStatement = 172,
EmptyStatement = 173,
LabeledStatement = 174,
SwitchBody = 175,
SwitchCase = 176,
SwitchDefault = 177,
CatchClause = 178,
FinallyClause = 179,
ParenthesizedExpression = 180,
Expression = 181,
YieldExpression = 182,
Object = 183,
AssignmentPattern = 184,
Array = 185,
JsxElement = 186,
JsxFragment = 187,
JsxExpression = 188,
JsxOpeningElement = 189,
NestedIdentifier = 190,
JsxNamespaceName = 191,
JsxClosingElement = 192,
JsxSelfClosingElement = 193,
JsxAttribute = 194,
Class = 195,
ClassDeclaration = 196,
ClassHeritage = 197,
Function = 198,
FunctionDeclaration = 199,
GeneratorFunction = 200,
GeneratorFunctionDeclaration = 201,
ArrowFunction = 202,
CallSignature = 203,
CallExpression = 204,
NewExpression = 205,
AwaitExpression = 206,
MemberExpression = 207,
SubscriptExpression = 208,
AssignmentExpression = 209,
AugmentedAssignmentExpression = 210,
Initializer = 211,
SpreadElement = 212,
TernaryExpression = 213,
BinaryExpression = 214,
UnaryExpression = 215,
UpdateExpression = 216,
SequenceExpression = 217,
String = 218,
TemplateString = 219,
TemplateSubstitution = 220,
Regex = 221,
MetaProperty = 222,
Arguments = 223,
Decorator = 224,
MemberExpression2 = 225,
CallExpression2 = 226,
ClassBody = 227,
PublicFieldDefinition = 228,
FormalParameters = 229,
RestParameter = 230,
MethodDefinition = 231,
Pair = 232,
PropertyName = 233,
ComputedPropertyName = 234,
NonNullExpression = 235,
MethodSignature = 236,
AbstractMethodSignature = 237,
FunctionSignature = 238,
AsExpression = 239,
ImportRequireClause = 240,
ImplementsClause = 241,
AmbientDeclaration = 242,
AbstractClassDeclaration = 243,
Module = 244,
InternalModule = 245,
Module2 = 246,
ImportAlias = 247,
NestedTypeIdentifier = 248,
InterfaceDeclaration = 249,
ExtendsClause = 250,
EnumDeclaration = 251,
EnumBody = 252,
EnumAssignment = 253,
TypeAliasDeclaration = 254,
AccessibilityModifier = 255,
RequiredParameter = 256,
OptionalParameter = 257,
ParameterName = 258,
TypeAnnotation = 259,
Type = 260,
ConstructorType = 261,
PrimaryType = 262,
GenericType = 263,
TypePredicate = 264,
TypeQuery = 265,
IndexTypeQuery = 266,
LookupType = 267,
MappedTypeClause = 268,
LiteralType = 269,
UnaryExpression2 = 270,
ExistentialType = 271,
FlowMaybeType = 272,
ParenthesizedType = 273,
PredefinedType = 274,
TypeArguments = 275,
ObjectType = 276,
CallSignature2 = 277,
PropertySignature = 278,
TypeParameters = 279,
TypeParameter = 280,
DefaultType = 281,
Constraint = 282,
ConstructSignature = 283,
IndexSignature = 284,
ArrayType = 285,
TupleType = 286,
UnionType = 287,
IntersectionType = 288,
FunctionType = 289,
ProgramRepeat1 = 290,
ExportStatementRepeat1 = 291,
ExportClauseRepeat1 = 292,
NamedImportsRepeat1 = 293,
VariableDeclarationRepeat1 = 294,
SwitchBodyRepeat1 = 295,
ObjectRepeat1 = 296,
ArrayRepeat1 = 297,
JsxElementRepeat1 = 298,
JsxOpeningElementRepeat1 = 299,
StringRepeat1 = 300,
StringRepeat2 = 301,
TemplateStringRepeat1 = 302,
ClassBodyRepeat1 = 303,
FormalParametersRepeat1 = 304,
ImplementsClauseRepeat1 = 305,
ExtendsClauseRepeat1 = 306,
EnumBodyRepeat1 = 307,
ObjectTypeRepeat1 = 308,
TypeParametersRepeat1 = 309,
ArrayPattern = 310,
ExportSpecifier = 311,
ImportSpecifier = 312,
ObjectPattern = 313,
PropertyIdentifier = 314,
ShorthandPropertyIdentifier = 315,
StatementIdentifier = 316,
TypeIdentifier = 317,
Error = 318,
}
impl Into<&'static str> for Tsx {
fn into(self) -> &'static str {
match self {
Tsx::End => "end",
Tsx::Identifier => "identifier",
Tsx::HashBangLine => "hash_bang_line",
Tsx::Export => "export",
Tsx::STAR => "*",
Tsx::Default => "default",
Tsx::EQ => "=",
Tsx::As => "as",
Tsx::Namespace => "namespace",
Tsx::LBRACE => "{",
Tsx::COMMA => ",",
Tsx::RBRACE => "}",
Tsx::Type2 => "type",
Tsx::Typeof => "typeof",
Tsx::Import2 => "import",
Tsx::From => "from",
Tsx::Var => "var",
Tsx::Let => "let",
Tsx::Const => "const",
Tsx::If => "if",
Tsx::Else => "else",
Tsx::Switch => "switch",
Tsx::For => "for",
Tsx::LPAREN => "(",
Tsx::RPAREN => ")",
Tsx::Await => "await",
Tsx::In => "in",
Tsx::Of => "of",
Tsx::While => "while",
Tsx::Do => "do",
Tsx::Try => "try",
Tsx::With => "with",
Tsx::Break => "break",
Tsx::Continue => "continue",
Tsx::Debugger => "debugger",
Tsx::Return => "return",
Tsx::Throw => "throw",
Tsx::SEMI => ";",
Tsx::COLON => ":",
Tsx::Case => "case",
Tsx::Catch => "catch",
Tsx::Finally => "finally",
Tsx::Yield => "yield",
Tsx::LBRACK => "[",
Tsx::RBRACK => "]",
Tsx::LT => "<",
Tsx::GT => ">",
Tsx::SLASH => "/",
Tsx::JsxText => "jsx_text",
Tsx::Identifier2 => "identifier",
Tsx::DOT => ".",
Tsx::Class2 => "class",
Tsx::Async => "async",
Tsx::Function2 => "function",
Tsx::EQGT => "=>",
Tsx::New => "new",
Tsx::PLUSEQ => "+=",
Tsx::DASHEQ => "-=",
Tsx::STAREQ => "*=",
Tsx::SLASHEQ => "/=",
Tsx::PERCENTEQ => "%=",
Tsx::CARETEQ => "^=",
Tsx::AMPEQ => "&=",
Tsx::PIPEEQ => "|=",
Tsx::GTGTEQ => ">>=",
Tsx::GTGTGTEQ => ">>>=",
Tsx::LTLTEQ => "<<=",
Tsx::STARSTAREQ => "**=",
Tsx::DOTDOTDOT => "...",
Tsx::QMARK => "?",
Tsx::AMPAMP => "&&",
Tsx::PIPEPIPE => "||",
Tsx::GTGT => ">>",
Tsx::GTGTGT => ">>>",
Tsx::LTLT => "<<",
Tsx::AMP => "&",
Tsx::CARET => "^",
Tsx::PIPE => "|",
Tsx::PLUS => "+",
Tsx::DASH => "-",
Tsx::PERCENT => "%",
Tsx::STARSTAR => "**",
Tsx::LTEQ => "<=",
Tsx::EQEQ => "==",
Tsx::EQEQEQ => "===",
Tsx::BANGEQ => "!=",
Tsx::BANGEQEQ => "!==",
Tsx::GTEQ => ">=",
Tsx::QMARKQMARK => "??",
Tsx::Instanceof => "instanceof",
Tsx::BANG => "!",
Tsx::TILDE => "~",
Tsx::Void => "void",
Tsx::Delete => "delete",
Tsx::PLUSPLUS => "++",
Tsx::DASHDASH => "--",
Tsx::DQUOTE => "\"",
Tsx::StringToken1 => "string_token1",
Tsx::SQUOTE => "'",
Tsx::StringToken2 => "string_token2",
Tsx::EscapeSequence => "escape_sequence",
Tsx::Comment => "comment",
Tsx::BQUOTE => "`",
Tsx::DOLLARLBRACE => "${",
Tsx::SLASH2 => "/",
Tsx::RegexPattern => "regex_pattern",
Tsx::RegexFlags => "regex_flags",
Tsx::Number => "number",
Tsx::Target => "target",
Tsx::This => "this",
Tsx::Super => "super",
Tsx::True => "true",
Tsx::False => "false",
Tsx::Null => "null",
Tsx::Undefined => "undefined",
Tsx::AT => "@",
Tsx::Static => "static",
Tsx::Abstract => "abstract",
Tsx::Get => "get",
Tsx::Set => "set",
Tsx::Declare => "declare",
Tsx::Public => "public",
Tsx::Private => "private",
Tsx::Protected => "protected",
Tsx::Module3 => "module",
Tsx::Any => "any",
Tsx::Number2 => "number",
Tsx::Boolean => "boolean",
Tsx::String2 => "string",
Tsx::Symbol => "symbol",
Tsx::Require => "require",
Tsx::Implements => "implements",
Tsx::Global => "global",
Tsx::Interface => "interface",
Tsx::Extends => "extends",
Tsx::Enum => "enum",
Tsx::Readonly => "readonly",
Tsx::Is => "is",
Tsx::Keyof => "keyof",
Tsx::LBRACEPIPE => "{|",
Tsx::PIPERBRACE => "|}",
Tsx::AutomaticSemicolon => "_automatic_semicolon",
Tsx::TemplateChars => "_template_chars",
Tsx::Program => "program",
Tsx::ExportStatement => "export_statement",
Tsx::ExportClause => "export_clause",
Tsx::ImportExportSpecifier => "_import_export_specifier",
Tsx::Declaration => "_declaration",
Tsx::Import => "import",
Tsx::ImportStatement => "import_statement",
Tsx::ImportClause => "import_clause",
Tsx::FromClause => "_from_clause",
Tsx::NamespaceImport => "namespace_import",
Tsx::NamedImports => "named_imports",
Tsx::ExpressionStatement => "expression_statement",
Tsx::VariableDeclaration => "variable_declaration",
Tsx::LexicalDeclaration => "lexical_declaration",
Tsx::VariableDeclarator => "variable_declarator",
Tsx::StatementBlock => "statement_block",
Tsx::IfStatement => "if_statement",
Tsx::SwitchStatement => "switch_statement",
Tsx::ForStatement => "for_statement",
Tsx::ForInStatement => "for_in_statement",
Tsx::ForHeader => "_for_header",
Tsx::WhileStatement => "while_statement",
Tsx::DoStatement => "do_statement",
Tsx::TryStatement => "try_statement",
Tsx::WithStatement => "with_statement",
Tsx::BreakStatement => "break_statement",
Tsx::ContinueStatement => "continue_statement",
Tsx::DebuggerStatement => "debugger_statement",
Tsx::ReturnStatement => "return_statement",
Tsx::ThrowStatement => "throw_statement",
Tsx::EmptyStatement => "empty_statement",
Tsx::LabeledStatement => "labeled_statement",
Tsx::SwitchBody => "switch_body",
Tsx::SwitchCase => "switch_case",
Tsx::SwitchDefault => "switch_default",
Tsx::CatchClause => "catch_clause",
Tsx::FinallyClause => "finally_clause",
Tsx::ParenthesizedExpression => "parenthesized_expression",
Tsx::Expression => "_expression",
Tsx::YieldExpression => "yield_expression",
Tsx::Object => "object",
Tsx::AssignmentPattern => "assignment_pattern",
Tsx::Array => "array",
Tsx::JsxElement => "jsx_element",
Tsx::JsxFragment => "jsx_fragment",
Tsx::JsxExpression => "jsx_expression",
Tsx::JsxOpeningElement => "jsx_opening_element",
Tsx::NestedIdentifier => "nested_identifier",
Tsx::JsxNamespaceName => "jsx_namespace_name",
Tsx::JsxClosingElement => "jsx_closing_element",
Tsx::JsxSelfClosingElement => "jsx_self_closing_element",
Tsx::JsxAttribute => "jsx_attribute",
Tsx::Class => "class",
Tsx::ClassDeclaration => "class_declaration",
Tsx::ClassHeritage => "class_heritage",
Tsx::Function => "function",
Tsx::FunctionDeclaration => "function_declaration",
Tsx::GeneratorFunction => "generator_function",
Tsx::GeneratorFunctionDeclaration => "generator_function_declaration",
Tsx::ArrowFunction => "arrow_function",
Tsx::CallSignature => "_call_signature",
Tsx::CallExpression => "call_expression",
Tsx::NewExpression => "new_expression",
Tsx::AwaitExpression => "await_expression",
Tsx::MemberExpression => "member_expression",
Tsx::SubscriptExpression => "subscript_expression",
Tsx::AssignmentExpression => "assignment_expression",
Tsx::AugmentedAssignmentExpression => "augmented_assignment_expression",
Tsx::Initializer => "_initializer",
Tsx::SpreadElement => "spread_element",
Tsx::TernaryExpression => "ternary_expression",
Tsx::BinaryExpression => "binary_expression",
Tsx::UnaryExpression => "unary_expression",
Tsx::UpdateExpression => "update_expression",
Tsx::SequenceExpression => "sequence_expression",
Tsx::String => "string",
Tsx::TemplateString => "template_string",
Tsx::TemplateSubstitution => "template_substitution",
Tsx::Regex => "regex",
Tsx::MetaProperty => "meta_property",
Tsx::Arguments => "arguments",
Tsx::Decorator => "decorator",
Tsx::MemberExpression2 => "member_expression",
Tsx::CallExpression2 => "call_expression",
Tsx::ClassBody => "class_body",
Tsx::PublicFieldDefinition => "public_field_definition",
Tsx::FormalParameters => "formal_parameters",
Tsx::RestParameter => "rest_parameter",
Tsx::MethodDefinition => "method_definition",
Tsx::Pair => "pair",
Tsx::PropertyName => "_property_name",
Tsx::ComputedPropertyName => "computed_property_name",
Tsx::NonNullExpression => "non_null_expression",
Tsx::MethodSignature => "method_signature",
Tsx::AbstractMethodSignature => "abstract_method_signature",
Tsx::FunctionSignature => "function_signature",
Tsx::AsExpression => "as_expression",
Tsx::ImportRequireClause => "import_require_clause",
Tsx::ImplementsClause => "implements_clause",
Tsx::AmbientDeclaration => "ambient_declaration",
Tsx::AbstractClassDeclaration => "abstract_class_declaration",
Tsx::Module => "module",
Tsx::InternalModule => "internal_module",
Tsx::Module2 => "_module",
Tsx::ImportAlias => "import_alias",
Tsx::NestedTypeIdentifier => "nested_type_identifier",
Tsx::InterfaceDeclaration => "interface_declaration",
Tsx::ExtendsClause => "extends_clause",
Tsx::EnumDeclaration => "enum_declaration",
Tsx::EnumBody => "enum_body",
Tsx::EnumAssignment => "enum_assignment",
Tsx::TypeAliasDeclaration => "type_alias_declaration",
Tsx::AccessibilityModifier => "accessibility_modifier",
Tsx::RequiredParameter => "required_parameter",
Tsx::OptionalParameter => "optional_parameter",
Tsx::ParameterName => "_parameter_name",
Tsx::TypeAnnotation => "type_annotation",
Tsx::Type => "_type",
Tsx::ConstructorType => "constructor_type",
Tsx::PrimaryType => "_primary_type",
Tsx::GenericType => "generic_type",
Tsx::TypePredicate => "type_predicate",
Tsx::TypeQuery => "type_query",
Tsx::IndexTypeQuery => "index_type_query",
Tsx::LookupType => "lookup_type",
Tsx::MappedTypeClause => "mapped_type_clause",
Tsx::LiteralType => "literal_type",
Tsx::UnaryExpression2 => "unary_expression",
Tsx::ExistentialType => "existential_type",
Tsx::FlowMaybeType => "flow_maybe_type",
Tsx::ParenthesizedType => "parenthesized_type",
Tsx::PredefinedType => "predefined_type",
Tsx::TypeArguments => "type_arguments",
Tsx::ObjectType => "object_type",
Tsx::CallSignature2 => "call_signature",
Tsx::PropertySignature => "property_signature",
Tsx::TypeParameters => "type_parameters",
Tsx::TypeParameter => "type_parameter",
Tsx::DefaultType => "default_type",
Tsx::Constraint => "constraint",
Tsx::ConstructSignature => "construct_signature",
Tsx::IndexSignature => "index_signature",
Tsx::ArrayType => "array_type",
Tsx::TupleType => "tuple_type",
Tsx::UnionType => "union_type",
Tsx::IntersectionType => "intersection_type",
Tsx::FunctionType => "function_type",
Tsx::ProgramRepeat1 => "program_repeat1",
Tsx::ExportStatementRepeat1 => "export_statement_repeat1",
Tsx::ExportClauseRepeat1 => "export_clause_repeat1",
Tsx::NamedImportsRepeat1 => "named_imports_repeat1",
Tsx::VariableDeclarationRepeat1 => "variable_declaration_repeat1",
Tsx::SwitchBodyRepeat1 => "switch_body_repeat1",
Tsx::ObjectRepeat1 => "object_repeat1",
Tsx::ArrayRepeat1 => "array_repeat1",
Tsx::JsxElementRepeat1 => "jsx_element_repeat1",
Tsx::JsxOpeningElementRepeat1 => "jsx_opening_element_repeat1",
Tsx::StringRepeat1 => "string_repeat1",
Tsx::StringRepeat2 => "string_repeat2",
Tsx::TemplateStringRepeat1 => "template_string_repeat1",
Tsx::ClassBodyRepeat1 => "class_body_repeat1",
Tsx::FormalParametersRepeat1 => "formal_parameters_repeat1",
Tsx::ImplementsClauseRepeat1 => "implements_clause_repeat1",
Tsx::ExtendsClauseRepeat1 => "extends_clause_repeat1",
Tsx::EnumBodyRepeat1 => "enum_body_repeat1",
Tsx::ObjectTypeRepeat1 => "object_type_repeat1",
Tsx::TypeParametersRepeat1 => "type_parameters_repeat1",
Tsx::ArrayPattern => "array_pattern",
Tsx::ExportSpecifier => "export_specifier",
Tsx::ImportSpecifier => "import_specifier",
Tsx::ObjectPattern => "object_pattern",
Tsx::PropertyIdentifier => "property_identifier",
Tsx::ShorthandPropertyIdentifier => "shorthand_property_identifier",
Tsx::StatementIdentifier => "statement_identifier",
Tsx::TypeIdentifier => "type_identifier",
Tsx::Error => "ERROR",
}
}
}
#[allow(clippy::unreadable_literal)]
static KEYS: phf::Map<&'static str, Tsx> = ::phf::Map {
key: 3213172566270843353,
disps: ::phf::Slice::Static(&[
(0, 0),
(0, 11),
(1, 153),
(0, 2),
(0, 138),
(0, 2),
(0, 0),
(0, 0),
(6, 37),
(0, 44),
(0, 228),
(0, 53),
(0, 92),
(2, 217),
(0, 0),
(0, 8),
(0, 129),
(3, 196),
(1, 30),
(1, 109),
(0, 134),
(1, 0),
(0, 1),
(1, 275),
(7, 218),
(13, 18),
(0, 3),
(1, 297),
(0, 63),
(0, 79),
(0, 49),
(0, 0),
(0, 96),
(0, 132),
(17, 252),
(0, 4),
(0, 101),
(25, 56),
(1, 200),
(0, 73),
(34, 126),
(94, 29),
(17, 116),
(0, 17),
(0, 138),
(0, 13),
(0, 0),
(74, 0),
(0, 150),
(2, 164),
(1, 260),
(1, 0),
(1, 3),
(0, 28),
(0, 205),
(0, 191),
(12, 134),
(28, 152),
(0, 10),
(0, 79),
(0, 9),
]),
entries: ::phf::Slice::Static(&[
("%=", Tsx::PERCENTEQ),
("switch_body_repeat1", Tsx::SwitchBodyRepeat1),
("jsx_namespace_name", Tsx::JsxNamespaceName),
("string", Tsx::String),
("expression_statement", Tsx::ExpressionStatement),
(">=", Tsx::GTEQ),
("number", Tsx::Number),
("switch_body", Tsx::SwitchBody),
("enum_assignment", Tsx::EnumAssignment),
("intersection_type", Tsx::IntersectionType),
("require", Tsx::Require),
("_declaration", Tsx::Declaration),
("delete", Tsx::Delete),
("?", Tsx::QMARK),
("class_body", Tsx::ClassBody),
("is", Tsx::Is),
(">>>", Tsx::GTGTGT),
("global", Tsx::Global),
(")", Tsx::RPAREN),
("named_imports_repeat1", Tsx::NamedImportsRepeat1),
("_call_signature", Tsx::CallSignature),
("|=", Tsx::PIPEEQ),
("constructor_type", Tsx::ConstructorType),
("parenthesized_type", Tsx::ParenthesizedType),
("declare", Tsx::Declare),
(
"generator_function_declaration",
Tsx::GeneratorFunctionDeclaration,
),
("generator_function", Tsx::GeneratorFunction),
("member_expression", Tsx::MemberExpression),
("export_statement_repeat1", Tsx::ExportStatementRepeat1),
("\\\"", Tsx::DQUOTE),
("jsx_fragment", Tsx::JsxFragment),
("target", Tsx::Target),
("typeof", Tsx::Typeof),
("class_heritage", Tsx::ClassHeritage),
("for_in_statement", Tsx::ForInStatement),
("function_declaration", Tsx::FunctionDeclaration),
("??", Tsx::QMARKQMARK),
("string_token1", Tsx::StringToken1),
("extends", Tsx::Extends),
("extends_clause_repeat1", Tsx::ExtendsClauseRepeat1),
("type_parameter", Tsx::TypeParameter),
("formal_parameters_repeat1", Tsx::FormalParametersRepeat1),
("/", Tsx::SLASH),
("module", Tsx::Module),
("implements", Tsx::Implements),
("class_body_repeat1", Tsx::ClassBodyRepeat1),
("${", Tsx::DOLLARLBRACE),
("array_repeat1", Tsx::ArrayRepeat1),
("<<=", Tsx::LTLTEQ),
("return", Tsx::Return),
("export_specifier", Tsx::ExportSpecifier),
("void", Tsx::Void),
("type_alias_declaration", Tsx::TypeAliasDeclaration),
("+=", Tsx::PLUSEQ),
("enum", Tsx::Enum),
("_primary_type", Tsx::PrimaryType),
("as_expression", Tsx::AsExpression),
("jsx_attribute", Tsx::JsxAttribute),
("string_repeat1", Tsx::StringRepeat1),
("class_declaration", Tsx::ClassDeclaration),
("=", Tsx::EQ),
("]", Tsx::RBRACK),
("implements_clause_repeat1", Tsx::ImplementsClauseRepeat1),
("undefined", Tsx::Undefined),
("else", Tsx::Else),
("enum_declaration", Tsx::EnumDeclaration),
("function_type", Tsx::FunctionType),
("enum_body_repeat1", Tsx::EnumBodyRepeat1),
("!", Tsx::BANG),
("meta_property", Tsx::MetaProperty),
("do_statement", Tsx::DoStatement),
("export", Tsx::Export),
("|", Tsx::PIPE),
("_from_clause", Tsx::FromClause),
("type_arguments", Tsx::TypeArguments),
("*=", Tsx::STAREQ),
("{", Tsx::LBRACE),
("public", Tsx::Public),
("assignment_pattern", Tsx::AssignmentPattern),
("type_annotation", Tsx::TypeAnnotation),
("template_substitution", Tsx::TemplateSubstitution),
("&", Tsx::AMP),
("index_signature", Tsx::IndexSignature),
("import_specifier", Tsx::ImportSpecifier),
("empty_statement", Tsx::EmptyStatement),
("**=", Tsx::STARSTAREQ),
("instanceof", Tsx::Instanceof),
("abstract_class_declaration", Tsx::AbstractClassDeclaration),
("optional_parameter", Tsx::OptionalParameter),
("string_token2", Tsx::StringToken2),
("_expression", Tsx::Expression),
("while", Tsx::While),
("private", Tsx::Private),
("switch", Tsx::Switch),
("new_expression", Tsx::NewExpression),
("yield_expression", Tsx::YieldExpression),
("object_type", Tsx::ObjectType),
("abstract", Tsx::Abstract),
("<<", Tsx::LTLT),
("variable_declarator", Tsx::VariableDeclarator),
("with_statement", Tsx::WithStatement),
("ternary_expression", Tsx::TernaryExpression),
("with", Tsx::With),
("import_statement", Tsx::ImportStatement),
("=>", Tsx::EQGT),
("template_string_repeat1", Tsx::TemplateStringRepeat1),
("type_parameters_repeat1", Tsx::TypeParametersRepeat1),
("const", Tsx::Const),
("comment", Tsx::Comment),
("identifier", Tsx::Identifier),
("case", Tsx::Case),
("**", Tsx::STARSTAR),
(">>>=", Tsx::GTGTGTEQ),
("yield", Tsx::Yield),
("_for_header", Tsx::ForHeader),
("switch_statement", Tsx::SwitchStatement),
("default_type", Tsx::DefaultType),
("existential_type", Tsx::ExistentialType),
("set", Tsx::Set),
("throw_statement", Tsx::ThrowStatement),
("||", Tsx::PIPEPIPE),
("while_statement", Tsx::WhileStatement),
("get", Tsx::Get),
("array_type", Tsx::ArrayType),
("%", Tsx::PERCENT),
("break_statement", Tsx::BreakStatement),
("interface", Tsx::Interface),
("!=", Tsx::BANGEQ),
("regex", Tsx::Regex),
("-", Tsx::DASH),
("/=", Tsx::SLASHEQ),
("property_signature", Tsx::PropertySignature),
("implements_clause", Tsx::ImplementsClause),
("method_signature", Tsx::MethodSignature),
("let", Tsx::Let),
("accessibility_modifier", Tsx::AccessibilityModifier),
("continue", Tsx::Continue),
("mapped_type_clause", Tsx::MappedTypeClause),
("++", Tsx::PLUSPLUS),
("template_string", Tsx::TemplateString),
("decorator", Tsx::Decorator),
("index_type_query", Tsx::IndexTypeQuery),
("computed_property_name", Tsx::ComputedPropertyName),
("try_statement", Tsx::TryStatement),
("_automatic_semicolon", Tsx::AutomaticSemicolon),
("method_definition", Tsx::MethodDefinition),
("variable_declaration", Tsx::VariableDeclaration),
("for_statement", Tsx::ForStatement),
("property_identifier", Tsx::PropertyIdentifier),
("!==", Tsx::BANGEQEQ),
("constraint", Tsx::Constraint),
("interface_declaration", Tsx::InterfaceDeclaration),
("statement_block", Tsx::StatementBlock),
("import_clause", Tsx::ImportClause),
("static", Tsx::Static),
("_initializer", Tsx::Initializer),
("from", Tsx::From),
("named_imports", Tsx::NamedImports),
("type_identifier", Tsx::TypeIdentifier),
("false", Tsx::False),
(
"variable_declaration_repeat1",
Tsx::VariableDeclarationRepeat1,
),
("function", Tsx::Function),
("<", Tsx::LT),
("hash_bang_line", Tsx::HashBangLine),
("do", Tsx::Do),
("export_statement", Tsx::ExportStatement),
("if_statement", Tsx::IfStatement),
("|}", Tsx::PIPERBRACE),
("var", Tsx::Var),
("ambient_declaration", Tsx::AmbientDeclaration),
(",", Tsx::COMMA),
("import_alias", Tsx::ImportAlias),
("unary_expression", Tsx::UnaryExpression),
("regex_flags", Tsx::RegexFlags),
("labeled_statement", Tsx::LabeledStatement),
("function_signature", Tsx::FunctionSignature),
("protected", Tsx::Protected),
("try", Tsx::Try),
("sequence_expression", Tsx::SequenceExpression),
("as", Tsx::As),
("array_pattern", Tsx::ArrayPattern),
("jsx_self_closing_element", Tsx::JsxSelfClosingElement),
("array", Tsx::Array),
("==", Tsx::EQEQ),
("internal_module", Tsx::InternalModule),
("`", Tsx::BQUOTE),
("this", Tsx::This),
("regex_pattern", Tsx::RegexPattern),
("finally", Tsx::Finally),
("async", Tsx::Async),
("jsx_text", Tsx::JsxText),
("type_predicate", Tsx::TypePredicate),
("readonly", Tsx::Readonly),
("catch_clause", Tsx::CatchClause),
("await_expression", Tsx::AwaitExpression),
("-=", Tsx::DASHEQ),
("in", Tsx::In),
("object_type_repeat1", Tsx::ObjectTypeRepeat1),
("construct_signature", Tsx::ConstructSignature),
(">>", Tsx::GTGT),
("lookup_type", Tsx::LookupType),
(
"shorthand_property_identifier",
Tsx::ShorthandPropertyIdentifier,
),
("_parameter_name", Tsx::ParameterName),
("lexical_declaration", Tsx::LexicalDeclaration),
("object", Tsx::Object),
("continue_statement", Tsx::ContinueStatement),
("binary_expression", Tsx::BinaryExpression),
("symbol", Tsx::Symbol),
("nested_identifier", Tsx::NestedIdentifier),
(">", Tsx::GT),
("...", Tsx::DOTDOTDOT),
("{|", Tsx::LBRACEPIPE),
("string_repeat2", Tsx::StringRepeat2),
(";", Tsx::SEMI),
(".", Tsx::DOT),
("keyof", Tsx::Keyof),
("jsx_element", Tsx::JsxElement),
("flow_maybe_type", Tsx::FlowMaybeType),
("export_clause", Tsx::ExportClause),
("switch_default", Tsx::SwitchDefault),
("boolean", Tsx::Boolean),
("^=", Tsx::CARETEQ),
("import_require_clause", Tsx::ImportRequireClause),
("catch", Tsx::Catch),
("type_parameters", Tsx::TypeParameters),
("update_expression", Tsx::UpdateExpression),
("pair", Tsx::Pair),
("@", Tsx::AT),
("===", Tsx::EQEQEQ),
("^", Tsx::CARET),
("debugger", Tsx::Debugger),
("super", Tsx::Super),
("end", Tsx::End),
("jsx_closing_element", Tsx::JsxClosingElement),
("--", Tsx::DASHDASH),
("program", Tsx::Program),
("any", Tsx::Any),
("enum_body", Tsx::EnumBody),
("\'", Tsx::SQUOTE),
(">>=", Tsx::GTGTEQ),
("class", Tsx::Class),
("&=", Tsx::AMPEQ),
("switch_case", Tsx::SwitchCase),
("debugger_statement", Tsx::DebuggerStatement),
("object_repeat1", Tsx::ObjectRepeat1),
("of", Tsx::Of),
("throw", Tsx::Throw),
("&&", Tsx::AMPAMP),
("import", Tsx::Import),
("break", Tsx::Break),
("predefined_type", Tsx::PredefinedType),
("_import_export_specifier", Tsx::ImportExportSpecifier),
("null", Tsx::Null),
("required_parameter", Tsx::RequiredParameter),
("tuple_type", Tsx::TupleType),
("export_clause_repeat1", Tsx::ExportClauseRepeat1),
("statement_identifier", Tsx::StatementIdentifier),
("call_expression", Tsx::CallExpression),
("arrow_function", Tsx::ArrowFunction),
("abstract_method_signature", Tsx::AbstractMethodSignature),
("}", Tsx::RBRACE),
("namespace_import", Tsx::NamespaceImport),
("parenthesized_expression", Tsx::ParenthesizedExpression),
("nested_type_identifier", Tsx::NestedTypeIdentifier),
("spread_element", Tsx::SpreadElement),
("<=", Tsx::LTEQ),
("default", Tsx::Default),
("_template_chars", Tsx::TemplateChars),
("public_field_definition", Tsx::PublicFieldDefinition),
("formal_parameters", Tsx::FormalParameters),
("+", Tsx::PLUS),
("return_statement", Tsx::ReturnStatement),
("jsx_opening_element", Tsx::JsxOpeningElement),
("generic_type", Tsx::GenericType),
("if", Tsx::If),
("arguments", Tsx::Arguments),
("rest_parameter", Tsx::RestParameter),
("extends_clause", Tsx::ExtendsClause),
("object_pattern", Tsx::ObjectPattern),
("_property_name", Tsx::PropertyName),
("*", Tsx::STAR),
("jsx_opening_element_repeat1", Tsx::JsxOpeningElementRepeat1),
("new", Tsx::New),
("_type", Tsx::Type),
("namespace", Tsx::Namespace),
("escape_sequence", Tsx::EscapeSequence),
("for", Tsx::For),
("jsx_expression", Tsx::JsxExpression),
("literal_type", Tsx::LiteralType),
("type_query", Tsx::TypeQuery),
(":", Tsx::COLON),
("~", Tsx::TILDE),
("subscript_expression", Tsx::SubscriptExpression),
("union_type", Tsx::UnionType),
("jsx_element_repeat1", Tsx::JsxElementRepeat1),
("await", Tsx::Await),
(
"augmented_assignment_expression",
Tsx::AugmentedAssignmentExpression,
),
("assignment_expression", Tsx::AssignmentExpression),
("ERROR", Tsx::Error),
("program_repeat1", Tsx::ProgramRepeat1),
("non_null_expression", Tsx::NonNullExpression),
("[", Tsx::LBRACK),
("true", Tsx::True),
("(", Tsx::LPAREN),
("finally_clause", Tsx::FinallyClause),
]),
};
impl From<&str> for Tsx {
#[inline(always)]
fn from(key: &str) -> Self {
KEYS.get(key).unwrap().clone()
}
}
impl From<u16> for Tsx {
#[inline(always)]
fn from(x: u16) -> Self {
unsafe { std::mem::transmute(x) }
}
}
impl PartialEq<u16> for Tsx {
#[inline(always)]
fn eq(&self, x: &u16) -> bool {
*self == Tsx::from(*x)
}
}
impl PartialEq<Tsx> for u16 {
#[inline(always)]
fn eq(&self, x: &Tsx) -> bool {
*x == *self
}
}