From 483fddac84bcf055f663492d243715de7c7d63c1 Mon Sep 17 00:00:00 2001 From: Luni-4 Date: Thu, 16 Sep 2021 11:30:41 +0200 Subject: [PATCH] Recreate grammars --- src/languages/language_ccomment.rs | 34 +- src/languages/language_cpp.rs | 1098 +++++++++++++------------- src/languages/language_java.rs | 648 +++++++-------- src/languages/language_javascript.rs | 570 ++++++------- src/languages/language_mozjs.rs | 558 ++++++------- src/languages/language_preproc.rs | 78 +- src/languages/language_python.rs | 508 ++++++------ src/languages/language_rust.rs | 680 ++++++++-------- src/languages/language_tsx.rs | 760 +++++++++--------- src/languages/language_typescript.rs | 772 +++++++++--------- 10 files changed, 2853 insertions(+), 2853 deletions(-) diff --git a/src/languages/language_ccomment.rs b/src/languages/language_ccomment.rs index 51e266f9c..e1d59a12c 100644 --- a/src/languages/language_ccomment.rs +++ b/src/languages/language_ccomment.rs @@ -23,30 +23,30 @@ pub enum Ccomment { #[allow(clippy::unreadable_literal)] static KEYS: phf::Map<&'static str, Ccomment> = ::phf::Map { - key: 3558916427560184125, - disps: ::phf::Slice::Static(&[(2, 0), (0, 11), (0, 13), (0, 10)]), - entries: ::phf::Slice::Static(&[ - ("char_literal_token1", Ccomment::CharLiteralToken1), + key: 15467950696543387533, + disps: &[(1, 0), (0, 13), (5, 8), (7, 15)], + entries: &[ ("define_token1", Ccomment::DefineToken1), - ("raw_string_literal", Ccomment::RawStringLiteral), - ("define", Ccomment::Define), - ("string_literal", Ccomment::StringLiteral), - ("define_repeat1", Ccomment::DefineRepeat1), + ("nothing", Ccomment::Nothing), + ("char_literal", Ccomment::CharLiteral), ("translation_unit", Ccomment::TranslationUnit), + ("define", Ccomment::Define), + ( + "preproc_continuation_line", + Ccomment::PreprocContinuationLine, + ), ("string_literal_token1", Ccomment::StringLiteralToken1), ("ERROR", Ccomment::Error), + ("_top_level_item", Ccomment::TopLevelItem), + ("char_literal_token1", Ccomment::CharLiteralToken1), ("comment", Ccomment::Comment), + ("translation_unit_repeat1", Ccomment::TranslationUnitRepeat1), ("preproc_line", Ccomment::PreprocLine), - ("_top_level_item", Ccomment::TopLevelItem), - ("char_literal", Ccomment::CharLiteral), + ("string_literal", Ccomment::StringLiteral), + ("define_repeat1", Ccomment::DefineRepeat1), + ("raw_string_literal", Ccomment::RawStringLiteral), ("end", Ccomment::End), - ("translation_unit_repeat1", Ccomment::TranslationUnitRepeat1), - ("nothing", Ccomment::Nothing), - ( - "preproc_continuation_line", - Ccomment::PreprocContinuationLine, - ), - ]), + ], }; impl From<&str> for Ccomment { diff --git a/src/languages/language_cpp.rs b/src/languages/language_cpp.rs index a46c6ea23..6c5d562fa 100644 --- a/src/languages/language_cpp.rs +++ b/src/languages/language_cpp.rs @@ -469,667 +469,667 @@ pub enum Cpp { #[allow(clippy::unreadable_literal)] static KEYS: phf::Map<&'static str, Cpp> = ::phf::Map { - key: 3213172566270843353, - disps: ::phf::Slice::Static(&[ - (0, 0), + key: 12913932095322966823, + disps: &[ + (0, 104), (0, 6), - (0, 2), - (0, 105), - (0, 194), - (0, 39), - (0, 39), - (0, 70), - (1, 0), - (1, 40), - (0, 15), - (0, 370), - (0, 5), - (0, 54), - (0, 28), - (0, 200), - (1, 1), - (0, 120), + (0, 29), + (0, 38), + (0, 68), + (0, 368), (0, 0), - (1, 296), + (2, 23), + (1, 107), (0, 2), - (1, 78), - (0, 47), + (0, 80), + (1, 176), (0, 10), - (0, 104), - (0, 39), - (1, 120), - (0, 319), - (0, 229), - (0, 0), (0, 0), - (0, 0), - (0, 53), - (1, 339), - (0, 74), - (0, 27), - (0, 427), + (0, 4), + (0, 12), + (0, 118), + (0, 39), + (0, 25), + (0, 158), + (0, 209), + (0, 92), + (0, 9), + (0, 113), + (0, 17), + (0, 154), (0, 1), - (0, 129), - (14, 305), - (0, 57), - (0, 2), - (1, 265), - (0, 145), - (0, 8), - (0, 109), - (2, 283), + (0, 50), + (0, 299), (0, 3), + (6, 284), + (0, 29), + (0, 105), + (0, 287), + (2, 57), + (1, 20), + (0, 252), + (5, 220), + (0, 38), + (0, 118), (0, 0), - (0, 72), - (0, 41), - (2, 203), - (0, 113), - (0, 231), + (0, 423), + (2, 89), + (3, 212), + (1, 135), (0, 0), - (0, 1), - (0, 31), - (0, 77), - (0, 22), - (1, 2), - (0, 363), - (0, 115), - (2, 100), - (7, 53), - (5, 361), - (0, 12), - (0, 27), - (6, 18), - (10, 291), + (0, 107), (0, 4), - (0, 278), - (0, 22), - (9, 325), - (0, 240), - (12, 237), - (27, 283), - (0, 308), - (24, 369), - (8, 342), - (48, 49), - (0, 186), - (11, 208), - (14, 202), - (0, 210), - (0, 214), - (0, 95), - ]), - entries: ::phf::Slice::Static(&[ - ("<=", Cpp::LTEQ), - ("type_definition_repeat2", Cpp::TypeDefinitionRepeat2), - ("public", Cpp::Public), - ("__fastcall", Cpp::Fastcall), + (1, 57), + (0, 265), + (0, 7), + (3, 186), + (1, 221), + (1, 0), + (0, 5), + (0, 16), + (0, 236), + (0, 0), + (0, 0), + (21, 172), + (0, 16), + (17, 248), + (0, 280), + (0, 120), + (0, 73), + (0, 36), + (0, 391), + (0, 92), + (0, 35), + (4, 256), + (0, 49), + (1, 222), + (0, 8), + (0, 13), + (11, 428), + (12, 30), + (1, 5), + (1, 289), + (0, 81), + (0, 138), + (0, 345), + (2, 274), + (2, 228), + (3, 2), + (17, 356), + (0, 0), + ], + entries: &[ ("true", Cpp::True), ("type_descriptor", Cpp::TypeDescriptor), - ("MOZ_NON_MEMMOVABLE", Cpp::MOZNONMEMMOVABLE), - ("defined", Cpp::Defined), - ("reference_declarator", Cpp::ReferenceDeclarator), - ("->", Cpp::DASHGT), - ( - "MOZ_POP_DISABLE_NONTRIVIAL_UNION_WARNINGS", - Cpp::MOZPOPDISABLENONTRIVIALUNIONWARNINGS, - ), - ("MOZ_NONNULL", Cpp::MOZNONNULL), - ("_unaligned", Cpp::Unaligned), - ("<<", Cpp::LTLT), - ("typedef", Cpp::Typedef), - ("throw_specifier", Cpp::ThrowSpecifier), - ("_enum_base_clause", Cpp::EnumBaseClause), - ( - "structured_binding_declarator", - Cpp::StructuredBindingDeclarator, - ), - ("alone_macro_call_repeat1", Cpp::AloneMacroCallRepeat1), - ("pointer_expression", Cpp::PointerExpression), - ("auto", Cpp::Auto), - ("_type_specifier", Cpp::TypeSpecifier), - (";", Cpp::SEMI), - ("template_instantiation", Cpp::TemplateInstantiation), - ("MOZ_IMPLICIT", Cpp::MOZIMPLICIT), - ("+", Cpp::PLUS), - ("explicit", Cpp::Explicit), - ("assignment_expression", Cpp::AssignmentExpression), - ("number_literal", Cpp::NumberLiteral), - ("field_initializer_list", Cpp::FieldInitializerList), - ("bitfield_clause", Cpp::BitfieldClause), - ("_preproc_expression", Cpp::PreprocExpression), - ("ms_declspec_modifier", Cpp::MsDeclspecModifier), - ( - "function_declarator_repeat2", - Cpp::FunctionDeclaratorRepeat2, - ), - ("?", Cpp::QMARK), - ("case_statement_repeat1", Cpp::CaseStatementRepeat1), - ("MOZ_NONNULL_RETURN", Cpp::MOZNONNULLRETURN), - ("operator_name", Cpp::OperatorName), - ("#include", Cpp::HASHinclude), - ("parameter_declaration", Cpp::ParameterDeclaration), - ("#endif", Cpp::HASHendif), - ("SDB_TRY_INSPECT", Cpp::SDBTRYINSPECT), - ("=", Cpp::EQ), - ("default_method_clause", Cpp::DefaultMethodClause), - ("alone_macro_call_token1", Cpp::AloneMacroCallToken1), - ("delete_method_clause", Cpp::DeleteMethodClause), - ("parameter_list_repeat1", Cpp::ParameterListRepeat1), - ("MOZ_RAII", Cpp::MOZRAII), + ("nullptr", Cpp::Nullptr), + ("field_designator", Cpp::FieldDesignator), + ("_declarator", Cpp::Declarator), + ("operator", Cpp::Operator), + ("&=", Cpp::AMPEQ), + ("static_assert_declaration", Cpp::StaticAssertDeclaration), + ("__clrcall", Cpp::Clrcall), + ("^", Cpp::CARET), + ("MOZ_IS_REFPTR", Cpp::MOZISREFPTR), + ("field_declaration_list", Cpp::FieldDeclarationList), ("declaration", Cpp::Declaration), - ("*=", Cpp::STAREQ), - ("MOZ_INIT_OUTSIDE_CTOR", Cpp::MOZINITOUTSIDECTOR), + (",", Cpp::COMMA), + ("template_type", Cpp::TemplateType), + ("template_declaration", Cpp::TemplateDeclaration), + ("alone_macro_call_token1", Cpp::AloneMacroCallToken1), + ("MOZ_STATIC_LOCAL_CLASS", Cpp::MOZSTATICLOCALCLASS), + ("__stdcall", Cpp::Stdcall), + ("_abstract_declarator", Cpp::AbstractDeclarator), + ("->", Cpp::DASHGT), + ("reference_declarator", Cpp::ReferenceDeclarator), + ("template", Cpp::Template), ( - "MOZ_PRETEND_NORETURN_FOR_STATIC_ANALYSIS", - Cpp::MOZPRETENDNORETURNFORSTATICANALYSIS, + "MOZ_MUST_RETURN_FROM_CALLER_IF_THIS_IS_ARG", + Cpp::MOZMUSTRETURNFROMCALLERIFTHISISARG, ), + ("long", Cpp::Long), + ("cast_expression", Cpp::CastExpression), ("union", Cpp::Union), - ("field_declaration", Cpp::FieldDeclaration), - ("ms_restrict_modifier", Cpp::MsRestrictModifier), - ( - "MOZ_NO_DANGLING_ON_TEMPORARIES", - Cpp::MOZNODANGLINGONTEMPORARIES, - ), - ("field_identifier", Cpp::FieldIdentifier), - ("MOZ_STATIC_CLASS", Cpp::MOZSTATICCLASS), - ("...", Cpp::DOTDOTDOT), - ("MOZ_CAN_RUN_SCRIPT_BOUNDARY", Cpp::MOZCANRUNSCRIPTBOUNDARY), - ("ms_pointer_modifier", Cpp::MsPointerModifier), - ("enum_specifier", Cpp::EnumSpecifier), - ("default", Cpp::Default), - ("for", Cpp::For), - ("__thiscall", Cpp::Thiscall), - ("operator", Cpp::Operator), + ("#endif", Cpp::HASHendif), + ("u'", Cpp::USQUOTE), ("char_literal_token1", Cpp::CharLiteralToken1), - ("parameter_list", Cpp::ParameterList), - ("virtual_function_specifier", Cpp::VirtualFunctionSpecifier), + ("pointer_declarator_repeat1", Cpp::PointerDeclaratorRepeat1), + ("macro_annotation", Cpp::MacroAnnotation), ("MOZ_NORETURN_PTR", Cpp::MOZNORETURNPTR), - ("/", Cpp::SLASH), - ("PS_GET_AND_SET", Cpp::PSGETANDSET), - ("type_identifier", Cpp::TypeIdentifier), - ("continue_statement", Cpp::ContinueStatement), - ("__declspec", Cpp::Declspec), - ("[[", Cpp::LBRACKLBRACK), - ("switch_statement", Cpp::SwitchStatement), - ("translation_unit_repeat1", Cpp::TranslationUnitRepeat1), - ("&&", Cpp::AMPAMP), - ("==", Cpp::EQEQ), - ("goto_statement", Cpp::GotoStatement), - ("JS_PUBLIC_API", Cpp::JSPUBLICAPI), - ("&=", Cpp::AMPEQ), - ("initializer_list", Cpp::InitializerList), - ("PS_GET", Cpp::PSGET), - ("struct_specifier", Cpp::StructSpecifier), - ( - "abstract_reference_declarator", - Cpp::AbstractReferenceDeclarator, - ), - ("MOZ_ASAN_BLACKLIST", Cpp::MOZASANBLACKLIST), + ("<<=", Cpp::LTLTEQ), + ("this", Cpp::This), + ("return", Cpp::Return), + ("LS_TRY_UNWRAP", Cpp::LSTRYUNWRAP), ("identifier", Cpp::Identifier), - ("QM_NOTEONLY_TRY_UNWRAP", Cpp::QMNOTEONLYTRYUNWRAP), - ( - "concatenated_string_repeat1", - Cpp::ConcatenatedStringRepeat1, - ), - ("::", Cpp::COLONCOLON), - ("new_declarator", Cpp::NewDeclarator), - ( - "MOZ_NO_ADDREF_RELEASE_ON_RETURN", - Cpp::MOZNOADDREFRELEASEONRETURN, - ), - ("preproc_function_def", Cpp::PreprocFunctionDef), - ("field_declaration_list", Cpp::FieldDeclarationList), - ("--", Cpp::DASHDASH), - ("protected", Cpp::Protected), - ("MOZ_MUST_USE_TYPE", Cpp::MOZMUSTUSETYPE), - ( - "MOZ_HAVE_SIGNED_OVERFLOW_SANITIZE_ATTR", - Cpp::MOZHAVESIGNEDOVERFLOWSANITIZEATTR, - ), - ("-", Cpp::DASH), - ("enumerator_list_repeat1", Cpp::EnumeratorListRepeat1), - ("MOZ_NON_PARAM", Cpp::MOZNONPARAM), - ("preproc_params_repeat1", Cpp::PreprocParamsRepeat1), - ("ms_signed_ptr_modifier", Cpp::MsSignedPtrModifier), - ( - "template_argument_list_repeat1", - Cpp::TemplateArgumentListRepeat1, - ), - ("alias_declaration", Cpp::AliasDeclaration), - ("delete", Cpp::Delete), - ("register", Cpp::Register), - ("parenthesized_declarator", Cpp::ParenthesizedDeclarator), + ("argument_list_repeat1", Cpp::ArgumentListRepeat1), + ("#ifdef", Cpp::HASHifdef), + ("MOZ_ALWAYS_INLINE", Cpp::MOZALWAYSINLINE), + ("MOZ_COLD", Cpp::MOZCOLD), + ("...", Cpp::DOTDOTDOT), + ("array_declarator", Cpp::ArrayDeclarator), ("if", Cpp::If), - ("MOZ_XPCOM_ABI", Cpp::MOZXPCOMABI), - ("MOZ_NON_OWNING_REF", Cpp::MOZNONOWNINGREF), + ("public", Cpp::Public), ( - "MOZ_NO_ARITHMETIC_EXPR_IN_ARGUMENT", - Cpp::MOZNOARITHMETICEXPRINARGUMENT, + "abstract_parenthesized_declarator", + Cpp::AbstractParenthesizedDeclarator, ), + ("comma_expression", Cpp::CommaExpression), + ("class_specifier_repeat1", Cpp::ClassSpecifierRepeat1), + ("MOZ_TRIVIAL_CTOR_DTOR", Cpp::MOZTRIVIALCTORDTOR), + ("attribute_specifier", Cpp::AttributeSpecifier), ( - "MOZ_ONLY_USED_TO_AVOID_STATIC_CONSTRUCTORS", - Cpp::MOZONLYUSEDTOAVOIDSTATICCONSTRUCTORS, + "abstract_pointer_declarator", + Cpp::AbstractPointerDeclarator, ), - ("~", Cpp::TILDE), + ("preproc_elif", Cpp::PreprocElif), + ("_preproc_expression", Cpp::PreprocExpression), + ("initializer_list", Cpp::InitializerList), + ("#if", Cpp::HASHif), + ("<=", Cpp::LTEQ), + ("u8\\\"", Cpp::U8DQUOTE), + ("attribute_repeat1", Cpp::AttributeRepeat1), + ("preproc_include", Cpp::PreprocInclude), ( - "variadic_parameter_declaration", - Cpp::VariadicParameterDeclaration, + "function_declarator_repeat1", + Cpp::FunctionDeclaratorRepeat1, ), - ("type_definition_repeat1", Cpp::TypeDefinitionRepeat1), - ("#ifdef", Cpp::HASHifdef), - ("field_designator", Cpp::FieldDesignator), - ("trailing_return_type", Cpp::TrailingReturnType), - ("+=", Cpp::PLUSEQ), - ("preproc_include", Cpp::PreprocInclude), + ("!=", Cpp::BANGEQ), + ("MOZ_NON_OWNING_REF", Cpp::MOZNONOWNINGREF), + ("destructor_name", Cpp::DestructorName), + ("u\\\"", Cpp::UDQUOTE), + ("%", Cpp::PERCENT), + ("PS_GET_AND_SET", Cpp::PSGETANDSET), ( "sized_type_specifier_repeat1", Cpp::SizedTypeSpecifierRepeat1, ), + ("MOZ_ALLOCATOR", Cpp::MOZALLOCATOR), + ("preproc_directive", Cpp::PreprocDirective), + ("MOZ_STACK_CLASS", Cpp::MOZSTACKCLASS), + ("CACHE_TRY_INSPECT", Cpp::CACHETRYINSPECT), + ("|=", Cpp::PIPEEQ), + ("%=", Cpp::PERCENTEQ), + ("[", Cpp::LBRACK), ( - "variadic_type_parameter_declaration", - Cpp::VariadicTypeParameterDeclaration, + "MOZ_ALWAYS_INLINE_EVEN_DEBUG", + Cpp::MOZALWAYSINLINEEVENDEBUG, ), + ("PS_GET", Cpp::PSGET), + ("delete", Cpp::Delete), + ("\\n", Cpp::LF), + ("__cdecl", Cpp::Cdecl), ("restrict", Cpp::Restrict), - ("init_declarator", Cpp::InitDeclarator), - ("#elif", Cpp::HASHelif), - ("<<=", Cpp::LTLTEQ), - ("call_expression", Cpp::CallExpression), - ("type_definition", Cpp::TypeDefinition), - ("volatile", Cpp::Volatile), - ("scoped_field_identifier", Cpp::ScopedFieldIdentifier), - ("pointer_declarator", Cpp::PointerDeclarator), + ("field_declaration_repeat1", Cpp::FieldDeclarationRepeat1), + ("string_literal_token1", Cpp::StringLiteralToken1), + ("delete_method_clause", Cpp::DeleteMethodClause), + ("argument_list", Cpp::ArgumentList), + ("template_parameter_list", Cpp::TemplateParameterList), + ("ms_declspec_modifier", Cpp::MsDeclspecModifier), + ("case_statement_repeat1", Cpp::CaseStatementRepeat1), ( - "_declaration_specifiers_repeat1", - Cpp::DeclarationSpecifiersRepeat1, + "compound_literal_expression", + Cpp::CompoundLiteralExpression, ), - ("MOZ_NONHEAP_CLASS", Cpp::MOZNONHEAPCLASS), - ("for_statement", Cpp::ForStatement), - ("u8\'", Cpp::U8SQUOTE), - ("ERROR", Cpp::Error), - ("null", Cpp::Null), - ("MOZ_HAVE_NO_SANITIZE_ATTR", Cpp::MOZHAVENOSANITIZEATTR), - ("MOZ_TSAN_BLACKLIST", Cpp::MOZTSANBLACKLIST), - ("\\n", Cpp::LF), - ("enumerator", Cpp::Enumerator), - ("system_lib_string", Cpp::SystemLibString), - ("scoped_identifier", Cpp::ScopedIdentifier), - ("using", Cpp::Using), - ("!", Cpp::BANG), - ("throw_statement", Cpp::ThrowStatement), + ("typename", Cpp::Typename), + ("statement_identifier", Cpp::StatementIdentifier), + ("false", Cpp::False), + ("alone_macro_call_repeat1", Cpp::AloneMacroCallRepeat1), ("update_expression", Cpp::UpdateExpression), - ("destructor_name", Cpp::DestructorName), - (",", Cpp::COMMA), - ("}", Cpp::RBRACE), - ("friend", Cpp::Friend), - ("template_function", Cpp::TemplateFunction), - ("preproc_params", Cpp::PreprocParams), - ("private", Cpp::Private), - ("_empty_declaration", Cpp::EmptyDeclaration), - ("^", Cpp::CARET), - (":", Cpp::COLON), - ("parameter_pack_expansion", Cpp::ParameterPackExpansion), - ("ms_unsigned_ptr_modifier", Cpp::MsUnsignedPtrModifier), - ("preproc_ifdef", Cpp::PreprocIfdef), - ("||", Cpp::PIPEPIPE), - ("]]", Cpp::RBRACKRBRACK), - ("!=", Cpp::BANGEQ), - ("else", Cpp::Else), + ("++", Cpp::PLUSPLUS), + ("pointer_declarator", Cpp::PointerDeclarator), + ("preproc_call", Cpp::PreprocCall), + ("-", Cpp::DASH), + ("__fastcall", Cpp::Fastcall), + ("{", Cpp::LBRACE), + ("virtual", Cpp::Virtual), + ("QM_WARNONLY_TRY_UNWRAP", Cpp::QMWARNONLYTRYUNWRAP), + ("catch_clause", Cpp::CatchClause), + ("storage_class_specifier", Cpp::StorageClassSpecifier), + ("scoped_type_identifier", Cpp::ScopedTypeIdentifier), + ("explicit", Cpp::Explicit), + ("string_literal_repeat1", Cpp::StringLiteralRepeat1), ( - "MOZ_NEEDS_MEMMOVABLE_MEMBERS", - Cpp::MOZNEEDSMEMMOVABLEMEMBERS, + "function_declarator_repeat2", + Cpp::FunctionDeclaratorRepeat2, ), - ("MOZ_HEAP_ALLOCATOR", Cpp::MOZHEAPALLOCATOR), - ("__vectorcall", Cpp::Vectorcall), - ("MOZ_MUST_USE", Cpp::MOZMUSTUSE), - ("declaration_repeat1", Cpp::DeclarationRepeat1), + ("MOZ_HEAP_CLASS", Cpp::MOZHEAPCLASS), + ("unary_expression", Cpp::UnaryExpression), ( - "MOZ_HAVE_UNSIGNED_OVERFLOW_SANITIZE_ATTR", - Cpp::MOZHAVEUNSIGNEDOVERFLOWSANITIZEATTR, + "field_initializer_list_repeat1", + Cpp::FieldInitializerListRepeat1, ), - ("static_assert", Cpp::StaticAssert), - ("cast_expression", Cpp::CastExpression), - ("subscript_expression", Cpp::SubscriptExpression), - ("preproc_call", Cpp::PreprocCall), - ("translation_unit", Cpp::TranslationUnit), ( - "MOZ_PUSH_DISABLE_NONTRIVIAL_UNION_WARNINGS", - Cpp::MOZPUSHDISABLENONTRIVIALUNIONWARNINGS, + "abstract_reference_declarator", + Cpp::AbstractReferenceDeclarator, ), - ("namespace_identifier", Cpp::NamespaceIdentifier), - ("false", Cpp::False), - ("char_literal", Cpp::CharLiteral), - ("MOZ_COLD", Cpp::MOZCOLD), - ("QM_WARNONLY_TRY_UNWRAP", Cpp::QMWARNONLYTRYUNWRAP), - ("concatenated_string", Cpp::ConcatenatedString), - ("_type_declarator", Cpp::TypeDeclarator), - ("virtual", Cpp::Virtual), - ("base_class_clause_repeat1", Cpp::BaseClassClauseRepeat1), - ("alone_macro_call", Cpp::AloneMacroCall), - ("noexcept", Cpp::Noexcept), - ("new_expression", Cpp::NewExpression), - ("#else", Cpp::HASHelse), - ("_Atomic", Cpp::Atomic), - ("LS_TRY_UNWRAP", Cpp::LSTRYUNWRAP), - ("namespace", Cpp::Namespace), - ("virtual_specifier", Cpp::VirtualSpecifier), - ("sizeof", Cpp::Sizeof), - ("this", Cpp::This), - ("[", Cpp::LBRACK), - ("preproc_def", Cpp::PreprocDef), - ("u\'", Cpp::USQUOTE), ( - "preproc_argument_list_repeat1", - Cpp::PreprocArgumentListRepeat1, + "MOZ_NO_ARITHMETIC_EXPR_IN_ARGUMENT", + Cpp::MOZNOARITHMETICEXPRINARGUMENT, ), - ("new", Cpp::New), - ("CACHE_TRY_UNWRAP", Cpp::CACHETRYUNWRAP), + ("LS_TRY_INSPECT", Cpp::LSTRYINSPECT), + ("goto", Cpp::Goto), + ("end", Cpp::End), + ("ms_restrict_modifier", Cpp::MsRestrictModifier), + ("struct_specifier", Cpp::StructSpecifier), + ("operator_cast", Cpp::OperatorCast), + ("struct", Cpp::Struct), + ("namespace_definition", Cpp::NamespaceDefinition), ("raw_string_literal", Cpp::RawStringLiteral), - ("]", Cpp::RBRACK), - ("{", Cpp::LBRACE), - ("%", Cpp::PERCENT), - ("union_specifier", Cpp::UnionSpecifier), - ("CACHE_TRY_INSPECT", Cpp::CACHETRYINSPECT), - ("MOZ_TRIVIAL_CTOR_DTOR", Cpp::MOZTRIVIALCTORDTOR), - ( - "field_initializer_list_repeat1", - Cpp::FieldInitializerListRepeat1, - ), - ("try", Cpp::Try), - ("case_statement", Cpp::CaseStatement), ("extern", Cpp::Extern), - (">>=", Cpp::GTGTEQ), - ("MOZ_TEMPORARY_CLASS", Cpp::MOZTEMPORARYCLASS), - ("MOZ_NEVER_INLINE", Cpp::MOZNEVERINLINE), - ("operator_cast", Cpp::OperatorCast), - ("attribute_specifier", Cpp::AttributeSpecifier), - ("signed", Cpp::Signed), - ("|=", Cpp::PIPEEQ), - ("if_statement", Cpp::IfStatement), - ("unary_expression", Cpp::UnaryExpression), - ("IDB_TRY_UNWRAP", Cpp::IDBTRYUNWRAP), - ("sized_type_specifier", Cpp::SizedTypeSpecifier), + ("CACHE_TRY_UNWRAP", Cpp::CACHETRYUNWRAP), ("lambda_expression", Cpp::LambdaExpression), - ("lambda_capture_specifier", Cpp::LambdaCaptureSpecifier), - ("_abstract_declarator", Cpp::AbstractDeclarator), - ("inline", Cpp::Inline), + ("lambda_default_capture", Cpp::LambdaDefaultCapture), + ("SDB_TRY_UNWRAP", Cpp::SDBTRYUNWRAP), + ("namespace_identifier", Cpp::NamespaceIdentifier), + ("__declspec", Cpp::Declspec), + ("binary_expression", Cpp::BinaryExpression), + ("parenthesized_declarator", Cpp::ParenthesizedDeclarator), + ("throw", Cpp::Throw), + ("initializer_pair_repeat1", Cpp::InitializerPairRepeat1), + ("decltype", Cpp::Decltype), + ("unsigned", Cpp::Unsigned), + ("_enum_base_clause", Cpp::EnumBaseClause), ( - "optional_parameter_declaration", - Cpp::OptionalParameterDeclaration, + "MOZ_NO_SANITIZE_UNSIGNED_OVERFLOW", + Cpp::MOZNOSANITIZEUNSIGNEDOVERFLOW, ), - ("scoped_type_identifier", Cpp::ScopedTypeIdentifier), - ("__cdecl", Cpp::Cdecl), - ("L\'", Cpp::LSQUOTE), - ("_declarator", Cpp::Declarator), - (")", Cpp::RPAREN), - ("%=", Cpp::PERCENTEQ), - (">=", Cpp::GTEQ), - ("\'", Cpp::SQUOTE), - ("MOZ_MUST_OVERRIDE", Cpp::MOZMUSTOVERRIDE), - ("long", Cpp::Long), - ("return", Cpp::Return), - ("MOZ_NEEDS_NO_VTABLE_TYPE", Cpp::MOZNEEDSNOVTABLETYPE), - ("MOZ_NON_AUTOABLE", Cpp::MOZNONAUTOABLE), - ("initializer_list_repeat1", Cpp::InitializerListRepeat1), - ("ms_call_modifier", Cpp::MsCallModifier), - ("do_statement", Cpp::DoStatement), - ("namespace_definition", Cpp::NamespaceDefinition), - ("switch", Cpp::Switch), + ("#include", Cpp::HASHinclude), + ("type_parameter_declaration", Cpp::TypeParameterDeclaration), ("_declaration_specifiers", Cpp::DeclarationSpecifiers), - ("nullptr", Cpp::Nullptr), - ("macro_statement", Cpp::MacroStatement), + ("__vectorcall", Cpp::Vectorcall), ( - "_field_declaration_list_item", - Cpp::FieldDeclarationListItem, + "abstract_function_declarator", + Cpp::AbstractFunctionDeclarator, ), - ("compound_statement", Cpp::CompoundStatement), - ("MOZ_ALWAYS_INLINE", Cpp::MOZALWAYSINLINE), - ("type_qualifier", Cpp::TypeQualifier), + ("_field_declarator", Cpp::FieldDeclarator), + ("register", Cpp::Register), + ("friend_declaration", Cpp::FriendDeclaration), ( - "scoped_namespace_identifier", - Cpp::ScopedNamespaceIdentifier, + "_declaration_specifiers_repeat1", + Cpp::DeclarationSpecifiersRepeat1, ), - ("labeled_statement", Cpp::LabeledStatement), - ("delete_expression", Cpp::DeleteExpression), - ("template_declaration", Cpp::TemplateDeclaration), - ("^=", Cpp::CARETEQ), + ("&", Cpp::AMP), + ("alias_declaration", Cpp::AliasDeclaration), + ("static_assert", Cpp::StaticAssert), + ("ms_based_modifier", Cpp::MsBasedModifier), + ("enumerator_list", Cpp::EnumeratorList), + ("MOZ_MAYBE_UNUSED", Cpp::MOZMAYBEUNUSED), + ("new_declarator", Cpp::NewDeclarator), + ("MOZ_UNSAFE_REF", Cpp::MOZUNSAFEREF), + ("noexcept", Cpp::Noexcept), + ("return_statement", Cpp::ReturnStatement), + (".", Cpp::DOT), + ("--", Cpp::DASHDASH), + ("variadic_declarator", Cpp::VariadicDeclarator), + ("MOZ_HAVE_ANALYZER_NORETURN", Cpp::MOZHAVEANALYZERNORETURN), ( - "structured_binding_declarator_repeat1", - Cpp::StructuredBindingDeclaratorRepeat1, + "_call_macro_with_decl_first_arg", + Cpp::CallMacroWithDeclFirstArg, ), - ("MOZ_HAVE_NORETURN_PTR", Cpp::MOZHAVENORETURNPTR), - ("continue", Cpp::Continue), - ("&", Cpp::AMP), - ("<", Cpp::LT), - ("_constructor_specifiers", Cpp::ConstructorSpecifiers), - ("u8\\\"", Cpp::U8DQUOTE), - ("MOZ_STACK_CLASS", Cpp::MOZSTACKCLASS), - ("template", Cpp::Template), - ("linkage_specification", Cpp::LinkageSpecification), - (">>", Cpp::GTGT), - ("MOZ_FALLTHROUGH", Cpp::MOZFALLTHROUGH), + ("function_declarator", Cpp::FunctionDeclarator), + ("preproc_def", Cpp::PreprocDef), + ("+=", Cpp::PLUSEQ), + ("template_argument_list", Cpp::TemplateArgumentList), + ("]]", Cpp::RBRACKRBRACK), + ("number_literal", Cpp::NumberLiteral), + ("MOZ_NON_PARAM", Cpp::MOZNONPARAM), + ("goto_statement", Cpp::GotoStatement), + ("~", Cpp::TILDE), + ("defined", Cpp::Defined), + ("namespace", Cpp::Namespace), + ("for_statement", Cpp::ForStatement), + ("_unaligned", Cpp::Unaligned), + ("for", Cpp::For), + ("preproc_function_def", Cpp::PreprocFunctionDef), + ("call_expression", Cpp::CallExpression), + ("using", Cpp::Using), + ("enumerator_list_repeat1", Cpp::EnumeratorListRepeat1), + ("ms_call_modifier", Cpp::MsCallModifier), ( - "MOZ_ALWAYS_INLINE_EVEN_DEBUG", - Cpp::MOZALWAYSINLINEEVENDEBUG, + "MOZ_CAN_RUN_SCRIPT_FOR_DEFINITION", + Cpp::MOZCANRUNSCRIPTFORDEFINITION, ), - ("abstract_array_declarator", Cpp::AbstractArrayDeclarator), - ("template_method", Cpp::TemplateMethod), - ("template_type", Cpp::TemplateType), - ("while", Cpp::While), - ("override", Cpp::Override), + ("MOZ_NEEDS_MEMMOVABLE_TYPE", Cpp::MOZNEEDSMEMMOVABLETYPE), + ("sizeof_expression", Cpp::SizeofExpression), + ("\\\"", Cpp::DQUOTE), + ("MOZ_HAVE_NO_SANITIZE_ATTR", Cpp::MOZHAVENOSANITIZEATTR), + ( + "concatenated_string_repeat1", + Cpp::ConcatenatedStringRepeat1, + ), + ("parameter_pack_expansion", Cpp::ParameterPackExpansion), + ("enum", Cpp::Enum), + ("alone_macro", Cpp::AloneMacro), + ("MOZ_TEMPORARY_CLASS", Cpp::MOZTEMPORARYCLASS), ("static", Cpp::Static), - ("preproc_directive", Cpp::PreprocDirective), - ("QM_TRY_INSPECT", Cpp::QMTRYINSPECT), - ("lambda_default_capture", Cpp::LambdaDefaultCapture), - ("unsigned", Cpp::Unsigned), - ("array_declarator", Cpp::ArrayDeclarator), + ("&&", Cpp::AMPAMP), + ("default", Cpp::Default), + ("ms_signed_ptr_modifier", Cpp::MsSignedPtrModifier), + ("::", Cpp::COLONCOLON), + ("labeled_statement", Cpp::LabeledStatement), + ("^=", Cpp::CARETEQ), + (";", Cpp::SEMI), + ("MOZ_NONHEAP_CLASS", Cpp::MOZNONHEAPCLASS), + ("ERROR", Cpp::Error), + ("scoped_identifier", Cpp::ScopedIdentifier), + ("declaration_list", Cpp::DeclarationList), ("case", Cpp::Case), - ("MOZ_IS_REFPTR", Cpp::MOZISREFPTR), - ("PS_GET_LOCKLESS", Cpp::PSGETLOCKLESS), - ("const", Cpp::Const), - ("field_declaration_repeat1", Cpp::FieldDeclarationRepeat1), - ("argument_list", Cpp::ArgumentList), - ("break_statement", Cpp::BreakStatement), - ("storage_class_specifier", Cpp::StorageClassSpecifier), - ("MOZ_IS_CLASS_INIT", Cpp::MOZISCLASSINIT), - ("__clrcall", Cpp::Clrcall), + ("_Atomic", Cpp::Atomic), + ("translation_unit", Cpp::TranslationUnit), + ("sized_type_specifier", Cpp::SizedTypeSpecifier), + ("init_declarator", Cpp::InitDeclarator), + ("escape_sequence", Cpp::EscapeSequence), + ("MOZ_TSAN_BLACKLIST", Cpp::MOZTSANBLACKLIST), + ("string_literal", Cpp::StringLiteral), + ("base_class_clause_repeat1", Cpp::BaseClassClauseRepeat1), + (">", Cpp::GT), ( - "MOZ_MAY_CALL_AFTER_MUST_RETURN", - Cpp::MOZMAYCALLAFTERMUSTRETURN, + "structured_binding_declarator", + Cpp::StructuredBindingDeclarator, ), - ("template_argument_list", Cpp::TemplateArgumentList), - ("final", Cpp::Final), + ("new_expression", Cpp::NewExpression), + ("=", Cpp::EQ), + ("attribute", Cpp::Attribute), + ( + "preproc_if_in_field_declaration_list_repeat1", + Cpp::PreprocIfInFieldDeclarationListRepeat1, + ), + ("sizeof", Cpp::Sizeof), + ("break", Cpp::Break), ( "abstract_function_declarator_repeat1", Cpp::AbstractFunctionDeclaratorRepeat1, ), - ("condition_clause", Cpp::ConditionClause), + ("ms_pointer_modifier", Cpp::MsPointerModifier), + ("pointer_expression", Cpp::PointerExpression), + ("bitfield_clause", Cpp::BitfieldClause), + ("MOZ_NON_AUTOABLE", Cpp::MOZNONAUTOABLE), + ("FORWARD_SET_ATTRIBUTE", Cpp::FORWARDSETATTRIBUTE), + ("preproc_params", Cpp::PreprocParams), + ("template_method", Cpp::TemplateMethod), + ("MOZ_REQUIRED_BASE_METHOD", Cpp::MOZREQUIREDBASEMETHOD), + ("(", Cpp::LPAREN), + (">=", Cpp::GTEQ), + ("base_class_clause", Cpp::BaseClassClause), + ("virtual_function_specifier", Cpp::VirtualFunctionSpecifier), + ("MOZ_ALLOW_TEMPORARY", Cpp::MOZALLOWTEMPORARY), + ("conditional_expression", Cpp::ConditionalExpression), + ("_class_name", Cpp::ClassName), + ("parameter_declaration", Cpp::ParameterDeclaration), ( - "MOZ_NO_SANITIZE_SIGNED_OVERFLOW", - Cpp::MOZNOSANITIZESIGNEDOVERFLOW, + "MOZ_HAVE_UNSIGNED_OVERFLOW_SANITIZE_ATTR", + Cpp::MOZHAVEUNSIGNEDOVERFLOWSANITIZEATTR, ), - ("using_declaration", Cpp::UsingDeclaration), - ("MOZ_STATIC_LOCAL_CLASS", Cpp::MOZSTATICLOCALCLASS), + ("MOZ_OWNING_REF", Cpp::MOZOWNINGREF), + ("<<", Cpp::LTLT), + ("else", Cpp::Else), + ("primitive_type", Cpp::PrimitiveType), + ("MOZ_CAN_RUN_SCRIPT_BOUNDARY", Cpp::MOZCANRUNSCRIPTBOUNDARY), + ("preproc_defined", Cpp::PreprocDefined), + ("MOZ_STATIC_CLASS", Cpp::MOZSTATICCLASS), + ("friend", Cpp::Friend), + ("#ifndef", Cpp::HASHifndef), + ("new", Cpp::New), ( - "abstract_pointer_declarator", - Cpp::AbstractPointerDeclarator, + "structured_binding_declarator_repeat1", + Cpp::StructuredBindingDeclaratorRepeat1, + ), + ("FORWARD", Cpp::FORWARD), + ("MOZ_INIT_OUTSIDE_CTOR", Cpp::MOZINITOUTSIDECTOR), + ("type_definition", Cpp::TypeDefinition), + ("IDB_TRY_INSPECT", Cpp::IDBTRYINSPECT), + ("_constructor_specifiers", Cpp::ConstructorSpecifiers), + ("MOZ_CAN_RUN_SCRIPT", Cpp::MOZCANRUNSCRIPT), + ("access_specifier", Cpp::AccessSpecifier), + ( + "MOZ_POP_DISABLE_NONTRIVIAL_UNION_WARNINGS", + Cpp::MOZPOPDISABLENONTRIVIALUNIONWARNINGS, ), + ("QM_TRY_UNWRAP", Cpp::QMTRYUNWRAP), + ("==", Cpp::EQEQ), + ("'", Cpp::SQUOTE), + ("_empty_declaration", Cpp::EmptyDeclaration), + ("scoped_field_identifier", Cpp::ScopedFieldIdentifier), + ("try", Cpp::Try), + ("case_statement", Cpp::CaseStatement), + ("_expression", Cpp::Expression), ( - "_call_macro_with_decl_first_arg", - Cpp::CallMacroWithDeclFirstArg, + "function_definition_repeat1", + Cpp::FunctionDefinitionRepeat1, ), - ("/=", Cpp::SLASHEQ), - ("expression_statement", Cpp::ExpressionStatement), - ("enum", Cpp::Enum), + ("override", Cpp::Override), + ("continue_statement", Cpp::ContinueStatement), + ("volatile", Cpp::Volatile), + ( + "MOZ_IS_SMARTPTR_TO_REFCOUNTED", + Cpp::MOZISSMARTPTRTOREFCOUNTED, + ), + ("virtual_specifier", Cpp::VirtualSpecifier), + ("?", Cpp::QMARK), + ("field_initializer_list", Cpp::FieldInitializerList), + ("constexpr", Cpp::Constexpr), + ("QM_TRY_INSPECT", Cpp::QMTRYINSPECT), + ("macro_statement", Cpp::MacroStatement), + ( + "preproc_argument_list_repeat1", + Cpp::PreprocArgumentListRepeat1, + ), + ("parameter_list", Cpp::ParameterList), + ("MOZ_HAVE_NORETURN_PTR", Cpp::MOZHAVENORETURNPTR), + ("char_literal", Cpp::CharLiteral), ("for_range_loop", Cpp::ForRangeLoop), - ("-=", Cpp::DASHEQ), - ("friend_declaration", Cpp::FriendDeclaration), - ("MOZ_ALLOCATOR", Cpp::MOZALLOCATOR), - ("enumerator_list", Cpp::EnumeratorList), + ("ms_unsigned_ptr_modifier", Cpp::MsUnsignedPtrModifier), ( "MOZ_INHERIT_TYPE_ANNOTATIONS_FROM_TEMPLATE_ARGS", Cpp::MOZINHERITTYPEANNOTATIONSFROMTEMPLATEARGS, ), - ("MOZ_ALLOW_TEMPORARY", Cpp::MOZALLOWTEMPORARY), - ("constexpr", Cpp::Constexpr), - ("L\\\"", Cpp::LDQUOTE), - ("FORWARD", Cpp::FORWARD), - ("string_literal_repeat1", Cpp::StringLiteralRepeat1), - ("preproc_arg", Cpp::PreprocArg), - ("MOZ_CAN_RUN_SCRIPT", Cpp::MOZCANRUNSCRIPT), - ("MOZ_OWNING_REF", Cpp::MOZOWNINGREF), - ("catch", Cpp::Catch), - ("conditional_expression", Cpp::ConditionalExpression), - ("try_statement_repeat1", Cpp::TryStatementRepeat1), - ("short", Cpp::Short), - ("catch_clause", Cpp::CatchClause), + ("delete_expression", Cpp::DeleteExpression), + ("L'", Cpp::LSQUOTE), + ("]", Cpp::RBRACK), + ( + "scoped_namespace_identifier", + Cpp::ScopedNamespaceIdentifier, + ), + ("/", Cpp::SLASH), + ("translation_unit_repeat1", Cpp::TranslationUnitRepeat1), + ("MOZ_NEEDS_NO_VTABLE_TYPE", Cpp::MOZNEEDSNOVTABLETYPE), + ("switch_statement", Cpp::SwitchStatement), + ("IDB_TRY_UNWRAP", Cpp::IDBTRYUNWRAP), + ("preproc_else", Cpp::PreprocElse), + ("enumerator", Cpp::Enumerator), + ("type_identifier", Cpp::TypeIdentifier), + ("lambda_capture_specifier", Cpp::LambdaCaptureSpecifier), + ("u8'", Cpp::U8SQUOTE), + ("MOZ_NONNULL", Cpp::MOZNONNULL), + ("auto", Cpp::Auto), + ("*", Cpp::STAR), + ("abstract_array_declarator", Cpp::AbstractArrayDeclarator), + ("SDB_TRY_INSPECT", Cpp::SDBTRYINSPECT), ("MOZ_HAVE_NEVER_INLINE", Cpp::MOZHAVENEVERINLINE), - ("MOZ_FORMAT_PRINTF", Cpp::MOZFORMATPRINTF), - ("_class_name", Cpp::ClassName), - ("typename", Cpp::Typename), ( - "preproc_if_in_field_declaration_list_repeat1", - Cpp::PreprocIfInFieldDeclarationListRepeat1, + "MOZ_PRETEND_NORETURN_FOR_STATIC_ANALYSIS", + Cpp::MOZPRETENDNORETURNFORSTATICANALYSIS, + ), + ("enum_specifier", Cpp::EnumSpecifier), + ("private", Cpp::Private), + ( + "MOZ_NEEDS_MEMMOVABLE_MEMBERS", + Cpp::MOZNEEDSMEMMOVABLEMEMBERS, ), - ("type_parameter_declaration", Cpp::TypeParameterDeclaration), - ("escape_sequence", Cpp::EscapeSequence), - ("throw_specifier_repeat1", Cpp::ThrowSpecifierRepeat1), ( - "abstract_function_declarator", - Cpp::AbstractFunctionDeclarator, + "variadic_parameter_declaration", + Cpp::VariadicParameterDeclaration, ), + ("MOZ_IS_CLASS_INIT", Cpp::MOZISCLASSINIT), + ("MOZ_HEAP_ALLOCATOR", Cpp::MOZHEAPALLOCATOR), + ("null", Cpp::Null), + ("do_statement", Cpp::DoStatement), ( - "optional_type_parameter_declaration", - Cpp::OptionalTypeParameterDeclaration, + "template_template_parameter_declaration", + Cpp::TemplateTemplateParameterDeclaration, ), - ("attribute", Cpp::Attribute), - ("MOZ_HEAP_CLASS", Cpp::MOZHEAPCLASS), - ("preproc_if", Cpp::PreprocIf), - ("static_assert_declaration", Cpp::StaticAssertDeclaration), - ("attribute_repeat1", Cpp::AttributeRepeat1), - ("#define", Cpp::HASHdefine), - ("binary_expression", Cpp::BinaryExpression), - ("end", Cpp::End), - ("preproc_elif", Cpp::PreprocElif), - ("FORWARD_SET_ATTRIBUTE", Cpp::FORWARDSETATTRIBUTE), - ("subscript_designator", Cpp::SubscriptDesignator), - ("#if", Cpp::HASHif), - ("#ifndef", Cpp::HASHifndef), - ("MOZ_REQUIRED_BASE_METHOD", Cpp::MOZREQUIREDBASEMETHOD), - ("MOZ_NEVER_INLINE_DEBUG", Cpp::MOZNEVERINLINEDEBUG), + ("try_statement_repeat1", Cpp::TryStatementRepeat1), + ("function_definition", Cpp::FunctionDefinition), + ("switch", Cpp::Switch), ( - "function_definition_repeat1", - Cpp::FunctionDefinitionRepeat1, + "template_argument_list_repeat1", + Cpp::TemplateArgumentListRepeat1, ), - ("MOZ_HAVE_ANALYZER_NORETURN", Cpp::MOZHAVEANALYZERNORETURN), + ("MOZ_NORETURN", Cpp::MOZNORETURN), + ("linkage_specification", Cpp::LinkageSpecification), + ("MOZ_HAVE_NORETURN", Cpp::MOZHAVENORETURN), + ("/=", Cpp::SLASHEQ), + ("[[", Cpp::LBRACKLBRACK), ( - "MOZ_DECL_USE_GUARD_OBJECT_NOTIFIER", - Cpp::MOZDECLUSEGUARDOBJECTNOTIFIER, + "MOZ_ONLY_USED_TO_AVOID_STATIC_CONSTRUCTORS", + Cpp::MOZONLYUSEDTOAVOIDSTATICCONSTRUCTORS, ), + ("__thiscall", Cpp::Thiscall), + ("ms_unaligned_ptr_modifier", Cpp::MsUnalignedPtrModifier), + ("L\\\"", Cpp::LDQUOTE), + ("field_initializer", Cpp::FieldInitializer), + ("MOZ_MUST_OVERRIDE", Cpp::MOZMUSTOVERRIDE), + ("field_expression", Cpp::FieldExpression), + ("type_definition_repeat2", Cpp::TypeDefinitionRepeat2), + ("dependent_type", Cpp::DependentType), + ("_type_declarator", Cpp::TypeDeclarator), + ("parameter_list_repeat1", Cpp::ParameterListRepeat1), + ("preproc_arg", Cpp::PreprocArg), + ("alone_macro_call", Cpp::AloneMacroCall), + ("MOZ_NON_TEMPORARY_CLASS", Cpp::MOZNONTEMPORARYCLASS), + ("subscript_expression", Cpp::SubscriptExpression), + ("MOZ_IMPLICIT", Cpp::MOZIMPLICIT), + ("const", Cpp::Const), + ("typedef", Cpp::Typedef), + ("type_definition_repeat1", Cpp::TypeDefinitionRepeat1), + ("comment", Cpp::Comment), + ("signed", Cpp::Signed), + (">>", Cpp::GTGT), ( - "MOZ_MUST_RETURN_FROM_CALLER_IF_THIS_IS_ARG", - Cpp::MOZMUSTRETURNFROMCALLERIFTHISISARG, + "MOZ_DECL_USE_GUARD_OBJECT_NOTIFIER", + Cpp::MOZDECLUSEGUARDOBJECTNOTIFIER, ), - ("u\\\"", Cpp::UDQUOTE), - ("MOZ_NORETURN", Cpp::MOZNORETURN), - ("pointer_declarator_repeat1", Cpp::PointerDeclaratorRepeat1), - ("IDB_TRY_INSPECT", Cpp::IDBTRYINSPECT), - ("struct", Cpp::Struct), - ("decltype", Cpp::Decltype), - ("MOZ_MAYBE_UNUSED", Cpp::MOZMAYBEUNUSED), - (">", Cpp::GT), - ("QM_TRY_UNWRAP", Cpp::QMTRYUNWRAP), - ("sizeof_expression", Cpp::SizeofExpression), - ("while_statement", Cpp::WhileStatement), - ("__based", Cpp::Based), - ("goto", Cpp::Goto), - ("break", Cpp::Break), - ("throw", Cpp::Throw), - ("variadic_declarator", Cpp::VariadicDeclarator), + ("catch", Cpp::Catch), + ("final", Cpp::Final), + ("field_declaration", Cpp::FieldDeclaration), + ("try_statement", Cpp::TryStatement), + ("break_statement", Cpp::BreakStatement), + ("field_identifier", Cpp::FieldIdentifier), + ("template_function", Cpp::TemplateFunction), + ("short", Cpp::Short), + ("JS_PUBLIC_API", Cpp::JSPUBLICAPI), + ("#define", Cpp::HASHdefine), + ("inline", Cpp::Inline), + ("+", Cpp::PLUS), + ("class", Cpp::Class), ( "template_parameter_list_repeat1", Cpp::TemplateParameterListRepeat1, ), - ("function_declarator", Cpp::FunctionDeclarator), - ("return_statement", Cpp::ReturnStatement), - ("field_expression", Cpp::FieldExpression), - ("initializer_pair_repeat1", Cpp::InitializerPairRepeat1), + ("MOZ_MUST_USE_TYPE", Cpp::MOZMUSTUSETYPE), ( - "function_declarator_repeat1", - Cpp::FunctionDeclaratorRepeat1, + "MOZ_PUSH_DISABLE_NONTRIVIAL_UNION_WARNINGS", + Cpp::MOZPUSHDISABLENONTRIVIALUNIONWARNINGS, + ), + ("declaration_repeat1", Cpp::DeclarationRepeat1), + ("using_declaration", Cpp::UsingDeclaration), + ("preproc_ifdef", Cpp::PreprocIfdef), + ("compound_statement", Cpp::CompoundStatement), + ("MOZ_NEVER_INLINE", Cpp::MOZNEVERINLINE), + ("preproc_params_repeat1", Cpp::PreprocParamsRepeat1), + ("mutable", Cpp::Mutable), + ("||", Cpp::PIPEPIPE), + ("throw_statement", Cpp::ThrowStatement), + ("type_qualifier", Cpp::TypeQualifier), + ("default_method_clause", Cpp::DefaultMethodClause), + ("do", Cpp::Do), + ("MOZ_XPCOM_ABI", Cpp::MOZXPCOMABI), + ( + "_field_declaration_list_item", + Cpp::FieldDeclarationListItem, ), + ("#elif", Cpp::HASHelif), + ("MOZ_MUST_USE", Cpp::MOZMUSTUSE), + ("_type_specifier", Cpp::TypeSpecifier), ( - "MOZ_NO_SANITIZE_UNSIGNED_OVERFLOW", - Cpp::MOZNOSANITIZEUNSIGNEDOVERFLOW, + "MOZ_NO_SANITIZE_SIGNED_OVERFLOW", + Cpp::MOZNOSANITIZESIGNEDOVERFLOW, ), - ("MOZ_NON_TEMPORARY_CLASS", Cpp::MOZNONTEMPORARYCLASS), + ("initializer_pair", Cpp::InitializerPair), + ("condition_clause", Cpp::ConditionClause), + ("protected", Cpp::Protected), ( "explicit_function_specifier", Cpp::ExplicitFunctionSpecifier, ), - ("macro_annotation", Cpp::MacroAnnotation), - ("string_literal", Cpp::StringLiteral), - (".", Cpp::DOT), - ("base_class_clause", Cpp::BaseClassClause), - ("_field_declarator", Cpp::FieldDeclarator), - ("*", Cpp::STAR), - ("MOZ_UNSAFE_REF", Cpp::MOZUNSAFEREF), - ("field_initializer", Cpp::FieldInitializer), + ("PS_GET_LOCKLESS", Cpp::PSGETLOCKLESS), + (":", Cpp::COLON), + ("operator_name", Cpp::OperatorName), + ("MOZ_RAII", Cpp::MOZRAII), + ("union_specifier", Cpp::UnionSpecifier), + ("concatenated_string", Cpp::ConcatenatedString), + ("MOZ_HAVE_ASAN_BLACKLIST", Cpp::MOZHAVEASANBLACKLIST), + ("MOZ_FORMAT_PRINTF", Cpp::MOZFORMATPRINTF), ( - "MOZ_CAN_RUN_SCRIPT_FOR_DEFINITION", - Cpp::MOZCANRUNSCRIPTFORDEFINITION, + "optional_parameter_declaration", + Cpp::OptionalParameterDeclaration, ), + ("preproc_if", Cpp::PreprocIf), + ("while_statement", Cpp::WhileStatement), + ("subscript_designator", Cpp::SubscriptDesignator), + ("!", Cpp::BANG), + ("trailing_return_type", Cpp::TrailingReturnType), + ("throw_specifier", Cpp::ThrowSpecifier), + (">>=", Cpp::GTGTEQ), + (")", Cpp::RPAREN), + ("QM_NOTEONLY_TRY_UNWRAP", Cpp::QMNOTEONLYTRYUNWRAP), + ("MOZ_NEVER_INLINE_DEBUG", Cpp::MOZNEVERINLINEDEBUG), + ("initializer_list_repeat1", Cpp::InitializerListRepeat1), ( - "abstract_parenthesized_declarator", - Cpp::AbstractParenthesizedDeclarator, + "optional_type_parameter_declaration", + Cpp::OptionalTypeParameterDeclaration, ), - ("function_definition", Cpp::FunctionDefinition), - ("initializer_pair", Cpp::InitializerPair), - ("ms_unaligned_ptr_modifier", Cpp::MsUnalignedPtrModifier), - ("class_specifier", Cpp::ClassSpecifier), - ("parenthesized_expression", Cpp::ParenthesizedExpression), + ("|", Cpp::PIPE), ( - "template_template_parameter_declaration", - Cpp::TemplateTemplateParameterDeclaration, + "variadic_type_parameter_declaration", + Cpp::VariadicTypeParameterDeclaration, ), - ("statement_identifier", Cpp::StatementIdentifier), - ("MOZ_NEEDS_MEMMOVABLE_TYPE", Cpp::MOZNEEDSMEMMOVABLETYPE), ( - "compound_literal_expression", - Cpp::CompoundLiteralExpression, + "MOZ_MAY_CALL_AFTER_MUST_RETURN", + Cpp::MOZMAYCALLAFTERMUSTRETURN, ), - ("dependent_type", Cpp::DependentType), - ("(", Cpp::LPAREN), - ("|", Cpp::PIPE), + ("}", Cpp::RBRACE), + ("throw_specifier_repeat1", Cpp::ThrowSpecifierRepeat1), + ("MOZ_FALLTHROUGH", Cpp::MOZFALLTHROUGH), + ("<", Cpp::LT), + ("*=", Cpp::STAREQ), ( - "MOZ_IS_SMARTPTR_TO_REFCOUNTED", - Cpp::MOZISSMARTPTRTOREFCOUNTED, + "MOZ_NO_DANGLING_ON_TEMPORARIES", + Cpp::MOZNODANGLINGONTEMPORARIES, ), - ("template_parameter_list", Cpp::TemplateParameterList), - ("ms_based_modifier", Cpp::MsBasedModifier), - ("alone_macro", Cpp::AloneMacro), - ("preproc_else", Cpp::PreprocElse), - ("MOZ_HAVE_NORETURN", Cpp::MOZHAVENORETURN), - ("LS_TRY_INSPECT", Cpp::LSTRYINSPECT), - ("comma_expression", Cpp::CommaExpression), - ("class_specifier_repeat1", Cpp::ClassSpecifierRepeat1), - ("++", Cpp::PLUSPLUS), - ("class", Cpp::Class), - ("comment", Cpp::Comment), - ("access_specifier", Cpp::AccessSpecifier), - ("SDB_TRY_UNWRAP", Cpp::SDBTRYUNWRAP), - ("preproc_defined", Cpp::PreprocDefined), - ("__stdcall", Cpp::Stdcall), - ("_expression", Cpp::Expression), - ("mutable", Cpp::Mutable), - ("argument_list_repeat1", Cpp::ArgumentListRepeat1), - ("primitive_type", Cpp::PrimitiveType), - ("try_statement", Cpp::TryStatement), - ("MOZ_HAVE_ASAN_BLACKLIST", Cpp::MOZHAVEASANBLACKLIST), - ("\\\"", Cpp::DQUOTE), - ("do", Cpp::Do), - ("declaration_list", Cpp::DeclarationList), - ("string_literal_token1", Cpp::StringLiteralToken1), - ]), + ("MOZ_ASAN_BLACKLIST", Cpp::MOZASANBLACKLIST), + ("__based", Cpp::Based), + ("if_statement", Cpp::IfStatement), + ("template_instantiation", Cpp::TemplateInstantiation), + ("expression_statement", Cpp::ExpressionStatement), + ("parenthesized_expression", Cpp::ParenthesizedExpression), + ( + "MOZ_HAVE_SIGNED_OVERFLOW_SANITIZE_ATTR", + Cpp::MOZHAVESIGNEDOVERFLOWSANITIZEATTR, + ), + ("MOZ_NON_MEMMOVABLE", Cpp::MOZNONMEMMOVABLE), + ("while", Cpp::While), + ( + "MOZ_NO_ADDREF_RELEASE_ON_RETURN", + Cpp::MOZNOADDREFRELEASEONRETURN, + ), + ("MOZ_NONNULL_RETURN", Cpp::MOZNONNULLRETURN), + ("assignment_expression", Cpp::AssignmentExpression), + ("class_specifier", Cpp::ClassSpecifier), + ("#else", Cpp::HASHelse), + ("-=", Cpp::DASHEQ), + ("continue", Cpp::Continue), + ("system_lib_string", Cpp::SystemLibString), + ], }; impl From<&str> for Cpp { diff --git a/src/languages/language_java.rs b/src/languages/language_java.rs index 8831fdf5a..357882526 100644 --- a/src/languages/language_java.rs +++ b/src/languages/language_java.rs @@ -279,385 +279,385 @@ pub enum Java { #[allow(clippy::unreadable_literal)] static KEYS: phf::Map<&'static str, Java> = ::phf::Map { - key: 3213172566270843353, - disps: ::phf::Slice::Static(&[ + key: 12913932095322966823, + disps: &[ + (2, 189), + (0, 178), + (2, 50), + (0, 3), + (0, 25), + (0, 157), (0, 4), - (0, 9), - (0, 15), - (1, 260), - (0, 91), - (0, 18), - (0, 63), - (0, 49), - (0, 142), - (0, 11), - (0, 19), - (0, 28), - (0, 1), - (0, 36), + (0, 72), + (0, 85), (0, 1), (0, 0), + (0, 67), + (1, 79), + (0, 99), + (1, 208), + (0, 8), + (0, 3), + (0, 1), + (0, 8), + (0, 108), + (0, 147), + (0, 16), (0, 2), - (1, 106), - (0, 37), - (7, 86), + (0, 8), (0, 0), - (1, 36), - (12, 94), - (0, 5), - (0, 2), - (5, 56), - (2, 62), - (0, 25), - (6, 158), - (6, 7), - (2, 75), - (0, 53), - (2, 115), - (0, 1), - (3, 243), - (12, 216), - (2, 245), - (0, 6), - (4, 190), - (38, 170), - (0, 79), - (11, 103), + (1, 31), + (1, 261), + (4, 18), + (0, 233), + (1, 229), + (1, 152), + (1, 8), + (4, 117), + (4, 93), (0, 3), - (0, 0), - (2, 38), - (24, 69), - (1, 225), - (0, 48), - (120, 76), - (0, 8), - (0, 31), - (71, 167), (0, 3), - (0, 187), - (0, 206), - ]), - entries: ::phf::Slice::Static(&[ - ("field_declaration", Java::FieldDeclaration), - (":", Java::COLON), - ("switch_block", Java::SwitchBlock), - ("class_literal", Java::ClassLiteral), - ("_variable_declarator_list", Java::VariableDeclaratorList), - ("scoped_identifier", Java::ScopedIdentifier), - ("if_statement", Java::IfStatement), - ("@interface", Java::ATinterface), - ("-", Java::DASH), + (1, 57), + (1, 166), + (4, 270), + (0, 42), + (1, 0), + (52, 174), + (10, 221), + (0, 57), + (0, 7), + (0, 14), + (0, 7), + (0, 5), + (0, 176), + (0, 4), + (0, 235), + (1, 192), + (0, 7), + (0, 150), + (0, 177), + ], + entries: &[ + ("case", Java::Case), + ("while_statement", Java::WhileStatement), + ("for_statement_repeat1", Java::ForStatementRepeat1), + ("/", Java::SLASH), ( - "annotation_argument_list_repeat1", - Java::AnnotationArgumentListRepeat1, + "_unqualified_object_creation_expression", + Java::UnqualifiedObjectCreationExpression, ), - ("module_directive_repeat2", Java::ModuleDirectiveRepeat2), - ("block", Java::Block), - ("implements", Java::Implements), - ("%", Java::PERCENT), - ("formal_parameters_repeat1", Java::FormalParametersRepeat1), - ("char", Java::Char), - ("type_parameters", Java::TypeParameters), - ("interface_body", Java::InterfaceBody), - ("static_initializer", Java::StaticInitializer), - ("%=", Java::PERCENTEQ), - ("dimensions_repeat1", Java::DimensionsRepeat1), - ("~", Java::TILDE), - ("type_parameters_repeat1", Java::TypeParametersRepeat1), - ("continue_statement", Java::ContinueStatement), - ("continue", Java::Continue), - ("comment", Java::Comment), - ("enum_body_declarations", Java::EnumBodyDeclarations), - ("short", Java::Short), - ("requires_modifier", Java::RequiresModifier), - ("unary_expression", Java::UnaryExpression), - ("catch_clause", Java::CatchClause), - ("type_bound_repeat1", Java::TypeBoundRepeat1), - ("element_value_pair", Java::ElementValuePair), - ("formal_parameters", Java::FormalParameters), - ("switch", Java::Switch), - (">>>", Java::GTGTGT), - ("cast_expression_repeat1", Java::CastExpressionRepeat1), - ("to", Java::To), + ("cast_expression", Java::CastExpression), + ("return", Java::Return), ( - "explicit_constructor_invocation", - Java::ExplicitConstructorInvocation, + "annotation_type_body_repeat1", + Java::AnnotationTypeBodyRepeat1, ), - ("argument_list", Java::ArgumentList), - ("scoped_type_identifier", Java::ScopedTypeIdentifier), - ("character_literal", Java::CharacterLiteral), - ("type_arguments_repeat1", Java::TypeArgumentsRepeat1), - ("assert_statement", Java::AssertStatement), - ("?", Java::QMARK), - ("switch_label", Java::SwitchLabel), + ("break", Java::Break), + ("-=", Java::DASHEQ), + ("hex_integer_literal", Java::HexIntegerLiteral), + ("parenthesized_expression", Java::ParenthesizedExpression), + ("continue_statement", Java::ContinueStatement), + ("module_declaration", Java::ModuleDeclaration), + ("expression", Java::Expression), ("native", Java::Native), - ("_type", Java::Type), - ("module_body_repeat1", Java::ModuleBodyRepeat1), + ("protected", Java::Protected), + ("labeled_statement", Java::LabeledStatement), ("end", Java::End), - ("break", Java::Break), + ("float", Java::Float), + ("if_statement", Java::IfStatement), + ("type_identifier", Java::TypeIdentifier), + ("import", Java::Import), + ("!=", Java::BANGEQ), + ("octal_integer_literal", Java::OctalIntegerLiteral), + ("catch_type", Java::CatchType), + ("instanceof_expression", Java::InstanceofExpression), + (")", Java::RPAREN), + ("decimal_integer_literal", Java::DecimalIntegerLiteral), + ("enum_body_declarations", Java::EnumBodyDeclarations), + ("&&", Java::AMPAMP), + ("generic_type", Java::GenericType), + ("extends_interfaces", Java::ExtendsInterfaces), + (";", Java::SEMI), + (".", Java::DOT), ("]", Java::RBRACK), + ("superclass", Java::Superclass), + ("_default_value", Java::DefaultValue), + ("==", Java::EQEQ), + ("break_statement", Java::BreakStatement), + ("open", Java::Open), ( - "annotation_type_element_declaration", - Java::AnnotationTypeElementDeclaration, + "resource_specification_repeat1", + Java::ResourceSpecificationRepeat1, ), - ("with", Java::With), - (")", Java::RPAREN), - ("+", Java::PLUS), - ("++", Java::PLUSPLUS), - ("super", Java::Super), + ("void_type", Java::VoidType), + ("field_access", Java::FieldAccess), + ("~", Java::TILDE), + ("array_type", Java::ArrayType), + ("enum", Java::Enum), + ("public", Java::Public), + ("_variable_declarator_id", Java::VariableDeclaratorId), + ("switch_block", Java::SwitchBlock), + ("class_declaration", Java::ClassDeclaration), + ("uses", Java::Uses), + ("@", Java::AT), + ("annotation_argument_list", Java::AnnotationArgumentList), + ("synchronized", Java::Synchronized), + ("interface_type_list", Java::InterfaceTypeList), + ("super_interfaces", Java::SuperInterfaces), + ("local_variable_declaration", Java::LocalVariableDeclaration), + ("requires_modifier", Java::RequiresModifier), + ("char", Java::Char), + ("formal_parameters_repeat1", Java::FormalParametersRepeat1), + ("*=", Java::STAREQ), + ("package_declaration", Java::PackageDeclaration), + ("<", Java::LT), + ("switch", Java::Switch), + ( + "annotation_argument_list_repeat1", + Java::AnnotationArgumentListRepeat1, + ), + ("update_expression", Java::UpdateExpression), + ("inferred_parameters", Java::InferredParameters), + ("interface_body", Java::InterfaceBody), ("&", Java::AMP), - ("marker_annotation", Java::MarkerAnnotation), - ("module", Java::Module), + ("annotated_type", Java::AnnotatedType), + ("argument_list_repeat1", Java::ArgumentListRepeat1), + ("|=", Java::PIPEEQ), + ("floating_point_type", Java::FloatingPointType), ("throw", Java::Throw), - ("exports", Java::Exports), - ("/=", Java::SLASHEQ), + ("do", Java::Do), + ("enum_body_repeat1", Java::EnumBodyRepeat1), + ("else", Java::Else), + ("resource", Java::Resource), + ("try_statement_repeat1", Java::TryStatementRepeat1), + ("_literal", Java::Literal), ( - "array_creation_expression_repeat1", - Java::ArrayCreationExpressionRepeat1, + "enum_body_declarations_repeat1", + Java::EnumBodyDeclarationsRepeat1, ), - ("update_expression", Java::UpdateExpression), - ("annotation_argument_list", Java::AnnotationArgumentList), + ("spread_parameter", Java::SpreadParameter), + ("formal_parameter", Java::FormalParameter), + ("interface", Java::Interface), + ("comment", Java::Comment), + ("primary_expression", Java::PrimaryExpression), + ("short", Java::Short), + ("unary_expression", Java::UnaryExpression), ("method_reference", Java::MethodReference), - ("_wildcard_bounds", Java::WildcardBounds), - ("enum", Java::Enum), - ("enum_constant", Java::EnumConstant), - ("integral_type", Java::IntegralType), - ("_constructor_declarator", Java::ConstructorDeclarator), - ("<<", Java::LTLT), - ("else", Java::Else), - ("switch_block_repeat1", Java::SwitchBlockRepeat1), - ("|", Java::PIPE), - ("catch", Java::Catch), + ("_method_declarator", Java::MethodDeclarator), + ("type_parameters", Java::TypeParameters), ( - "_unqualified_object_creation_expression", - Java::UnqualifiedObjectCreationExpression, + "interface_type_list_repeat1", + Java::InterfaceTypeListRepeat1, ), + ("_method_header", Java::MethodHeader), + ("return_statement", Java::ReturnStatement), + ("_type", Java::Type), + ("array_access", Java::ArrayAccess), + ("modifiers", Java::Modifiers), + ("module", Java::Module), + ("true", Java::True), + ("binary_integer_literal", Java::BinaryIntegerLiteral), + ("int", Java::Int), + ("+=", Java::PLUSEQ), + ("-", Java::DASH), + ("for_statement_repeat2", Java::ForStatementRepeat2), + ("instanceof", Java::Instanceof), + ("block", Java::Block), + (">>=", Java::GTGTEQ), + ("modifiers_repeat1", Java::ModifiersRepeat1), + ("static", Java::Static), + ("*", Java::STAR), + ("abstract", Java::Abstract), + ("^=", Java::CARETEQ), + ("provides", Java::Provides), + ("...", Java::DOTDOTDOT), + ("array_initializer", Java::ArrayInitializer), + ("constructor_declaration", Java::ConstructorDeclaration), + ("with", Java::With), + ("false", Java::False), + ("class_literal", Java::ClassLiteral), + ("string_literal", Java::StringLiteral), + ("|", Java::PIPE), + ("/=", Java::SLASHEQ), + ("for_statement", Java::ForStatement), + ("++", Java::PLUSPLUS), + ("hex_floating_point_literal", Java::HexFloatingPointLiteral), + ("opens", Java::Opens), + ("type_bound_repeat1", Java::TypeBoundRepeat1), + ("module_body_repeat1", Java::ModuleBodyRepeat1), ( "_variable_declarator_list_repeat1", Java::VariableDeclaratorListRepeat1, ), - ("_method_declarator", Java::MethodDeclarator), - ("_default_value", Java::DefaultValue), - ("}", Java::RBRACE), - ("constructor_declaration", Java::ConstructorDeclaration), - ("--", Java::DASHDASH), + ("enum_declaration", Java::EnumDeclaration), + ("interface_body_repeat1", Java::InterfaceBodyRepeat1), + ("type_parameters_repeat1", Java::TypeParametersRepeat1), + ("array_initializer_repeat1", Java::ArrayInitializerRepeat1), + ("->", Java::DASHGT), + ("!", Java::BANG), + ("<<", Java::LTLT), + ("=", Java::EQ), + ("implements", Java::Implements), + ("strictfp", Java::Strictfp), + ("module_directive_repeat1", Java::ModuleDirectiveRepeat1), + ("assert", Java::Assert), + ("catch_type_repeat1", Java::CatchTypeRepeat1), + ("catch_formal_parameter", Java::CatchFormalParameter), + ("array_creation_expression", Java::ArrayCreationExpression), (">>>=", Java::GTGTGTEQ), - ("+=", Java::PLUSEQ), - ("switch_statement", Java::SwitchStatement), - ("provides", Java::Provides), - ("inferred_parameters", Java::InferredParameters), - ("class_body", Java::ClassBody), - ("expression_statement", Java::ExpressionStatement), + ("receiver_parameter", Java::ReceiverParameter), + ("::", Java::COLONCOLON), + ("integral_type", Java::IntegralType), + ("final", Java::Final), + ("program_repeat1", Java::ProgramRepeat1), ("synchronized_statement", Java::SynchronizedStatement), - ("do_statement", Java::DoStatement), - ("decimal_integer_literal", Java::DecimalIntegerLiteral), - ("long", Java::Long), - (".", Java::DOT), - ("instanceof_expression", Java::InstanceofExpression), + ("(", Java::LPAREN), + ("transitive", Java::Transitive), + ("exports", Java::Exports), + ("double", Java::Double), + ("type_bound", Java::TypeBound), + ("wildcard", Java::Wildcard), + ("private", Java::Private), + ("extends", Java::Extends), + ("scoped_type_identifier", Java::ScopedTypeIdentifier), + ("_variable_declarator_list", Java::VariableDeclaratorList), + ("throw_statement", Java::ThrowStatement), + ("annotation_type_body", Java::AnnotationTypeBody), + ("dimensions_expr_repeat1", Java::DimensionsExprRepeat1), + ("byte", Java::Byte), + ("module_directive", Java::ModuleDirective), + ("<<=", Java::LTLTEQ), + ("switch_label", Java::SwitchLabel), + ("character_literal", Java::CharacterLiteral), + ("assignment_expression", Java::AssignmentExpression), + (">=", Java::GTEQ), + ("new", Java::New), + ("ternary_expression", Java::TernaryExpression), + ("enhanced_for_statement", Java::EnhancedForStatement), + ("[", Java::LBRACK), + ("cast_expression_repeat1", Java::CastExpressionRepeat1), + ("if", Java::If), + ("enum_body", Java::EnumBody), + ("declaration", Java::Declaration), + ("type_parameter", Java::TypeParameter), + ("module_body", Java::ModuleBody), + ("try", Java::Try), + ("marker_annotation", Java::MarkerAnnotation), + ("volatile", Java::Volatile), + ("--", Java::DASHDASH), + ("interface_declaration", Java::InterfaceDeclaration), + ("switch_block_repeat1", Java::SwitchBlockRepeat1), ( - "element_value_array_initializer", - Java::ElementValueArrayInitializer, + "inferred_parameters_repeat1", + Java::InferredParametersRepeat1, ), - ("new", Java::New), + ("finally_clause", Java::FinallyClause), + ("identifier", Java::Identifier), + ("static_initializer", Java::StaticInitializer), ( - "annotation_type_body_repeat1", - Java::AnnotationTypeBodyRepeat1, + "element_value_array_initializer", + Java::ElementValueArrayInitializer, ), - ("requires", Java::Requires), - ("catch_formal_parameter", Java::CatchFormalParameter), - ("while", Java::While), - ("==", Java::EQEQ), - ("extends_interfaces", Java::ExtendsInterfaces), - ("modifiers_repeat1", Java::ModifiersRepeat1), - ("string_literal", Java::StringLiteral), - ("hex_floating_point_literal", Java::HexFloatingPointLiteral), - ("parenthesized_expression", Java::ParenthesizedExpression), - ("instanceof", Java::Instanceof), - (";", Java::SEMI), - ("constructor_body", Java::ConstructorBody), - ("for_statement_repeat1", Java::ForStatementRepeat1), - ("true", Java::True), - ("class", Java::Class), - ("if", Java::If), - ("annotated_type", Java::AnnotatedType), - ("=", Java::EQ), - ("local_variable_declaration", Java::LocalVariableDeclaration), - ("array_access", Java::ArrayAccess), + ("import_declaration", Java::ImportDeclaration), + ("this", Java::This), + ("transient", Java::Transient), + ("null_literal", Java::NullLiteral), ( "annotation_type_declaration", Java::AnnotationTypeDeclaration, ), - ("-=", Java::DASHEQ), - ("formal_parameter", Java::FormalParameter), - ("_literal", Java::Literal), - ("program", Java::Program), - ("class_declaration", Java::ClassDeclaration), - ("resource_specification", Java::ResourceSpecification), - ("array_creation_expression", Java::ArrayCreationExpression), - ("primary_expression", Java::PrimaryExpression), - ("|=", Java::PIPEEQ), - ("<", Java::LT), - ("ternary_expression", Java::TernaryExpression), - ("generic_type", Java::GenericType), - ("byte", Java::Byte), - ("[", Java::LBRACK), - ("dimensions_expr", Java::DimensionsExpr), - ("extends", Java::Extends), - ("uses", Java::Uses), - ("modifiers", Java::Modifiers), - ("interface_body_repeat1", Java::InterfaceBodyRepeat1), - ("try", Java::Try), - ("type_bound", Java::TypeBound), - ("volatile", Java::Volatile), - ("object_creation_expression", Java::ObjectCreationExpression), - ( - "decimal_floating_point_literal", - Java::DecimalFloatingPointLiteral, - ), - ("^", Java::CARET), + ("for", Java::For), ( - "element_value_array_initializer_repeat1", - Java::ElementValueArrayInitializerRepeat1, + "explicit_constructor_invocation", + Java::ExplicitConstructorInvocation, ), - ("{", Java::LBRACE), + ("finally", Java::Finally), + ("super", Java::Super), ( - "resource_specification_repeat1", - Java::ResourceSpecificationRepeat1, + "array_creation_expression_repeat1", + Java::ArrayCreationExpressionRepeat1, ), - ("module_body", Java::ModuleBody), - ("private", Java::Private), - ("transient", Java::Transient), - ("do", Java::Do), - ("boolean_type", Java::BooleanType), - ("int", Java::Int), - ("/", Java::SLASH), - ("->", Java::DASHGT), - ("abstract", Java::Abstract), - ("_annotation", Java::Annotation), - ("enum_declaration", Java::EnumDeclaration), - ("wildcard", Java::Wildcard), + ("formal_parameters", Java::FormalParameters), + ("type_arguments", Java::TypeArguments), + ("constructor_body", Java::ConstructorBody), + ("lambda_expression", Java::LambdaExpression), + ("_unannotated_type", Java::UnannotatedType), + ("}", Java::RBRACE), + ("catch_clause", Java::CatchClause), + ("argument_list", Java::ArgumentList), + ("_wildcard_bounds", Java::WildcardBounds), + ("&=", Java::AMPEQ), ("method_invocation", Java::MethodInvocation), - ("argument_list_repeat1", Java::ArgumentListRepeat1), + ("module_directive_repeat2", Java::ModuleDirectiveRepeat2), + ("variable_declarator", Java::VariableDeclarator), + ("class", Java::Class), + (">", Java::GT), + ("try_statement", Java::TryStatement), + ("resource_specification", Java::ResourceSpecification), + ("_annotation", Java::Annotation), + ("%=", Java::PERCENTEQ), + ("element_value_pair", Java::ElementValuePair), + ("constant_declaration", Java::ConstantDeclaration), + ("?", Java::QMARK), + ("continue", Java::Continue), + ("catch", Java::Catch), + ("field_declaration", Java::FieldDeclaration), + ("boolean_type", Java::BooleanType), + ("dimensions", Java::Dimensions), + ("%", Java::PERCENT), + ("<=", Java::LTEQ), ("throws", Java::Throws), + ("asterisk", Java::Asterisk), ("||", Java::PIPEPIPE), - ("finally", Java::Finally), - ("type_parameter", Java::TypeParameter), - ("void_type", Java::VoidType), - ("!", Java::BANG), - ("interface", Java::Interface), - ("<<=", Java::LTLTEQ), - ("type_arguments", Java::TypeArguments), + ("requires", Java::Requires), + ("package", Java::Package), + (">>", Java::GTGT), + ("class_body", Java::ClassBody), ("statement", Java::Statement), - ("field_access", Java::FieldAccess), - ("*=", Java::STAREQ), - ("_variable_declarator_id", Java::VariableDeclaratorId), - ("(", Java::LPAREN), - ("floating_point_type", Java::FloatingPointType), - (">=", Java::GTEQ), - ("module_declaration", Java::ModuleDeclaration), - ("*", Java::STAR), - (">>=", Java::GTGTEQ), - ("opens", Java::Opens), - ("enum_body_repeat1", Java::EnumBodyRepeat1), - ("double", Java::Double), - ("catch_type", Java::CatchType), - ("for", Java::For), - ("dimensions_expr_repeat1", Java::DimensionsExprRepeat1), - ("_element_value", Java::ElementValue), - ("declaration", Java::Declaration), - ("interface_declaration", Java::InterfaceDeclaration), - ("finally_clause", Java::FinallyClause), - ("constant_declaration", Java::ConstantDeclaration), - ("binary_integer_literal", Java::BinaryIntegerLiteral), - ("asterisk", Java::Asterisk), - ("synchronized", Java::Synchronized), - ("annotation_type_body", Java::AnnotationTypeBody), - ("float", Java::Float), - ("identifier", Java::Identifier), - ("import_declaration", Java::ImportDeclaration), - ("cast_expression", Java::CastExpression), - ("enhanced_for_statement", Java::EnhancedForStatement), - ("octal_integer_literal", Java::OctalIntegerLiteral), - ("interface_type_list", Java::InterfaceTypeList), - ("transitive", Java::Transitive), - ("public", Java::Public), - ( - "interface_type_list_repeat1", - Java::InterfaceTypeListRepeat1, - ), - ("resource", Java::Resource), - ("module_directive", Java::ModuleDirective), - ("spread_parameter", Java::SpreadParameter), - ("strictfp", Java::Strictfp), - ("method_declaration", Java::MethodDeclaration), - ("...", Java::DOTDOTDOT), - (">", Java::GT), - ("array_initializer", Java::ArrayInitializer), ( - "enum_body_declarations_repeat1", - Java::EnumBodyDeclarationsRepeat1, + "annotation_type_element_declaration", + Java::AnnotationTypeElementDeclaration, ), - ("break_statement", Java::BreakStatement), - (",", Java::COMMA), - ("catch_type_repeat1", Java::CatchTypeRepeat1), - (">>", Java::GTGT), - ("protected", Java::Protected), - ("while_statement", Java::WhileStatement), - ("receiver_parameter", Java::ReceiverParameter), - ("array_type", Java::ArrayType), + ("_constructor_declarator", Java::ConstructorDeclarator), + ("^", Java::CARET), + ("type_arguments_repeat1", Java::TypeArgumentsRepeat1), + ("program", Java::Program), + ("assert_statement", Java::AssertStatement), + (">>>", Java::GTGTGT), + ("enum_constant", Java::EnumConstant), ("default", Java::Default), - ("package", Java::Package), - ("!=", Java::BANGEQ), - ("for_statement_repeat2", Java::ForStatementRepeat2), - ("try_statement", Java::TryStatement), - ("ERROR", Java::Error), - ("return_statement", Java::ReturnStatement), + ("to", Java::To), + ("while", Java::While), ("binary_expression", Java::BinaryExpression), - ("type_identifier", Java::TypeIdentifier), - ("_method_header", Java::MethodHeader), - ("case", Java::Case), - ("null_literal", Java::NullLiteral), - ("superclass", Java::Superclass), - ("<=", Java::LTEQ), - ("dimensions", Java::Dimensions), - ("expression", Java::Expression), - ("&=", Java::AMPEQ), - ("open", Java::Open), - ("this", Java::This), - ("hex_integer_literal", Java::HexIntegerLiteral), - ("labeled_statement", Java::LabeledStatement), - ("array_initializer_repeat1", Java::ArrayInitializerRepeat1), - ("variable_declarator", Java::VariableDeclarator), - ("lambda_expression", Java::LambdaExpression), + ("do_statement", Java::DoStatement), ( "try_with_resources_statement", Java::TryWithResourcesStatement, ), - ("final", Java::Final), - ("@", Java::AT), - ("throw_statement", Java::ThrowStatement), - ("assignment_expression", Java::AssignmentExpression), - ("return", Java::Return), - ("assert", Java::Assert), - ("for_statement", Java::ForStatement), - ("super_interfaces", Java::SuperInterfaces), - ("try_statement_repeat1", Java::TryStatementRepeat1), - ("^=", Java::CARETEQ), + ("long", Java::Long), ( - "inferred_parameters_repeat1", - Java::InferredParametersRepeat1, + "element_value_array_initializer_repeat1", + Java::ElementValueArrayInitializerRepeat1, ), - ("&&", Java::AMPAMP), - ("enum_body", Java::EnumBody), - ("::", Java::COLONCOLON), - ("false", Java::False), - ("program_repeat1", Java::ProgramRepeat1), - ("package_declaration", Java::PackageDeclaration), - ("import", Java::Import), - ("_unannotated_type", Java::UnannotatedType), - ("static", Java::Static), - ("module_directive_repeat1", Java::ModuleDirectiveRepeat1), - ]), + ("expression_statement", Java::ExpressionStatement), + ("_element_value", Java::ElementValue), + ("scoped_identifier", Java::ScopedIdentifier), + ( + "decimal_floating_point_literal", + Java::DecimalFloatingPointLiteral, + ), + ("switch_statement", Java::SwitchStatement), + ("{", Java::LBRACE), + ("object_creation_expression", Java::ObjectCreationExpression), + ("+", Java::PLUS), + ("dimensions_repeat1", Java::DimensionsRepeat1), + ("ERROR", Java::Error), + ("method_declaration", Java::MethodDeclaration), + ("dimensions_expr", Java::DimensionsExpr), + (":", Java::COLON), + (",", Java::COMMA), + ("@interface", Java::ATinterface), + ], }; impl From<&str> for Java { diff --git a/src/languages/language_javascript.rs b/src/languages/language_javascript.rs index b327d8413..4e7828bf7 100644 --- a/src/languages/language_javascript.rs +++ b/src/languages/language_javascript.rs @@ -253,335 +253,335 @@ pub enum Javascript { #[allow(clippy::unreadable_literal)] static KEYS: phf::Map<&'static str, Javascript> = ::phf::Map { - key: 732231254413039614, - disps: ::phf::Slice::Static(&[ - (8, 237), + key: 12913932095322966823, + disps: &[ + (1, 58), + (1, 50), (0, 0), - (2, 105), - (0, 40), - (2, 169), - (1, 99), - (0, 0), - (1, 74), - (0, 11), - (0, 6), - (0, 167), - (0, 0), - (0, 65), - (0, 144), - (2, 170), - (0, 229), - (1, 72), - (13, 192), - (0, 3), - (0, 3), - (19, 60), - (1, 76), - (0, 139), - (0, 31), - (12, 120), - (3, 115), - (4, 117), - (0, 45), - (0, 134), - (0, 63), - (1, 20), - (0, 0), - (0, 22), - (0, 21), + (0, 224), (0, 10), (0, 1), + (0, 51), + (0, 37), (0, 1), - (0, 131), - (2, 1), - (1, 215), - (0, 48), - (13, 223), - (6, 46), - (1, 94), - (0, 46), + (0, 44), + (0, 4), + (0, 105), (0, 0), - (0, 42), - (0, 63), - ]), - entries: ::phf::Slice::Static(&[ - ("hash_bang_line", Javascript::HashBangLine), - ("computed_property_name", Javascript::ComputedPropertyName), - ("import_statement", Javascript::ImportStatement), - ("return", Javascript::Return), - ("of", Javascript::Of), - ("named_imports", Javascript::NamedImports), - ("`", Javascript::BQUOTE), - ("binary_expression", Javascript::BinaryExpression), - ("false", Javascript::False), - ("_from_clause", Javascript::FromClause), - ("object_pattern_repeat1", Javascript::ObjectPatternRepeat1), - ("jsx_element", Javascript::JsxElement), - ("debugger", Javascript::Debugger), - ("switch_body_repeat1", Javascript::SwitchBodyRepeat1), - ("while_statement", Javascript::WhileStatement), - ("object_repeat1", Javascript::ObjectRepeat1), - ("escape_sequence", Javascript::EscapeSequence), - ("else_clause", Javascript::ElseClause), - ("statement_identifier", Javascript::StatementIdentifier), - (")", Javascript::RPAREN), - ("+", Javascript::PLUS), - ("jsx_expression", Javascript::JsxExpression), - ("throw_statement", Javascript::ThrowStatement), - ("decorator", Javascript::Decorator), + (4, 84), + (0, 6), + (1, 95), + (0, 8), + (1, 170), + (0, 26), + (2, 219), + (1, 160), + (0, 26), + (1, 3), + (1, 56), + (1, 85), + (1, 1), + (1, 40), + (0, 1), + (0, 169), + (19, 84), + (1, 92), + (31, 239), + (0, 2), + (1, 46), + (12, 99), + (0, 19), + (20, 34), + (0, 51), + (4, 77), + (0, 18), + (0, 19), + (1, 94), + (7, 179), + (2, 217), + (0, 195), + (4, 55), + (2, 101), + (108, 26), + ], + entries: &[ + ("%", Javascript::PERCENT), + ("new_expression", Javascript::NewExpression), + ("^=", Javascript::CARETEQ), + ("<=", Javascript::LTEQ), + (":", Javascript::COLON), + (">>>=", Javascript::GTGTGTEQ), ( - "variable_declaration_repeat1", - Javascript::VariableDeclarationRepeat1, + "jsx_self_closing_element", + Javascript::JsxSelfClosingElement, ), - ("return_statement", Javascript::ReturnStatement), - ("switch_statement", Javascript::SwitchStatement), - ("(", Javascript::LPAREN), - ("call_expression", Javascript::CallExpression), - ("function", Javascript::Function), - ("switch_case", Javascript::SwitchCase), - ("^", Javascript::CARET), - ("empty_statement", Javascript::EmptyStatement), - ("export_clause", Javascript::ExportClause), - (">>", Javascript::GTGT), + ("else_clause", Javascript::ElseClause), + ("regex_flags", Javascript::RegexFlags), ( - "generator_function_declaration", - Javascript::GeneratorFunctionDeclaration, + "parenthesized_expression", + Javascript::ParenthesizedExpression, ), - ("template_string", Javascript::TemplateString), - ("identifier", Javascript::Identifier), - ("array_pattern_repeat1", Javascript::ArrayPatternRepeat1), + ("formal_parameters", Javascript::FormalParameters), + ("finally_clause", Javascript::FinallyClause), + ("this", Javascript::This), + ("while_statement", Javascript::WhileStatement), + ("finally", Javascript::Finally), + ("with_statement", Javascript::WithStatement), + ("}", Javascript::RBRACE), + ("debugger", Javascript::Debugger), + ("regex", Javascript::Regex), + ("meta_property", Javascript::MetaProperty), + ("switch_default", Javascript::SwitchDefault), + ("[", Javascript::LBRACK), + ("statement_identifier", Javascript::StatementIdentifier), + ("jsx_text", Javascript::JsxText), + ("class_body", Javascript::ClassBody), + ("while", Javascript::While), + ("yield", Javascript::Yield), + ("else", Javascript::Else), + ("!==", Javascript::BANGEQEQ), + ("default", Javascript::Default), + ("public_field_definition", Javascript::PublicFieldDefinition), + ("null", Javascript::Null), + ("ternary_expression", Javascript::TernaryExpression), + ("_for_header", Javascript::ForHeader), + ("|", Javascript::PIPE), + ("expression", Javascript::Expression), + ("string_token2", Javascript::StringToken2), + ("object_pattern_repeat1", Javascript::ObjectPatternRepeat1), ("generator_function", Javascript::GeneratorFunction), - ("delete", Javascript::Delete), - ("variable_declaration", Javascript::VariableDeclaration), + ("computed_property_name", Javascript::ComputedPropertyName), + ("end", Javascript::End), + ("update_expression", Javascript::UpdateExpression), + ("_automatic_semicolon", Javascript::AutomaticSemicolon), + (")", Javascript::RPAREN), + ("named_imports", Javascript::NamedImports), + ("extends", Javascript::Extends), + ("??=", Javascript::QMARKQMARKEQ), + ("throw_statement", Javascript::ThrowStatement), + ("declaration", Javascript::Declaration), ( - "formal_parameters_repeat1", - Javascript::FormalParametersRepeat1, + "_augmented_assignment_lhs", + Javascript::AugmentedAssignmentLhs, ), + ("template_substitution", Javascript::TemplateSubstitution), + ("object_pattern", Javascript::ObjectPattern), + (">=", Javascript::GTEQ), + ("async", Javascript::Async), + ("string_repeat1", Javascript::StringRepeat1), + ("^", Javascript::CARET), + ("yield_expression", Javascript::YieldExpression), + ("subscript_expression", Javascript::SubscriptExpression), + ("let", Javascript::Let), + ("typeof", Javascript::Typeof), + ("`", Javascript::BQUOTE), + ("import", Javascript::Import), + ("try_statement", Javascript::TryStatement), + ("<<", Javascript::LTLT), ("with", Javascript::With), - ("\'", Javascript::SQUOTE), - ("_automatic_semicolon", Javascript::AutomaticSemicolon), - ("-=", Javascript::DASHEQ), + ("function", Javascript::Function), + ("super", Javascript::Super), + ("${", Javascript::DOLLARLBRACE), ("arrow_function", Javascript::ArrowFunction), - ("variable_declarator", Javascript::VariableDeclarator), - ("&", Javascript::AMP), - ("import", Javascript::Import), - ("yield", Javascript::Yield), - ("method_definition", Javascript::MethodDefinition), - ("object_pattern", Javascript::ObjectPattern), + ( + "shorthand_property_identifier", + Javascript::ShorthandPropertyIdentifier, + ), + ("decorator", Javascript::Decorator), + ("jsx_closing_element", Javascript::JsxClosingElement), + ("function_declaration", Javascript::FunctionDeclaration), + ("export_specifier", Javascript::ExportSpecifier), + ("_from_clause", Javascript::FromClause), + ("binary_expression", Javascript::BinaryExpression), + ("for_statement", Javascript::ForStatement), + ("pair_pattern", Javascript::PairPattern), + ("unary_expression", Javascript::UnaryExpression), + ("call_expression", Javascript::CallExpression), + ("@", Javascript::AT), + ("pattern", Javascript::Pattern), + ("named_imports_repeat1", Javascript::NamedImportsRepeat1), + ("throw", Javascript::Throw), + ("import_specifier", Javascript::ImportSpecifier), + ("\\\"", Javascript::DQUOTE), + ("primary_expression", Javascript::PrimaryExpression), + ("%=", Javascript::PERCENTEQ), + ("&=", Javascript::AMPEQ), + ("break", Javascript::Break), + ("in", Javascript::In), ("instanceof", Javascript::Instanceof), + ("switch_body_repeat1", Javascript::SwitchBodyRepeat1), + ("=", Javascript::EQ), + ("export_statement", Javascript::ExportStatement), + (",", Javascript::COMMA), + ("namespace_import", Javascript::NamespaceImport), ("jsx_opening_element", Javascript::JsxOpeningElement), - ("**", Javascript::STARSTAR), - ("nested_identifier", Javascript::NestedIdentifier), - (">=", Javascript::GTEQ), ("program", Javascript::Program), ("set", Javascript::Set), - ("%=", Javascript::PERCENTEQ), - ("pair", Javascript::Pair), - ("primary_expression", Javascript::PrimaryExpression), - ("sequence_expression", Javascript::SequenceExpression), - ("**=", Javascript::STARSTAREQ), - ("spread_element", Javascript::SpreadElement), - ("for_statement", Javascript::ForStatement), - ("_destructuring_pattern", Javascript::DestructuringPattern), - ("finally", Javascript::Finally), - ("&&", Javascript::AMPAMP), - (":", Javascript::COLON), - ("^=", Javascript::CARETEQ), - ("assignment_pattern", Javascript::AssignmentPattern), - ("async", Javascript::Async), - ("array", Javascript::Array), - ("switch_body", Javascript::SwitchBody), - ("super", Javascript::Super), - ("formal_parameters", Javascript::FormalParameters), + ("await_expression", Javascript::AwaitExpression), + ("program_repeat1", Javascript::ProgramRepeat1), + ("||", Javascript::PIPEPIPE), + ( + "export_statement_repeat1", + Javascript::ExportStatementRepeat1, + ), ("const", Javascript::Const), - ("namespace_import", Javascript::NamespaceImport), - ("throw", Javascript::Throw), - (">>>=", Javascript::GTGTGTEQ), - (">>=", Javascript::GTGTEQ), - ("catch", Javascript::Catch), - ("/", Javascript::SLASH), + ("_destructuring_pattern", Javascript::DestructuringPattern), + ("array_repeat1", Javascript::ArrayRepeat1), + ("try", Javascript::Try), + ("{", Javascript::LBRACE), ("]", Javascript::RBRACK), - ("regex_pattern", Javascript::RegexPattern), - (">", Javascript::GT), - ("expression", Javascript::Expression), + ("_initializer", Javascript::Initializer), + ("**=", Javascript::STARSTAREQ), + ("void", Javascript::Void), + ("**", Javascript::STARSTAR), + ("class", Javascript::Class), + ("new", Javascript::New), + ("lexical_declaration", Javascript::LexicalDeclaration), + ("?", Javascript::QMARK), + ("string_token1", Javascript::StringToken1), + ("+=", Javascript::PLUSEQ), + ("string_repeat2", Javascript::StringRepeat2), + ("empty_statement", Javascript::EmptyStatement), + ("template_string", Javascript::TemplateString), + ("class_declaration", Javascript::ClassDeclaration), + ("member_expression", Javascript::MemberExpression), + ("sequence_expression", Javascript::SequenceExpression), + ("undefined", Javascript::Undefined), + ("export", Javascript::Export), + ("true", Javascript::True), + ("string", Javascript::String), ( - "jsx_self_closing_element", - Javascript::JsxSelfClosingElement, + "object_assignment_pattern", + Javascript::ObjectAssignmentPattern, ), - ("let", Javascript::Let), - ("array_pattern", Javascript::ArrayPattern), - ("pair_pattern", Javascript::PairPattern), - ("${", Javascript::DOLLARLBRACE), - ("export", Javascript::Export), - ("do", Javascript::Do), - (";", Javascript::SEMI), - ("property_identifier", Javascript::PropertyIdentifier), - ("public_field_definition", Javascript::PublicFieldDefinition), - ("}", Javascript::RBRACE), + ("pair", Javascript::Pair), + ("if", Javascript::If), + ("class_body_repeat1", Javascript::ClassBodyRepeat1), + (".", Javascript::DOT), + ("as", Javascript::As), + (">>", Javascript::GTGT), + ("hash_bang_line", Javascript::HashBangLine), ("break_statement", Javascript::BreakStatement), + (">", Javascript::GT), + ("/=", Javascript::SLASHEQ), + ("switch", Javascript::Switch), + ("_property_name", Javascript::PropertyName), ("class_heritage", Javascript::ClassHeritage), - ("<<", Javascript::LTLT), - ("*=", Javascript::STAREQ), - ("export_statement", Javascript::ExportStatement), - ("!==", Javascript::BANGEQEQ), - ("template_string_repeat1", Javascript::TemplateStringRepeat1), - ("default", Javascript::Default), - ("%", Javascript::PERCENT), - ("continue_statement", Javascript::ContinueStatement), - ("from", Javascript::From), - ("\\\"", Javascript::DQUOTE), - ("??=", Javascript::QMARKQMARKEQ), - ("ERROR", Javascript::Error), - ("+=", Javascript::PLUSEQ), - ("{", Javascript::LBRACE), - ("as", Javascript::As), - ("unary_expression", Javascript::UnaryExpression), - ("debugger_statement", Javascript::DebuggerStatement), + ("jsx_element", Javascript::JsxElement), + ("===", Javascript::EQEQEQ), + ("export_clause", Javascript::ExportClause), + ("jsx_fragment", Javascript::JsxFragment), + ("for_in_statement", Javascript::ForInStatement), + ("_template_chars", Javascript::TemplateChars), + ("!=", Javascript::BANGEQ), + (">>=", Javascript::GTGTEQ), + ("labeled_statement", Javascript::LabeledStatement), + ("object_repeat1", Javascript::ObjectRepeat1), + ("return", Javascript::Return), + ("of", Javascript::Of), + ("object", Javascript::Object), + ("continue", Javascript::Continue), + ("array_pattern", Javascript::ArrayPattern), + ("rest_pattern", Javascript::RestPattern), ("assignment_expression", Javascript::AssignmentExpression), - ("while", Javascript::While), + ("import_clause", Javascript::ImportClause), + ("switch_case", Javascript::SwitchCase), + ("from", Javascript::From), + ("-", Javascript::DASH), + ("switch_statement", Javascript::SwitchStatement), + ("var", Javascript::Var), ( - "export_statement_repeat1", - Javascript::ExportStatementRepeat1, + "generator_function_declaration", + Javascript::GeneratorFunctionDeclaration, ), - ("++", Javascript::PLUSPLUS), - ("meta_property", Javascript::MetaProperty), - ("target", Javascript::Target), - ("_for_header", Javascript::ForHeader), - ("regex_flags", Javascript::RegexFlags), + ("*=", Javascript::STAREQ), + ("?.", Javascript::QMARKDOT), + ("switch_body", Javascript::SwitchBody), + ("/", Javascript::SLASH), + ("debugger_statement", Javascript::DebuggerStatement), + ("false", Javascript::False), + ("do_statement", Javascript::DoStatement), + ("import_statement", Javascript::ImportStatement), + ("nested_identifier", Javascript::NestedIdentifier), + ("get", Javascript::Get), + ("<", Javascript::LT), ( - "parenthesized_expression", - Javascript::ParenthesizedExpression, + "formal_parameters_repeat1", + Javascript::FormalParametersRepeat1, ), - ("function_declaration", Javascript::FunctionDeclaration), - ("<", Javascript::LT), - ("static", Javascript::Static), - ("|=", Javascript::PIPEEQ), - ("=", Javascript::EQ), - ("with_statement", Javascript::WithStatement), - ("?", Javascript::QMARK), + ("'", Javascript::SQUOTE), ("!", Javascript::BANG), + ("template_string_repeat1", Javascript::TemplateStringRepeat1), + ("ERROR", Javascript::Error), + ("number", Javascript::Number), + ("--", Javascript::DASHDASH), + ("-=", Javascript::DASHEQ), + ("jsx_expression", Javascript::JsxExpression), + ("&", Javascript::AMP), ( - "augmented_assignment_expression", - Javascript::AugmentedAssignmentExpression, + "variable_declaration_repeat1", + Javascript::VariableDeclarationRepeat1, ), - ("yield_expression", Javascript::YieldExpression), - ("catch_clause", Javascript::CatchClause), - ("number", Javascript::Number), - ("import_specifier", Javascript::ImportSpecifier), - ("switch_default", Javascript::SwitchDefault), - ("expression_statement", Javascript::ExpressionStatement), - ("switch", Javascript::Switch), - ("typeof", Javascript::Typeof), - ("in", Javascript::In), - ("...", Javascript::DOTDOTDOT), - ("jsx_fragment", Javascript::JsxFragment), ("export_clause_repeat1", Javascript::ExportClauseRepeat1), - ("new", Javascript::New), - ("<<=", Javascript::LTLTEQ), - ("for", Javascript::For), - ("~", Javascript::TILDE), - ("var", Javascript::Var), - ("undefined", Javascript::Undefined), - ("comment", Javascript::Comment), - ("do_statement", Javascript::DoStatement), - ("new_expression", Javascript::NewExpression), - ("||=", Javascript::PIPEPIPEEQ), - ("continue", Javascript::Continue), - ("update_expression", Javascript::UpdateExpression), - ("member_expression", Javascript::MemberExpression), - ("else", Javascript::Else), - ("statement_block", Javascript::StatementBlock), - ("jsx_closing_element", Javascript::JsxClosingElement), - ("try_statement", Javascript::TryStatement), - ("string_token2", Javascript::StringToken2), - ("regex", Javascript::Regex), - ("class_declaration", Javascript::ClassDeclaration), - ("class_body_repeat1", Javascript::ClassBodyRepeat1), - ("case", Javascript::Case), - ("string", Javascript::String), - ("ternary_expression", Javascript::TernaryExpression), - ("lexical_declaration", Javascript::LexicalDeclaration), - ("==", Javascript::EQEQ), - ("&=", Javascript::AMPEQ), - (">>>", Javascript::GTGTGT), - ("jsx_element_repeat1", Javascript::JsxElementRepeat1), + ("do", Javascript::Do), + ("target", Javascript::Target), ("jsx_namespace_name", Javascript::JsxNamespaceName), - ("===", Javascript::EQEQEQ), - ("||", Javascript::PIPEPIPE), - ("await_expression", Javascript::AwaitExpression), - (",", Javascript::COMMA), - ("/=", Javascript::SLASHEQ), - ("<=", Javascript::LTEQ), - ("import_clause", Javascript::ImportClause), - ("rest_pattern", Javascript::RestPattern), - ("true", Javascript::True), + ("expression_statement", Javascript::ExpressionStatement), + ("identifier", Javascript::Identifier), + ("method_definition", Javascript::MethodDefinition), + ("if_statement", Javascript::IfStatement), + ("static", Javascript::Static), + ("|=", Javascript::PIPEEQ), + ("catch_clause", Javascript::CatchClause), ("await", Javascript::Await), - ("arguments", Javascript::Arguments), - ("_initializer", Javascript::Initializer), - ("named_imports_repeat1", Javascript::NamedImportsRepeat1), - ("end", Javascript::End), - ("for_in_statement", Javascript::ForInStatement), - ("subscript_expression", Javascript::SubscriptExpression), - ("pattern", Javascript::Pattern), - ("[", Javascript::LBRACK), - ("class", Javascript::Class), - ("-", Javascript::DASH), - ("_template_chars", Javascript::TemplateChars), - ("export_specifier", Javascript::ExportSpecifier), - ("??", Javascript::QMARKQMARK), - ( - "jsx_opening_element_repeat1", - Javascript::JsxOpeningElementRepeat1, - ), - (".", Javascript::DOT), + ("case", Javascript::Case), + ("+", Javascript::PLUS), + ("catch", Javascript::Catch), + ("continue_statement", Javascript::ContinueStatement), + ("return_statement", Javascript::ReturnStatement), + ("escape_sequence", Javascript::EscapeSequence), + (";", Javascript::SEMI), + ("||=", Javascript::PIPEPIPEEQ), + ("spread_element", Javascript::SpreadElement), ("*", Javascript::STAR), - ("if", Javascript::If), - ("this", Javascript::This), - ("finally_clause", Javascript::FinallyClause), - ("labeled_statement", Javascript::LabeledStatement), ( "shorthand_property_identifier_pattern", Javascript::ShorthandPropertyIdentifierPattern, ), + ("jsx_attribute", Javascript::JsxAttribute), + ("assignment_pattern", Javascript::AssignmentPattern), + ("for", Javascript::For), ( - "shorthand_property_identifier", - Javascript::ShorthandPropertyIdentifier, - ), - ("break", Javascript::Break), - ("null", Javascript::Null), - ("get", Javascript::Get), - ("_property_name", Javascript::PropertyName), - ( - "object_assignment_pattern", - Javascript::ObjectAssignmentPattern, + "jsx_opening_element_repeat1", + Javascript::JsxOpeningElementRepeat1, ), - ("program_repeat1", Javascript::ProgramRepeat1), - ("object", Javascript::Object), - ("declaration", Javascript::Declaration), - ("string_repeat1", Javascript::StringRepeat1), - ("!=", Javascript::BANGEQ), - ("@", Javascript::AT), - ("|", Javascript::PIPE), - ("array_repeat1", Javascript::ArrayRepeat1), - ("?.", Javascript::QMARKDOT), + ("comment", Javascript::Comment), + ("...", Javascript::DOTDOTDOT), + ("=>", Javascript::EQGT), + ("&&=", Javascript::AMPAMPEQ), + ("delete", Javascript::Delete), + ("array", Javascript::Array), ( - "_augmented_assignment_lhs", - Javascript::AugmentedAssignmentLhs, + "augmented_assignment_expression", + Javascript::AugmentedAssignmentExpression, ), - ("--", Javascript::DASHDASH), - ("jsx_attribute", Javascript::JsxAttribute), - ("class_body", Javascript::ClassBody), - ("template_substitution", Javascript::TemplateSubstitution), - ("string_token1", Javascript::StringToken1), - ("void", Javascript::Void), - ("if_statement", Javascript::IfStatement), - ("extends", Javascript::Extends), - ("&&=", Javascript::AMPAMPEQ), - ("try", Javascript::Try), - ("jsx_text", Javascript::JsxText), - ("=>", Javascript::EQGT), - ("string_repeat2", Javascript::StringRepeat2), - ]), + ("variable_declaration", Javascript::VariableDeclaration), + ("&&", Javascript::AMPAMP), + (">>>", Javascript::GTGTGT), + ("arguments", Javascript::Arguments), + ("++", Javascript::PLUSPLUS), + ("??", Javascript::QMARKQMARK), + ("(", Javascript::LPAREN), + ("<<=", Javascript::LTLTEQ), + ("array_pattern_repeat1", Javascript::ArrayPatternRepeat1), + ("variable_declarator", Javascript::VariableDeclarator), + ("property_identifier", Javascript::PropertyIdentifier), + ("==", Javascript::EQEQ), + ("jsx_element_repeat1", Javascript::JsxElementRepeat1), + ("statement_block", Javascript::StatementBlock), + ("~", Javascript::TILDE), + ("regex_pattern", Javascript::RegexPattern), + ], }; impl From<&str> for Javascript { diff --git a/src/languages/language_mozjs.rs b/src/languages/language_mozjs.rs index 3c5cf9348..89edb4099 100644 --- a/src/languages/language_mozjs.rs +++ b/src/languages/language_mozjs.rs @@ -254,319 +254,319 @@ pub enum Mozjs { #[allow(clippy::unreadable_literal)] static KEYS: phf::Map<&'static str, Mozjs> = ::phf::Map { - key: 3213172566270843353, - disps: ::phf::Slice::Static(&[ - (5, 82), - (1, 172), - (1, 132), - (1, 51), - (0, 115), - (0, 53), - (0, 1), - (0, 6), - (0, 36), - (0, 224), - (1, 0), - (0, 57), - (0, 13), - (0, 11), - (1, 2), - (2, 5), - (0, 4), - (2, 0), - (0, 195), - (1, 47), - (0, 6), + key: 12913932095322966823, + disps: &[ (0, 0), - (0, 23), - (11, 45), - (0, 5), - (0, 15), - (0, 56), - (28, 84), + (2, 4), + (0, 64), + (5, 115), + (0, 1), + (0, 71), + (0, 112), + (5, 164), + (0, 1), + (0, 9), + (1, 64), + (0, 12), + (1, 122), + (1, 34), (0, 2), - (9, 161), - (1, 18), - (0, 79), - (60, 226), - (4, 212), - (0, 10), - (2, 181), - (0, 4), - (1, 41), + (1, 161), + (0, 9), + (0, 0), + (1, 54), + (0, 1), + (4, 119), + (0, 61), + (6, 92), + (0, 182), + (1, 188), + (0, 24), + (0, 60), + (0, 6), + (2, 197), + (0, 73), + (0, 106), + (0, 75), + (2, 123), + (17, 45), + (6, 19), + (41, 55), (0, 16), + (2, 166), + (0, 18), + (12, 49), (0, 38), - (0, 24), - (36, 8), - (0, 0), - (0, 36), - (2, 24), - (0, 0), - (0, 39), - (1, 11), - (1, 204), - ]), - entries: ::phf::Slice::Static(&[ + (0, 59), + (0, 26), + (2, 125), + (0, 97), + (8, 32), + (49, 189), + (1, 1), + (0, 8), + ], + entries: &[ + ("instanceof", Mozjs::Instanceof), + ("continue_statement", Mozjs::ContinueStatement), + ("preproc", Mozjs::Preproc), + ("**=", Mozjs::STARSTAREQ), + (">>=", Mozjs::GTGTEQ), + ("jsx_text", Mozjs::JsxText), + ("statement_identifier", Mozjs::StatementIdentifier), + ("<", Mozjs::LT), + ("jsx_self_closing_element", Mozjs::JsxSelfClosingElement), + ("^=", Mozjs::CARETEQ), + ("+=", Mozjs::PLUSEQ), + ("statement_block", Mozjs::StatementBlock), + ("false", Mozjs::False), + ("formal_parameters", Mozjs::FormalParameters), + ("expression_statement", Mozjs::ExpressionStatement), ( - "shorthand_property_identifier", - Mozjs::ShorthandPropertyIdentifier, + "shorthand_property_identifier_pattern", + Mozjs::ShorthandPropertyIdentifierPattern, ), + ("function", Mozjs::Function), + ("&&", Mozjs::AMPAMP), + ("var", Mozjs::Var), + ("const", Mozjs::Const), + ("<<", Mozjs::LTLT), + ("export_specifier", Mozjs::ExportSpecifier), + ("rest_pattern", Mozjs::RestPattern), + ("array_pattern", Mozjs::ArrayPattern), + ("&", Mozjs::AMP), + ("pair_pattern", Mozjs::PairPattern), + ("??=", Mozjs::QMARKQMARKEQ), + ("]", Mozjs::RBRACK), + ("object_repeat1", Mozjs::ObjectRepeat1), + ("-=", Mozjs::DASHEQ), + ("comment", Mozjs::Comment), + ("_from_clause", Mozjs::FromClause), + ("debugger", Mozjs::Debugger), + (")", Mozjs::RPAREN), + ("identifier", Mozjs::Identifier), + ("if", Mozjs::If), + ("jsx_fragment", Mozjs::JsxFragment), + ("named_imports", Mozjs::NamedImports), + ("/=", Mozjs::SLASHEQ), + ("import", Mozjs::Import), + ("||=", Mozjs::PIPEPIPEEQ), + ("import_specifier", Mozjs::ImportSpecifier), + ("template_string", Mozjs::TemplateString), + ("**", Mozjs::STARSTAR), + ("while_statement", Mozjs::WhileStatement), + ("for_statement", Mozjs::ForStatement), + ("jsx_element_repeat1", Mozjs::JsxElementRepeat1), + (">>>", Mozjs::GTGTGT), + ("import_clause", Mozjs::ImportClause), + ("null", Mozjs::Null), + ("with_statement", Mozjs::WithStatement), + ("variable_declarator", Mozjs::VariableDeclarator), + ("*=", Mozjs::STAREQ), + ("decorator", Mozjs::Decorator), + ("namespace_import", Mozjs::NamespaceImport), + ("import_statement", Mozjs::ImportStatement), + ("&=", Mozjs::AMPEQ), + ("of", Mozjs::Of), + ("yield_expression", Mozjs::YieldExpression), + ("++", Mozjs::PLUSPLUS), + ("|", Mozjs::PIPE), + ("export_clause", Mozjs::ExportClause), + ("arguments", Mozjs::Arguments), + ("escape_sequence", Mozjs::EscapeSequence), + ("switch_body", Mozjs::SwitchBody), + ("async", Mozjs::Async), + ("export", Mozjs::Export), + (",", Mozjs::COMMA), + ("switch_default", Mozjs::SwitchDefault), + ("do_statement", Mozjs::DoStatement), + (">>", Mozjs::GTGT), ("+", Mozjs::PLUS), + ("string_repeat2", Mozjs::StringRepeat2), + ("break_statement", Mozjs::BreakStatement), + ("_for_header", Mozjs::ForHeader), + ("||", Mozjs::PIPEPIPE), + ("template_string_repeat1", Mozjs::TemplateStringRepeat1), + ("get", Mozjs::Get), + ("object_pattern_repeat1", Mozjs::ObjectPatternRepeat1), + ("number", Mozjs::Number), + ("jsx_closing_element", Mozjs::JsxClosingElement), + ("}", Mozjs::RBRACE), + ("typeof", Mozjs::Typeof), + ("regex_pattern", Mozjs::RegexPattern), + ("end", Mozjs::End), + ("pair", Mozjs::Pair), + ("spread_element", Mozjs::SpreadElement), + ("function_declaration", Mozjs::FunctionDeclaration), + ("for_in_statement", Mozjs::ForInStatement), + ("=", Mozjs::EQ), + ("undefined", Mozjs::Undefined), ("string_repeat1", Mozjs::StringRepeat1), - ( - "generator_function_declaration", - Mozjs::GeneratorFunctionDeclaration, - ), - ("expression_statement", Mozjs::ExpressionStatement), + ("await_expression", Mozjs::AwaitExpression), + ("primary_expression", Mozjs::PrimaryExpression), + ("throw", Mozjs::Throw), + ("generator_function", Mozjs::GeneratorFunction), + ("'", Mozjs::SQUOTE), + ("binary_expression", Mozjs::BinaryExpression), + ("-", Mozjs::DASH), + (":", Mozjs::COLON), + ("target", Mozjs::Target), ("jsx_expression", Mozjs::JsxExpression), ("...", Mozjs::DOTDOTDOT), - ("escape_sequence", Mozjs::EscapeSequence), - ("]", Mozjs::RBRACK), + ("labeled_statement", Mozjs::LabeledStatement), + (">", Mozjs::GT), + ("===", Mozjs::EQEQEQ), + ("formal_parameters_repeat1", Mozjs::FormalParametersRepeat1), + ("<=", Mozjs::LTEQ), + ("jsx_opening_element", Mozjs::JsxOpeningElement), + ("--", Mozjs::DASHDASH), + ("`", Mozjs::BQUOTE), + ("array", Mozjs::Array), + ("program_repeat1", Mozjs::ProgramRepeat1), + ("case", Mozjs::Case), + ("switch_body_repeat1", Mozjs::SwitchBodyRepeat1), + ("jsx_element", Mozjs::JsxElement), + ("switch_statement", Mozjs::SwitchStatement), + ("new", Mozjs::New), + ("{", Mozjs::LBRACE), + ("with", Mozjs::With), + ("_initializer", Mozjs::Initializer), + ("class_declaration", Mozjs::ClassDeclaration), + ("break", Mozjs::Break), + ("|=", Mozjs::PIPEEQ), + ("yield", Mozjs::Yield), + ("from", Mozjs::From), + ("variable_declaration", Mozjs::VariableDeclaration), + ("!==", Mozjs::BANGEQEQ), + ("~", Mozjs::TILDE), + ("ternary_expression", Mozjs::TernaryExpression), + ("else_clause", Mozjs::ElseClause), + ("in", Mozjs::In), + ("void", Mozjs::Void), + ("declaration", Mozjs::Declaration), + ("default", Mozjs::Default), + ("true", Mozjs::True), + ("computed_property_name", Mozjs::ComputedPropertyName), + ("class_heritage", Mozjs::ClassHeritage), + ("continue", Mozjs::Continue), + (".", Mozjs::DOT), + ("sequence_expression", Mozjs::SequenceExpression), + ("if_statement", Mozjs::IfStatement), + ("switch", Mozjs::Switch), ("export_statement_repeat1", Mozjs::ExportStatementRepeat1), + ("new_expression", Mozjs::NewExpression), + ("string_token1", Mozjs::StringToken1), + ("_property_name", Mozjs::PropertyName), + ("@", Mozjs::AT), + ("object", Mozjs::Object), + ("empty_statement", Mozjs::EmptyStatement), ("string_token2", Mozjs::StringToken2), - ("undefined", Mozjs::Undefined), - ("template_string_repeat1", Mozjs::TemplateStringRepeat1), + ("string", Mozjs::String), + ("subscript_expression", Mozjs::SubscriptExpression), + ("%", Mozjs::PERCENT), + ("*", Mozjs::STAR), + ("assignment_pattern", Mozjs::AssignmentPattern), + ("try_statement", Mozjs::TryStatement), + ("extends", Mozjs::Extends), + ("_destructuring_pattern", Mozjs::DestructuringPattern), + ("regex_flags", Mozjs::RegexFlags), + ("ERROR", Mozjs::Error), + ("meta_property", Mozjs::MetaProperty), ("named_imports_repeat1", Mozjs::NamedImportsRepeat1), - ("return_statement", Mozjs::ReturnStatement), - ("if", Mozjs::If), - ("typeof", Mozjs::Typeof), - ("from", Mozjs::From), - ("declaration", Mozjs::Declaration), - ("named_imports", Mozjs::NamedImports), - ("-=", Mozjs::DASHEQ), + (">>>=", Mozjs::GTGTGTEQ), ("throw_statement", Mozjs::ThrowStatement), - ("meta_property", Mozjs::MetaProperty), - ("export", Mozjs::Export), - (">>>", Mozjs::GTGTGT), - (">", Mozjs::GT), - ("import_clause", Mozjs::ImportClause), - ("array_pattern_repeat1", Mozjs::ArrayPatternRepeat1), - ("var", Mozjs::Var), - ("binary_expression", Mozjs::BinaryExpression), - ("string", Mozjs::String), - ("ternary_expression", Mozjs::TernaryExpression), - ( - "shorthand_property_identifier_pattern", - Mozjs::ShorthandPropertyIdentifierPattern, - ), + ("unary_expression", Mozjs::UnaryExpression), + ("assignment_expression", Mozjs::AssignmentExpression), + ("?.", Mozjs::QMARKDOT), + ("object_assignment_pattern", Mozjs::ObjectAssignmentPattern), + ("return_statement", Mozjs::ReturnStatement), + ("for", Mozjs::For), + ("program", Mozjs::Program), + ("let", Mozjs::Let), + ("hash_bang_line", Mozjs::HashBangLine), + ("method_definition", Mozjs::MethodDefinition), + ("arrow_function", Mozjs::ArrowFunction), + ("_template_chars", Mozjs::TemplateChars), + ("super", Mozjs::Super), + ("set", Mozjs::Set), + ("catch_clause", Mozjs::CatchClause), + ("parenthesized_expression", Mozjs::ParenthesizedExpression), + ("jsx_attribute", Mozjs::JsxAttribute), + ("array_repeat1", Mozjs::ArrayRepeat1), + ("!=", Mozjs::BANGEQ), + ("return", Mozjs::Return), + ("_augmented_assignment_lhs", Mozjs::AugmentedAssignmentLhs), + ("await", Mozjs::Await), + ("this", Mozjs::This), + ("_automatic_semicolon", Mozjs::AutomaticSemicolon), + ("as", Mozjs::As), + ("/", Mozjs::SLASH), + ("call_expression", Mozjs::CallExpression), ("=>", Mozjs::EQGT), - ("**", Mozjs::STARSTAR), - ("|", Mozjs::PIPE), - ("for_statement", Mozjs::ForStatement), - ("throw", Mozjs::Throw), + ("switch_case", Mozjs::SwitchCase), + ("!", Mozjs::BANG), + ("%=", Mozjs::PERCENTEQ), + ("lexical_declaration", Mozjs::LexicalDeclaration), + ("?", Mozjs::QMARK), + ("property_identifier", Mozjs::PropertyIdentifier), ( "augmented_assignment_expression", Mozjs::AugmentedAssignmentExpression, ), - ("void", Mozjs::Void), + ("class", Mozjs::Class), + ("debugger_statement", Mozjs::DebuggerStatement), ("public_field_definition", Mozjs::PublicFieldDefinition), - ("for", Mozjs::For), - ("preproc", Mozjs::Preproc), + ("else", Mozjs::Else), + ("template_substitution", Mozjs::TemplateSubstitution), + ("export_statement", Mozjs::ExportStatement), + (">=", Mozjs::GTEQ), + ("export_clause_repeat1", Mozjs::ExportClauseRepeat1), + ("object_pattern", Mozjs::ObjectPattern), ("[", Mozjs::LBRACK), - ("unary_expression", Mozjs::UnaryExpression), - ("pair_pattern", Mozjs::PairPattern), - (".", Mozjs::DOT), - ("_property_name", Mozjs::PropertyName), - ("parenthesized_expression", Mozjs::ParenthesizedExpression), - ("array_repeat1", Mozjs::ArrayRepeat1), - ("switch_body_repeat1", Mozjs::SwitchBodyRepeat1), - ("array_pattern", Mozjs::ArrayPattern), - ("number", Mozjs::Number), - ("class_heritage", Mozjs::ClassHeritage), - ("labeled_statement", Mozjs::LabeledStatement), - ("||", Mozjs::PIPEPIPE), - ("regex", Mozjs::Regex), - ("~", Mozjs::TILDE), + ("catch", Mozjs::Catch), + ("array_pattern_repeat1", Mozjs::ArrayPatternRepeat1), ( "jsx_opening_element_repeat1", Mozjs::JsxOpeningElementRepeat1, ), - ("import_specifier", Mozjs::ImportSpecifier), - ("this", Mozjs::This), - ("switch", Mozjs::Switch), - ("^=", Mozjs::CARETEQ), - ("empty_statement", Mozjs::EmptyStatement), - ("array", Mozjs::Array), - ("continue_statement", Mozjs::ContinueStatement), - ("<<", Mozjs::LTLT), - ("!=", Mozjs::BANGEQ), - ("`", Mozjs::BQUOTE), - ("<<=", Mozjs::LTLTEQ), - ("=", Mozjs::EQ), - (">>=", Mozjs::GTGTEQ), - ("assignment_pattern", Mozjs::AssignmentPattern), - ("==", Mozjs::EQEQ), - ("debugger", Mozjs::Debugger), - ("generator_function", Mozjs::GeneratorFunction), - ("in", Mozjs::In), - ("static", Mozjs::Static), ("^", Mozjs::CARET), - ("%=", Mozjs::PERCENTEQ), - ("for_in_statement", Mozjs::ForInStatement), - ("finally", Mozjs::Finally), - ("else", Mozjs::Else), - ("jsx_attribute", Mozjs::JsxAttribute), - ("catch", Mozjs::Catch), - ("_for_header", Mozjs::ForHeader), - ("object_pattern", Mozjs::ObjectPattern), - ("null", Mozjs::Null), - ("string_token1", Mozjs::StringToken1), - ("break_statement", Mozjs::BreakStatement), - ("instanceof", Mozjs::Instanceof), - ("regex_flags", Mozjs::RegexFlags), - ("finally_clause", Mozjs::FinallyClause), - ("!==", Mozjs::BANGEQEQ), - ("*", Mozjs::STAR), - ("export_specifier", Mozjs::ExportSpecifier), - ("nested_identifier", Mozjs::NestedIdentifier), - ("jsx_fragment", Mozjs::JsxFragment), - ("break", Mozjs::Break), - ("class_body_repeat1", Mozjs::ClassBodyRepeat1), - ("method_definition", Mozjs::MethodDefinition), - ("jsx_text", Mozjs::JsxText), - ("|=", Mozjs::PIPEEQ), - ("member_expression", Mozjs::MemberExpression), - ("extends", Mozjs::Extends), - ("continue", Mozjs::Continue), - ("jsx_opening_element", Mozjs::JsxOpeningElement), - ("export_clause_repeat1", Mozjs::ExportClauseRepeat1), - ("lexical_declaration", Mozjs::LexicalDeclaration), - ("await", Mozjs::Await), - ("}", Mozjs::RBRACE), - ("${", Mozjs::DOLLARLBRACE), - ("<", Mozjs::LT), - ("jsx_self_closing_element", Mozjs::JsxSelfClosingElement), - ("async", Mozjs::Async), - ("update_expression", Mozjs::UpdateExpression), - ("sequence_expression", Mozjs::SequenceExpression), - ("jsx_closing_element", Mozjs::JsxClosingElement), - ("&", Mozjs::AMP), - ("formal_parameters", Mozjs::FormalParameters), - ("program", Mozjs::Program), - ("decorator", Mozjs::Decorator), - ("function", Mozjs::Function), - ("import", Mozjs::Import), - ("function_declaration", Mozjs::FunctionDeclaration), - ("catch_clause", Mozjs::CatchClause), - ("regex_pattern", Mozjs::RegexPattern), - ("_initializer", Mozjs::Initializer), - ("as", Mozjs::As), - ("template_substitution", Mozjs::TemplateSubstitution), - ("computed_property_name", Mozjs::ComputedPropertyName), - ("variable_declaration", Mozjs::VariableDeclaration), - ("/=", Mozjs::SLASHEQ), - ("yield", Mozjs::Yield), - ("&&", Mozjs::AMPAMP), - ("new", Mozjs::New), - ("object", Mozjs::Object), - ("--", Mozjs::DASHDASH), - ("property_identifier", Mozjs::PropertyIdentifier), - ("default", Mozjs::Default), - ("?.", Mozjs::QMARKDOT), - ("expression", Mozjs::Expression), - ("??=", Mozjs::QMARKQMARKEQ), - ("string_repeat2", Mozjs::StringRepeat2), - ("return", Mozjs::Return), - ("while", Mozjs::While), - ("===", Mozjs::EQEQEQ), - (">>", Mozjs::GTGT), - ("_augmented_assignment_lhs", Mozjs::AugmentedAssignmentLhs), - ("with_statement", Mozjs::WithStatement), - ("of", Mozjs::Of), - ("&=", Mozjs::AMPEQ), - ("_destructuring_pattern", Mozjs::DestructuringPattern), - ("&&=", Mozjs::AMPAMPEQ), - ("-", Mozjs::DASH), - ("_from_clause", Mozjs::FromClause), - ("*=", Mozjs::STAREQ), - ("const", Mozjs::Const), - ("comment", Mozjs::Comment), - ("identifier", Mozjs::Identifier), - (":", Mozjs::COLON), - ("let", Mozjs::Let), - (">=", Mozjs::GTEQ), - ("switch_case", Mozjs::SwitchCase), - ("switch_statement", Mozjs::SwitchStatement), + ("delete", Mozjs::Delete), ("jsx_namespace_name", Mozjs::JsxNamespaceName), - (",", Mozjs::COMMA), - (")", Mozjs::RPAREN), - ("with", Mozjs::With), - ("\'", Mozjs::SQUOTE), - ("false", Mozjs::False), - ("variable_declarator", Mozjs::VariableDeclarator), - ("ERROR", Mozjs::Error), + ("class_body_repeat1", Mozjs::ClassBodyRepeat1), + ("finally_clause", Mozjs::FinallyClause), + ("(", Mozjs::LPAREN), + ("pattern", Mozjs::Pattern), ( "variable_declaration_repeat1", Mozjs::VariableDeclarationRepeat1, ), - ("primary_expression", Mozjs::PrimaryExpression), - ("@", Mozjs::AT), - ("pair", Mozjs::Pair), - ("await_expression", Mozjs::AwaitExpression), - ("jsx_element_repeat1", Mozjs::JsxElementRepeat1), - ("true", Mozjs::True), - ("switch_body", Mozjs::SwitchBody), - ("yield_expression", Mozjs::YieldExpression), - (">>>=", Mozjs::GTGTGTEQ), - ("while_statement", Mozjs::WhileStatement), - ("set", Mozjs::Set), - ("<=", Mozjs::LTEQ), - ("switch_default", Mozjs::SwitchDefault), - ("statement_identifier", Mozjs::StatementIdentifier), - ("export_statement", Mozjs::ExportStatement), - ("_template_chars", Mozjs::TemplateChars), - ("pattern", Mozjs::Pattern), - ("try", Mozjs::Try), - ("export_clause", Mozjs::ExportClause), - ("arrow_function", Mozjs::ArrowFunction), - ("get", Mozjs::Get), + ( + "generator_function_declaration", + Mozjs::GeneratorFunctionDeclaration, + ), ("class_body", Mozjs::ClassBody), - ("??", Mozjs::QMARKQMARK), - ("jsx_element", Mozjs::JsxElement), - ("debugger_statement", Mozjs::DebuggerStatement), - ("else_clause", Mozjs::ElseClause), - ("case", Mozjs::Case), - ("**=", Mozjs::STARSTAREQ), - ("subscript_expression", Mozjs::SubscriptExpression), - ("object_assignment_pattern", Mozjs::ObjectAssignmentPattern), - ("import_statement", Mozjs::ImportStatement), - ("\\\"", Mozjs::DQUOTE), - ("super", Mozjs::Super), - ("new_expression", Mozjs::NewExpression), - ("hash_bang_line", Mozjs::HashBangLine), - ("_automatic_semicolon", Mozjs::AutomaticSemicolon), - ("try_statement", Mozjs::TryStatement), - ("namespace_import", Mozjs::NamespaceImport), - ("object_repeat1", Mozjs::ObjectRepeat1), - ("assignment_expression", Mozjs::AssignmentExpression), - ("||=", Mozjs::PIPEPIPEEQ), - ("template_string", Mozjs::TemplateString), - ("statement_block", Mozjs::StatementBlock), ("do", Mozjs::Do), - ("%", Mozjs::PERCENT), - ("?", Mozjs::QMARK), - ("if_statement", Mozjs::IfStatement), - ("/", Mozjs::SLASH), - ("delete", Mozjs::Delete), - ("!", Mozjs::BANG), - ("++", Mozjs::PLUSPLUS), - ("formal_parameters_repeat1", Mozjs::FormalParametersRepeat1), - ("arguments", Mozjs::Arguments), - ("do_statement", Mozjs::DoStatement), - ("class", Mozjs::Class), - ("spread_element", Mozjs::SpreadElement), - ("+=", Mozjs::PLUSEQ), - ("target", Mozjs::Target), - ("class_declaration", Mozjs::ClassDeclaration), - ("program_repeat1", Mozjs::ProgramRepeat1), - ("(", Mozjs::LPAREN), - ("call_expression", Mozjs::CallExpression), - ("end", Mozjs::End), - ("rest_pattern", Mozjs::RestPattern), - ("{", Mozjs::LBRACE), - ("object_pattern_repeat1", Mozjs::ObjectPatternRepeat1), (";", Mozjs::SEMI), - ]), + ("expression", Mozjs::Expression), + ("<<=", Mozjs::LTLTEQ), + ("==", Mozjs::EQEQ), + ("regex", Mozjs::Regex), + ("while", Mozjs::While), + ("try", Mozjs::Try), + ("static", Mozjs::Static), + ("member_expression", Mozjs::MemberExpression), + ("&&=", Mozjs::AMPAMPEQ), + ("finally", Mozjs::Finally), + ("nested_identifier", Mozjs::NestedIdentifier), + ("${", Mozjs::DOLLARLBRACE), + ("\\\"", Mozjs::DQUOTE), + ("??", Mozjs::QMARKQMARK), + ( + "shorthand_property_identifier", + Mozjs::ShorthandPropertyIdentifier, + ), + ("update_expression", Mozjs::UpdateExpression), + ], }; impl From<&str> for Mozjs { diff --git a/src/languages/language_preproc.rs b/src/languages/language_preproc.rs index 0faa499e5..1d17ce4f2 100644 --- a/src/languages/language_preproc.rs +++ b/src/languages/language_preproc.rs @@ -43,59 +43,59 @@ pub enum Preproc { #[allow(clippy::unreadable_literal)] static KEYS: phf::Map<&'static str, Preproc> = ::phf::Map { - key: 3213172566270843353, - disps: ::phf::Slice::Static(&[ + key: 12913932095322966823, + disps: &[ + (1, 0), + (2, 13), + (0, 28), + (2, 16), (0, 0), - (33, 26), - (3, 12), - (18, 27), - (0, 1), - (3, 27), - (1, 25), - (2, 7), - ]), - entries: ::phf::Slice::Static(&[ - ("preproc_if_token2", Preproc::PreprocIfToken2), - ("preproc_elif", Preproc::PreprocElif), - ("translation_unit_repeat1", Preproc::TranslationUnitRepeat1), - ("identifier", Preproc::Identifier), - ("end", Preproc::End), + (0, 27), + (5, 36), + (12, 16), + ], + entries: &[ + ("preproc_elif_token1", Preproc::PreprocElifToken1), + ("preproc_else", Preproc::PreprocElse), + ("preproc_nothing_token1", Preproc::PreprocNothingToken1), ("raw_string_literal", Preproc::RawStringLiteral), - ("translation_unit", Preproc::TranslationUnit), - ("preproc_include", Preproc::PreprocInclude), ("_top_level_item", Preproc::TopLevelItem), - ("define", Preproc::Define), + ("end", Preproc::End), + ("preproc_else_token1", Preproc::PreprocElseToken1), + ("\\n", Preproc::LF), + ("preproc_if", Preproc::PreprocIf), + ("undef", Preproc::Undef), ("define_token1", Preproc::DefineToken1), - ("ERROR", Preproc::Error), - ("preproc_include_token1", Preproc::PreprocIncludeToken1), ("preproc_line", Preproc::PreprocLine), - ("preproc_if", Preproc::PreprocIf), ("string_literal_token1", Preproc::StringLiteralToken1), - ("undef", Preproc::Undef), + ("path", Preproc::Path), + ("define_repeat1", Preproc::DefineRepeat1), + ("translation_unit", Preproc::TranslationUnit), + ("preproc_if_token1", Preproc::PreprocIfToken1), + ("char_literal_token1", Preproc::CharLiteralToken1), ( "preproc_continuation_line", Preproc::PreprocContinuationLine, ), - ("preproc_else", Preproc::PreprocElse), - (">", Preproc::GT), - ("define_repeat1", Preproc::DefineRepeat1), - ("<", Preproc::LT), - ("comment", Preproc::Comment), + ("undef_token1", Preproc::UndefToken1), + ("define", Preproc::Define), ("preproc_nothing", Preproc::PreprocNothing), - ("preproc_if_token1", Preproc::PreprocIfToken1), - ("nothing", Preproc::Nothing), - ("preproc_nothing_token1", Preproc::PreprocNothingToken1), ("char_literal", Preproc::CharLiteral), + ("preproc_elif", Preproc::PreprocElif), + ("nothing", Preproc::Nothing), + ("<", Preproc::LT), + ("preproc_include", Preproc::PreprocInclude), + ("translation_unit_repeat1", Preproc::TranslationUnitRepeat1), ("string_literal", Preproc::StringLiteral), - ("undef_token1", Preproc::UndefToken1), - ("preproc_else_token1", Preproc::PreprocElseToken1), - ("path", Preproc::Path), - ("preproc_if_repeat1", Preproc::PreprocIfRepeat1), - ("char_literal_token1", Preproc::CharLiteralToken1), + ("identifier", Preproc::Identifier), + ("preproc_if_token2", Preproc::PreprocIfToken2), ("integer_literal", Preproc::IntegerLiteral), - ("\\n", Preproc::LF), - ("preproc_elif_token1", Preproc::PreprocElifToken1), - ]), + ("preproc_include_token1", Preproc::PreprocIncludeToken1), + ("preproc_if_repeat1", Preproc::PreprocIfRepeat1), + ("ERROR", Preproc::Error), + ("comment", Preproc::Comment), + (">", Preproc::GT), + ], }; impl From<&str> for Preproc { diff --git a/src/languages/language_python.rs b/src/languages/language_python.rs index 465716347..a0efc4ec3 100644 --- a/src/languages/language_python.rs +++ b/src/languages/language_python.rs @@ -234,299 +234,299 @@ pub enum Python { #[allow(clippy::unreadable_literal)] static KEYS: phf::Map<&'static str, Python> = ::phf::Map { - key: 3213172566270843353, - disps: ::phf::Slice::Static(&[ + key: 12913932095322966823, + disps: &[ + (0, 17), + (0, 4), (0, 0), - (2, 103), - (0, 0), - (6, 32), - (0, 46), - (0, 93), - (0, 1), (0, 7), - (0, 3), - (1, 39), - (0, 47), - (0, 197), - (0, 9), - (0, 10), - (0, 58), - (0, 23), - (0, 195), - (0, 60), - (2, 221), - (0, 41), - (0, 2), - (2, 18), - (0, 0), - (2, 85), - (1, 16), - (9, 18), - (0, 74), - (1, 3), - (0, 204), - (15, 128), - (5, 52), - (15, 199), - (8, 141), + (1, 1), + (6, 212), + (1, 2), + (0, 45), + (1, 207), + (1, 1), + (0, 156), + (0, 14), + (0, 25), + (0, 69), + (2, 166), + (3, 18), (0, 42), - (0, 204), - (0, 135), - (3, 84), - (0, 8), - (20, 41), - (13, 60), - (25, 122), - (4, 79), - (14, 155), - (0, 204), + (0, 125), + (0, 121), + (0, 16), + (0, 18), + (0, 91), + (2, 0), + (3, 12), + (7, 24), (0, 0), - ]), - entries: ::phf::Slice::Static(&[ - ("concatenated_string", Python::ConcatenatedString), - ("chevron", Python::Chevron), - ("list_splat", Python::ListSplat), - ("exec_statement", Python::ExecStatement), - ("lambda", Python::Lambda), - ("nonlocal", Python::Nonlocal), - ("<<", Python::LTLT), - ("argument_list_repeat1", Python::ArgumentListRepeat1), - ("set_comprehension", Python::SetComprehension), - ("import_prefix", Python::ImportPrefix), - ("*=", Python::STAREQ), - ("\\\"", Python::DQUOTE), - ("break_statement", Python::BreakStatement), - ("future_import_statement", Python::FutureImportStatement), - ("attribute", Python::Attribute), - ("false", Python::False), - (")", Python::RPAREN), - ("type_conversion", Python::TypeConversion), - ("if", Python::If), - ("ERROR", Python::Error), - ("continue", Python::Continue), - ( - "_collection_elements_repeat1", - Python::CollectionElementsRepeat1, - ), - ("pass", Python::Pass), - ("for_in_clause", Python::ForInClause), - ("while_statement", Python::WhileStatement), - ("import_prefix_repeat1", Python::ImportPrefixRepeat1), - ("_collection_elements", Python::CollectionElements), - ("~", Python::TILDE), - ("global", Python::Global), + (21, 220), + (14, 57), + (2, 17), + (8, 119), + (6, 111), + (0, 11), + (0, 7), + (1, 2), + (0, 99), + (0, 72), + (0, 127), + (43, 20), + (0, 1), + (6, 146), + (0, 0), + (125, 90), + (32, 25), + (0, 200), + (0, 6), + ], + entries: &[ ("set", Python::Set), - ("primary_expression", Python::PrimaryExpression), - ("slice", Python::Slice), - ("parenthesized_list_splat", Python::ParenthesizedListSplat), - ("module_repeat1", Python::ModuleRepeat1), - ("delete_statement", Python::DeleteStatement), - ("-", Python::DASH), - ("else_clause", Python::ElseClause), - ("lambda_parameters", Python::LambdaParameters), - ("typed_default_parameter", Python::TypedDefaultParameter), - ("break", Python::Break), - ("escape_sequence", Python::EscapeSequence), - ("tuple_pattern", Python::TuplePattern), - ("del", Python::Del), - (",", Python::COMMA), - ("block", Python::Block), - ("_right_hand_side", Python::RightHandSide), - ("_string_content", Python::StringContent), - ("raise", Python::Raise), - ("relative_import", Python::RelativeImport), - ("except_clause", Python::ExceptClause), - ("dictionary_repeat1", Python::DictionaryRepeat1), - ("|=", Python::PIPEEQ), - ("argument_list", Python::ArgumentList), - ("finally", Python::Finally), - ("expression_statement", Python::ExpressionStatement), - ("dictionary_splat", Python::DictionarySplat), - ("try_statement", Python::TryStatement), - ("class_definition", Python::ClassDefinition), - ("unary_operator", Python::UnaryOperator), - ("global_statement", Python::GlobalStatement), - ("_import_list_repeat1", Python::ImportListRepeat1), - ("expression", Python::Expression), - ("-=", Python::DASHEQ), - ("dictionary_splat_pattern", Python::DictionarySplatPattern), - ("}", Python::RBRACE), - ("integer", Python::Integer), - ("@=", Python::ATEQ), - ("|", Python::PIPE), - (":", Python::COLON), - ("module", Python::Module), - ("&=", Python::AMPEQ), - ("format_specifier_repeat1", Python::FormatSpecifierRepeat1), - ("else", Python::Else), - ("elif", Python::Elif), - ("print", Python::Print), - (">=", Python::GTEQ), - ("_statement", Python::Statement), - ("&", Python::AMP), - ("%", Python::PERCENT), - ("pattern_list", Python::PatternList), - ("identifier", Python::Identifier), - ("/", Python::SLASH), - ("for", Python::For), - ( - "decorated_definition_repeat1", - Python::DecoratedDefinitionRepeat1, - ), - ("pass_statement", Python::PassStatement), - ("/=", Python::SLASHEQ), - ("->", Python::DASHGT), - ("]", Python::RBRACK), + ("_collection_elements", Python::CollectionElements), + ("ellipsis", Python::Ellipsis), + ("decorated_definition", Python::DecoratedDefinition), ("string_repeat1", Python::StringRepeat1), - ("for_in_clause_repeat1", Python::ForInClauseRepeat1), - ("except", Python::Except), - ("^=", Python::CARETEQ), - ("boolean_operator", Python::BooleanOperator), + ("is", Python::Is), + ("false", Python::False), + ("<>", Python::LTGT), + ("format_specifier", Python::FormatSpecifier), ("list_pattern", Python::ListPattern), - ("not", Python::Not), - ("<<=", Python::LTLTEQ), - ("[", Python::LBRACK), - ("class", Python::Class), + ("dotted_name_repeat1", Python::DottedNameRepeat1), + ("except", Python::Except), + ("elif_clause", Python::ElifClause), + ("_import_list_repeat1", Python::ImportListRepeat1), + ("dictionary_comprehension", Python::DictionaryComprehension), + ("=", Python::EQ), ("_semicolon", Python::Semicolon), - ("async", Python::Async), - ("type", Python::Type), - ("<=", Python::LTEQ), - ("print_statement_repeat1", Python::PrintStatementRepeat1), + ("list_comprehension", Python::ListComprehension), + ("_import_list", Python::ImportList), + ("if_statement_repeat1", Python::IfStatementRepeat1), + ("else", Python::Else), ( "concatenated_string_repeat1", Python::ConcatenatedStringRepeat1, ), - ("binary_operator", Python::BinaryOperator), - ("subscript_repeat1", Python::SubscriptRepeat1), - ("_not_escape_sequence", Python::NotEscapeSequence), - ("elif_clause", Python::ElifClause), - ("pair", Python::Pair), - ("with_clause", Python::WithClause), - ("%=", Python::PERCENTEQ), - ("format_specifier_token1", Python::FormatSpecifierToken1), - ("if_statement_repeat1", Python::IfStatementRepeat1), - ("return", Python::Return), + ("&=", Python::AMPEQ), ( "_expression_within_for_in_clause", Python::ExpressionWithinForInClause, ), - ("function_definition", Python::FunctionDefinition), - ("import_statement", Python::ImportStatement), - ("true", Python::True), - ("_simple_statements", Python::SimpleStatements), - ("parameter", Python::Parameter), - ("list_splat_pattern", Python::ListSplatPattern), - ("dotted_name_repeat1", Python::DottedNameRepeat1), - ("global_statement_repeat1", Python::GlobalStatementRepeat1), - ("and", Python::And), - ("!=", Python::BANGEQ), - ("assignment", Python::Assignment), - ("decorated_definition", Python::DecoratedDefinition), - ("comparison_operator", Python::ComparisonOperator), + ("assert", Python::Assert), + ("del", Python::Del), + ("await", Python::Await), + ("class_definition", Python::ClassDefinition), ("try", Python::Try), - ("none", Python::None), - ("while", Python::While), - ("dictionary_comprehension", Python::DictionaryComprehension), - ("import", Python::Import), - ("conditional_expression", Python::ConditionalExpression), - ("with", Python::With), - ("if_clause", Python::IfClause), - ("parameters", Python::Parameters), - ("typed_parameter", Python::TypedParameter), + ("concatenated_string", Python::ConcatenatedString), + ("list_splat_pattern", Python::ListSplatPattern), + ("try_statement", Python::TryStatement), + ("finally", Python::Finally), + ("pass", Python::Pass), + ("dictionary_splat_pattern", Python::DictionarySplatPattern), + ("print_statement_repeat1", Python::PrintStatementRepeat1), + ("for_in_clause", Python::ForInClause), + ("_simple_statements", Python::SimpleStatements), + ("or", Python::Or), + ("true", Python::True), + ("if", Python::If), (">", Python::GT), - ("print_statement", Python::PrintStatement), - (":=", Python::COLONEQ), - ("return_statement", Python::ReturnStatement), - ("for_statement", Python::ForStatement), - ("default_parameter", Python::DefaultParameter), + ("lambda", Python::Lambda), + ("class", Python::Class), + (".", Python::DOT), + (">=", Python::GTEQ), + ("delete_statement", Python::DeleteStatement), + ("global_statement", Python::GlobalStatement), + ("<<", Python::LTLT), + ("augmented_assignment", Python::AugmentedAssignment), ("assert_statement_repeat1", Python::AssertStatementRepeat1), - ("as", Python::As), - ("not_operator", Python::NotOperator), - ("_import_list", Python::ImportList), - ("finally_clause", Python::FinallyClause), - ("string", Python::String), + ("format_expression", Python::FormatExpression), + ("named_expression", Python::NamedExpression), + ("-", Python::DASH), + ("function_definition", Python::FunctionDefinition), + ("tuple", Python::Tuple), + ("yield", Python::Yield), + ("generator_expression", Python::GeneratorExpression), + ("dictionary_splat", Python::DictionarySplat), + ("type_conversion", Python::TypeConversion), + ("comment", Python::Comment), + ("expression_list", Python::ExpressionList), + ("none", Python::None), + ("<", Python::LT), + ("async", Python::Async), + ("pair", Python::Pair), + ("attribute", Python::Attribute), + ("boolean_operator", Python::BooleanOperator), + ("import_from_statement", Python::ImportFromStatement), + ("pattern_list", Python::PatternList), + ("with", Python::With), + ("|=", Python::PIPEEQ), + ("subscript_repeat1", Python::SubscriptRepeat1), + ("typed_default_parameter", Python::TypedDefaultParameter), + ("/", Python::SLASH), + ("for_in_clause_repeat1", Python::ForInClauseRepeat1), + ("wildcard_import", Python::WildcardImport), + ("_dedent", Python::Dedent), + ("else_clause", Python::ElseClause), + ("parameter", Python::Parameter), + ("import_prefix_repeat1", Python::ImportPrefixRepeat1), + ("%=", Python::PERCENTEQ), + ("^=", Python::CARETEQ), + ( + "_simple_statements_repeat1", + Python::SimpleStatementsRepeat1, + ), + ("raise_statement", Python::RaiseStatement), + ("global_statement_repeat1", Python::GlobalStatementRepeat1), + ("end", Python::End), + ("for", Python::For), ( "_comprehension_clauses_repeat1", Python::ComprehensionClausesRepeat1, ), - ("continue_statement", Python::ContinueStatement), - ("with_item", Python::WithItem), - ("or", Python::Or), - ("named_expression", Python::NamedExpression), - ("float", Python::Float), - ("dictionary", Python::Dictionary), - ("with_clause_repeat1", Python::WithClauseRepeat1), - ("generator_expression", Python::GeneratorExpression), - ("==", Python::EQEQ), - ("keyword_argument", Python::KeywordArgument), - ("import_from_statement", Python::ImportFromStatement), - ("if_statement", Python::IfStatement), - ("call", Python::Call), + ("pass_statement", Python::PassStatement), + ("list_splat", Python::ListSplat), ("(", Python::LPAREN), - ("yield", Python::Yield), - ("list_comprehension", Python::ListComprehension), - ("from", Python::From), - ("dotted_name", Python::DottedName), - ("_parameters_repeat1", Python::ParametersRepeat1), + ( + "_collection_elements_repeat1", + Python::CollectionElementsRepeat1, + ), + (">>", Python::GTGT), + ("_right_hand_side", Python::RightHandSide), + ("for_statement", Python::ForStatement), + ("import_prefix", Python::ImportPrefix), + ("identifier", Python::Identifier), + ("module_repeat1", Python::ModuleRepeat1), + ("continue_statement", Python::ContinueStatement), + ("assignment", Python::Assignment), + ("string", Python::String), + ("{", Python::LBRACE), ("__future__", Python::Future), - ("^", Python::CARET), + ("interpolation", Python::Interpolation), + ( + "comparison_operator_repeat1", + Python::ComparisonOperatorRepeat1, + ), + (">>=", Python::GTGTEQ), + ("-=", Python::DASHEQ), + ("dotted_name", Python::DottedName), + ("chevron", Python::Chevron), + ("exec", Python::Exec), + ("parenthesized_expression", Python::ParenthesizedExpression), + ("expression", Python::Expression), + ("aliased_import", Python::AliasedImport), + ("return_statement", Python::ReturnStatement), + ("]", Python::RBRACK), + ("format_specifier_repeat1", Python::FormatSpecifierRepeat1), + ("typed_parameter", Python::TypedParameter), + ("<=", Python::LTEQ), + ("future_import_statement", Python::FutureImportStatement), + ("@=", Python::ATEQ), + ("_patterns_repeat1", Python::PatternsRepeat1), + (",", Python::COMMA), + ("from", Python::From), + ("*=", Python::STAREQ), + ("import", Python::Import), + ("slice", Python::Slice), + ("def", Python::Def), ("list", Python::List), + ("if_clause", Python::IfClause), + ("!=", Python::BANGEQ), + ("_parameters_repeat1", Python::ParametersRepeat1), + ("as", Python::As), + ("if_statement", Python::IfStatement), + ("_string_content", Python::StringContent), + ("while", Python::While), + ("subscript", Python::Subscript), + ("binary_operator", Python::BinaryOperator), ("//", Python::SLASHSLASH), - ("augmented_assignment", Python::AugmentedAssignment), - ("comment", Python::Comment), - ("**=", Python::STARSTAREQ), - ("def", Python::Def), - ("{", Python::LBRACE), - ("pattern", Python::Pattern), - ("=", Python::EQ), + ("not_operator", Python::NotOperator), + ("_statement", Python::Statement), + ("type", Python::Type), + ("block", Python::Block), + ("default_parameter", Python::DefaultParameter), + ("expression_statement", Python::ExpressionStatement), + ("continue", Python::Continue), + ("\\\"", Python::DQUOTE), + ("try_statement_repeat1", Python::TryStatementRepeat1), ("*", Python::STAR), - ("_patterns_repeat1", Python::PatternsRepeat1), - ("+=", Python::PLUSEQ), + ("finally_clause", Python::FinallyClause), + ("comparison_operator", Python::ComparisonOperator), ("decorator", Python::Decorator), + ("print", Python::Print), + ("keyword_argument", Python::KeywordArgument), + (":", Python::COLON), + ("==", Python::EQEQ), + ("elif", Python::Elif), + ("raise", Python::Raise), + ("global", Python::Global), + ("escape_sequence", Python::EscapeSequence), + ("module", Python::Module), + ("parenthesized_list_splat", Python::ParenthesizedListSplat), ("_comprehension_clauses", Python::ComprehensionClauses), - ("**", Python::STARSTAR), - ("format_specifier", Python::FormatSpecifier), - ("aliased_import", Python::AliasedImport), - ("expression_list", Python::ExpressionList), - ("raise_statement", Python::RaiseStatement), ("with_statement", Python::WithStatement), - ("subscript", Python::Subscript), - ("ellipsis", Python::Ellipsis), - ("_newline", Python::Newline), - ("await", Python::Await), + ("}", Python::RBRACE), + ("and", Python::And), + ("format_specifier_token1", Python::FormatSpecifierToken1), ("@", Python::AT), - ("try_statement_repeat1", Python::TryStatementRepeat1), - ("assert_statement", Python::AssertStatement), - ("format_expression", Python::FormatExpression), - ("<", Python::LT), + ("not", Python::Not), + ("exec_statement", Python::ExecStatement), + ("primary_expression", Python::PrimaryExpression), + ("dictionary_repeat1", Python::DictionaryRepeat1), + ("while_statement", Python::WhileStatement), + ("float", Python::Float), + ("dictionary", Python::Dictionary), + ("argument_list", Python::ArgumentList), + ("import_statement", Python::ImportStatement), + ("|", Python::PIPE), + ("nonlocal", Python::Nonlocal), + ("unary_operator", Python::UnaryOperator), + ("+=", Python::PLUSEQ), + ("parameters", Python::Parameters), + ("<<=", Python::LTLTEQ), + ("print_statement", Python::PrintStatement), + ("integer", Python::Integer), + ("**=", Python::STARSTAREQ), + (":=", Python::COLONEQ), + ("with_clause_repeat1", Python::WithClauseRepeat1), ("_indent", Python::Indent), + ("break", Python::Break), + ("set_comprehension", Python::SetComprehension), + ("lambda_parameters", Python::LambdaParameters), + ("argument_list_repeat1", Python::ArgumentListRepeat1), ("//=", Python::SLASHSLASHEQ), - ("tuple", Python::Tuple), - ( - "comparison_operator_repeat1", - Python::ComparisonOperatorRepeat1, - ), - ("parenthesized_expression", Python::ParenthesizedExpression), - ("_dedent", Python::Dedent), - (">>", Python::GTGT), - ("nonlocal_statement", Python::NonlocalStatement), - ("assert", Python::Assert), - ("exec", Python::Exec), - ("<>", Python::LTGT), + ("ERROR", Python::Error), + ("with_item", Python::WithItem), + ("^", Python::CARET), + ("&", Python::AMP), + ("_not_escape_sequence", Python::NotEscapeSequence), + ("/=", Python::SLASHEQ), + ("_newline", Python::Newline), + ("->", Python::DASHGT), + ("except_clause", Python::ExceptClause), + ("%", Python::PERCENT), + ("return", Python::Return), + ("conditional_expression", Python::ConditionalExpression), ( - "_simple_statements_repeat1", - Python::SimpleStatementsRepeat1, + "decorated_definition_repeat1", + Python::DecoratedDefinitionRepeat1, ), + ("call", Python::Call), + ("~", Python::TILDE), ("in", Python::In), - (">>=", Python::GTGTEQ), - (".", Python::DOT), + ("with_clause", Python::WithClause), + ("pattern", Python::Pattern), ("_patterns", Python::Patterns), - ("is", Python::Is), - ("wildcard_import", Python::WildcardImport), - ("end", Python::End), - ("interpolation", Python::Interpolation), + ("relative_import", Python::RelativeImport), + ("**", Python::STARSTAR), + (")", Python::RPAREN), + ("assert_statement", Python::AssertStatement), + ("tuple_pattern", Python::TuplePattern), ("+", Python::PLUS), - ]), + ("[", Python::LBRACK), + ("break_statement", Python::BreakStatement), + ("nonlocal_statement", Python::NonlocalStatement), + ], }; impl From<&str> for Python { diff --git a/src/languages/language_rust.rs b/src/languages/language_rust.rs index d63266915..e62aec4d1 100644 --- a/src/languages/language_rust.rs +++ b/src/languages/language_rust.rs @@ -323,384 +323,384 @@ pub enum Rust { #[allow(clippy::unreadable_literal)] static KEYS: phf::Map<&'static str, Rust> = ::phf::Map { - key: 3213172566270843353, - disps: ::phf::Slice::Static(&[ + key: 12913932095322966823, + disps: &[ + (0, 30), + (0, 4), + (0, 3), + (3, 90), + (0, 52), + (9, 286), + (1, 117), (0, 0), - (0, 36), - (2, 282), - (0, 107), - (0, 118), - (0, 2), - (1, 1), - (0, 12), - (0, 2), - (0, 45), - (1, 15), - (0, 11), - (1, 72), - (1, 140), + (4, 194), + (5, 77), + (0, 184), + (0, 263), + (0, 227), + (0, 14), + (0, 218), + (0, 44), + (0, 16), (0, 0), - (0, 2), - (2, 90), + (3, 198), + (0, 61), + (0, 154), + (0, 3), + (0, 8), + (13, 225), + (1, 0), (0, 4), - (0, 7), - (0, 207), - (0, 1), - (1, 25), - (0, 48), - (0, 208), - (0, 5), - (8, 105), - (1, 3), - (0, 29), - (0, 192), - (0, 2), - (4, 44), - (0, 10), - (9, 241), - (0, 10), - (1, 77), - (0, 72), - (1, 96), - (0, 33), - (1, 111), - (7, 192), - (1, 66), - (0, 7), - (0, 107), - (0, 277), - (4, 159), - (0, 112), - (1, 191), - (0, 285), (0, 0), - (8, 138), - (5, 49), - (8, 4), - (10, 164), - (2, 48), - (3, 207), - (0, 8), - (7, 222), - (0, 2), - (2, 267), - ]), - entries: ::phf::Slice::Static(&[ - ("break_expression", Rust::BreakExpression), - ("extern", Rust::Extern), - ("type_parameters", Rust::TypeParameters), - ("struct_item", Rust::StructItem), - ("union_item", Rust::UnionItem), - ("type_parameters_repeat1", Rust::TypeParametersRepeat1), - ("attribute_item", Rust::AttributeItem), - ("field_expression", Rust::FieldExpression), - ("where_clause", Rust::WhereClause), - ("let_declaration", Rust::LetDeclaration), - ("escape_sequence", Rust::EscapeSequence), - ("_pattern", Rust::Pattern), - ("for_lifetimes", Rust::ForLifetimes), - ("\\\"", Rust::DQUOTE), - ("enum_variant", Rust::EnumVariant), - ("string_literal_repeat1", Rust::StringLiteralRepeat1), - ("&", Rust::AMP), - ("where_predicate", Rust::WherePredicate), - ("token_binding_pattern", Rust::TokenBindingPattern), - ("token_tree_pattern_repeat1", Rust::TokenTreePatternRepeat1), - ("binary_expression", Rust::BinaryExpression), + (0, 51), + (8, 183), + (0, 9), + (0, 4), + (1, 169), + (0, 36), + (1, 120), + (1, 70), + (0, 28), + (12, 177), + (2, 1), + (1, 10), + (1, 27), + (0, 24), + (0, 14), + (0, 119), + (4, 9), + (0, 23), + (0, 242), + (9, 94), + (10, 135), + (0, 9), + (0, 80), + (15, 161), + (0, 237), + (0, 28), + (0, 1), + (0, 28), + (7, 113), + (0, 236), + (0, 264), + (0, 18), + ], + entries: &[ ("field_declaration_list", Rust::FieldDeclarationList), - ("tuple_expression", Rust::TupleExpression), - ("in", Rust::In), - ("higher_ranked_trait_bound", Rust::HigherRankedTraitBound), - ("path", Rust::Path), - ("block_comment", Rust::BlockComment), - ("-=", Rust::DASHEQ), - ("=>", Rust::EQGT), - ("range_pattern", Rust::RangePattern), - ("as", Rust::As), - ("use_wildcard", Rust::UseWildcard), - ("captured_pattern", Rust::CapturedPattern), - ("tuple_type_repeat1", Rust::TupleTypeRepeat1), - ("char_literal", Rust::CharLiteral), - ("expr", Rust::Expr), - ("...", Rust::DOTDOTDOT), - ("<<=", Rust::LTLTEQ), - ("&&", Rust::AMPAMP), + ("else_clause", Rust::ElseClause), + ("^", Rust::CARET), + ("loop_expression", Rust::LoopExpression), + ("struct_item", Rust::StructItem), + ("token_tree_pattern", Rust::TokenTreePattern), + ("function_modifiers_repeat1", Rust::FunctionModifiersRepeat1), + ("reference_type", Rust::ReferenceType), ( - "token_repetition_pattern_token1", - Rust::TokenRepetitionPatternToken1, + "ordered_field_declaration_list", + Rust::OrderedFieldDeclarationList, ), - ("->", Rust::DASHGT), - ("stmt", Rust::Stmt), - ("field_identifier", Rust::FieldIdentifier), - ("scoped_identifier", Rust::ScopedIdentifier), - ("macro_definition", Rust::MacroDefinition), - ("const_item", Rust::ConstItem), - ("array_expression", Rust::ArrayExpression), - ("remaining_field_pattern", Rust::RemainingFieldPattern), - ("*", Rust::STAR), + ("macro_rule", Rust::MacroRule), + ("break", Rust::Break), + ("_literal_pattern", Rust::LiteralPattern), + ("dyn", Rust::Dyn), ("async_block", Rust::AsyncBlock), - ("type_cast_expression", Rust::TypeCastExpression), + ("extern_modifier", Rust::ExternModifier), + ("where_predicate", Rust::WherePredicate), + ("tuple_expression_repeat1", Rust::TupleExpressionRepeat1), + ("mutable_specifier", Rust::MutableSpecifier), + ("default", Rust::Default), + ("_use_clause", Rust::UseClause), + ("<<", Rust::LTLT), + ("identifier", Rust::Identifier), + ("async", Rust::Async), + ("else", Rust::Else), + ("use_as_clause", Rust::UseAsClause), ("tuple_type", Rust::TupleType), - ("enum_variant_list", Rust::EnumVariantList), - ("use_declaration", Rust::UseDeclaration), - ("metavariable", Rust::Metavariable), - ("unary_expression", Rust::UnaryExpression), - ("trait_item", Rust::TraitItem), + ("bounded_type", Rust::BoundedType), + ("while_expression", Rust::WhileExpression), + ("or_pattern", Rust::OrPattern), + ("bracketed_type", Rust::BracketedType), + ("-=", Rust::DASHEQ), + ("extern_crate_declaration", Rust::ExternCrateDeclaration), + ("loop", Rust::Loop), + ("reference_pattern", Rust::ReferencePattern), + ("_statement", Rust::Statement), + ("block", Rust::Block), + ("index_expression", Rust::IndexExpression), + ("shorthand_field_identifier", Rust::ShorthandFieldIdentifier), + ("return", Rust::Return), + ("generic_function", Rust::GenericFunction), ("variadic_parameter", Rust::VariadicParameter), - ("static", Rust::Static), - ("range_expression", Rust::RangeExpression), - ("for_lifetimes_repeat1", Rust::ForLifetimesRepeat1), - ("trait_bounds_repeat1", Rust::TraitBoundsRepeat1), - ("match_block_repeat1", Rust::MatchBlockRepeat1), - ("match_block", Rust::MatchBlock), - ("boolean_literal", Rust::BooleanLiteral), - ("assignment_expression", Rust::AssignmentExpression), - ("fn", Rust::Fn), - ("mutable_specifier", Rust::MutableSpecifier), - ("match_expression", Rust::MatchExpression), - ("compound_assignment_expr", Rust::CompoundAssignmentExpr), - ("@", Rust::AT), - ("mod_item", Rust::ModItem), + ("function_type", Rust::FunctionType), + ("meta_item", Rust::MetaItem), + ("<<=", Rust::LTLTEQ), + ("enum_variant_list_repeat1", Rust::EnumVariantListRepeat1), + ("negative_literal", Rust::NegativeLiteral), + ("tuple_expression", Rust::TupleExpression), + ("impl_item", Rust::ImplItem), ("declaration_list_repeat1", Rust::DeclarationListRepeat1), - ("^=", Rust::CARETEQ), - ("..=", Rust::DOTDOTEQ), - ("enum", Rust::Enum), - ("await", Rust::Await), - ("vis", Rust::Vis), - ("while", Rust::While), - ("tuple_pattern", Rust::TuplePattern), - ("(", Rust::LPAREN), - ("loop_expression", Rust::LoopExpression), - ("self", Rust::Zelf), + ("_", Rust::UNDERSCORE), + ("escape_sequence", Rust::EscapeSequence), + ("impl", Rust::Impl), + ("function_signature_item", Rust::FunctionSignatureItem), + ("empty_type", Rust::EmptyType), ( "field_initializer_list_repeat1", Rust::FieldInitializerListRepeat1, ), - ("await_expression", Rust::AwaitExpression), - ("_non_special_token_token1", Rust::NonSpecialTokenToken1), - ("self_parameter", Rust::SelfParameter), - ("crate", Rust::Crate), - ("primitive_type", Rust::PrimitiveType), - ("struct_expression", Rust::StructExpression), - ("loop_label", Rust::LoopLabel), - ("bracketed_type", Rust::BracketedType), - ("enum_variant_list_repeat2", Rust::EnumVariantListRepeat2), - ("field_initializer_list", Rust::FieldInitializerList), - ("use_list_repeat1", Rust::UseListRepeat1), ("let", Rust::Let), - ("|", Rust::PIPE), - ("]", Rust::RBRACK), - (".", Rust::DOT), - ("associated_type", Rust::AssociatedType), - ("else", Rust::Else), - ("&=", Rust::AMPEQ), - ("constrained_type_parameter", Rust::ConstrainedTypeParameter), + ("mod", Rust::Mod), ("ty", Rust::Ty), - ( - "ordered_field_declaration_list", - Rust::OrderedFieldDeclarationList, - ), + ("match", Rust::Match), ("fragment_specifier", Rust::FragmentSpecifier), - ("array_expression_repeat1", Rust::ArrayExpressionRepeat1), - ("function_modifiers", Rust::FunctionModifiers), - ("qualified_type", Rust::QualifiedType), - ("async", Rust::Async), - ("#", Rust::HASH), - ("union", Rust::Union), - ("extern_modifier", Rust::ExternModifier), - ("macro_rules!", Rust::MacroRulesBANG), - ( - "shorthand_field_initializer", - Rust::ShorthandFieldInitializer, - ), - ("_string_content", Rust::StringContent), - ("[", Rust::LBRACK), - ("continue", Rust::Continue), - ("end", Rust::End), - ("parameters", Rust::Parameters), - ("field_pattern", Rust::FieldPattern), - ("const", Rust::Const), - ("struct_pattern", Rust::StructPattern), - ("try_expression", Rust::TryExpression), - ("inner_attribute_item", Rust::InnerAttributeItem), - ("false", Rust::False), - ("token_repetition", Rust::TokenRepetition), + ("array_type", Rust::ArrayType), + ("ERROR", Rust::Error), + ("captured_pattern", Rust::CapturedPattern), + ("tuple_struct_pattern", Rust::TupleStructPattern), + ("binary_expression", Rust::BinaryExpression), + ("..", Rust::DOTDOT), + ("stmt", Rust::Stmt), + ("break_expression", Rust::BreakExpression), + ("pub", Rust::Pub), ("<=", Rust::LTEQ), - ("_token_pattern", Rust::TokenPattern), - ("true", Rust::True), ("visibility_modifier", Rust::VisibilityModifier), - ("enum_variant_list_repeat1", Rust::EnumVariantListRepeat1), - ("token_tree", Rust::TokenTree), - (":", Rust::COLON), - ("string_literal", Rust::StringLiteral), - ("closure_parameters_repeat1", Rust::ClosureParametersRepeat1), - ("move", Rust::Move), - ("for", Rust::For), - ("where_clause_repeat1", Rust::WhereClauseRepeat1), - ("raw_string_literal", Rust::RawStringLiteral), - ("call_expression", Rust::CallExpression), - ("+", Rust::PLUS), - ("line_comment", Rust::LineComment), - ("meta", Rust::Meta), - ("_expression_statement", Rust::ExpressionStatement), - ("meta_arguments", Rust::MetaArguments), - ("token_tree_pattern", Rust::TokenTreePattern), - ("mut_pattern", Rust::MutPattern), - ("source_file", Rust::SourceFile), ("scoped_type_identifier", Rust::ScopedTypeIdentifier), - ("ident", Rust::Ident), - ("\'", Rust::SQUOTE), - ("if_expression", Rust::IfExpression), - ("ERROR", Rust::Error), - ("extern_crate_declaration", Rust::ExternCrateDeclaration), - ("arguments", Rust::Arguments), - ("dynamic_type", Rust::DynamicType), - ("$", Rust::DOLLAR), - ("field_declaration", Rust::FieldDeclaration), - ("struct", Rust::Struct), - ("ref", Rust::Ref), - ("closure_expression", Rust::ClosureExpression), - ("default", Rust::Default), - ("optional_type_parameter", Rust::OptionalTypeParameter), - ( - "ordered_field_declaration_list_repeat1", - Rust::OrderedFieldDeclarationListRepeat1, - ), + ("in", Rust::In), + ("crate", Rust::Crate), + ("!", Rust::BANG), ("abstract_type", Rust::AbstractType), - ("empty_statement", Rust::EmptyStatement), - ("use", Rust::Use), + ("trait", Rust::Trait), + ("enum", Rust::Enum), + ("tt", Rust::Tt), + ("super", Rust::Super), + ("vis", Rust::Vis), + ("as", Rust::As), + ("reference_expression", Rust::ReferenceExpression), ("_literal", Rust::Literal), - ("source_file_repeat1", Rust::SourceFileRepeat1), - ("_type", Rust::Type), - ("parameters_repeat1", Rust::ParametersRepeat1), - ("-", Rust::DASH), - ("_use_clause", Rust::UseClause), - ("lifetime", Rust::Lifetime), - ("reference_pattern", Rust::ReferencePattern), - ("struct_pattern_repeat1", Rust::StructPatternRepeat1), - ("loop", Rust::Loop), + ("match_arm", Rust::MatchArm), + ("static_item", Rust::StaticItem), + ("'", Rust::SQUOTE), + ("field_declaration", Rust::FieldDeclaration), ("base_field_initializer", Rust::BaseFieldInitializer), - ("index_expression", Rust::IndexExpression), - ("const_block", Rust::ConstBlock), - ("trait", Rust::Trait), - ("_statement", Rust::Statement), - ("==", Rust::EQEQ), - ("ref_pattern", Rust::RefPattern), - ("mod", Rust::Mod), - ("enum_item", Rust::EnumItem), - (">", Rust::GT), - ("bounded_type", Rust::BoundedType), - (">>=", Rust::GTGTEQ), - ("generic_function", Rust::GenericFunction), - ("removed_trait_bound", Rust::RemovedTraitBound), - ("!", Rust::BANG), - ("?", Rust::QMARK), - ("{", Rust::LBRACE), - ("meta_item", Rust::MetaItem), - ("if_let_expression", Rust::IfLetExpression), - ("return_expression", Rust::ReturnExpression), + (")", Rust::RPAREN), + ("continue", Rust::Continue), + ("parameters", Rust::Parameters), + ("let_declaration", Rust::LetDeclaration), + ("match_block", Rust::MatchBlock), + ("ident", Rust::Ident), + ("struct_pattern_repeat1", Rust::StructPatternRepeat1), + ("}", Rust::RBRACE), + ("const_item", Rust::ConstItem), + ("function_item", Rust::FunctionItem), + (">=", Rust::GTEQ), + ("while", Rust::While), + ("_type", Rust::Type), + (";", Rust::SEMI), + ("const_parameter", Rust::ConstParameter), + ("move", Rust::Move), + ("macro_definition_repeat1", Rust::MacroDefinitionRepeat1), + ("type_identifier", Rust::TypeIdentifier), + ("path", Rust::Path), + ("higher_ranked_trait_bound", Rust::HigherRankedTraitBound), + ("await", Rust::Await), + ("extern", Rust::Extern), + ("arguments_repeat1", Rust::ArgumentsRepeat1), + ("lifetime", Rust::Lifetime), + ("field_initializer", Rust::FieldInitializer), ( "generic_type_with_turbofish", Rust::GenericTypeWithTurbofish, ), - ("function_type", Rust::FunctionType), - (">>", Rust::GTGT), - ("..", Rust::DOTDOT), - ("pub", Rust::Pub), + ("remaining_field_pattern", Rust::RemainingFieldPattern), + ("foreign_mod_item", Rust::ForeignModItem), + ("struct_expression", Rust::StructExpression), + ("tuple_type_repeat1", Rust::TupleTypeRepeat1), + ("unit_type", Rust::UnitType), + ("qualified_type", Rust::QualifiedType), + ("ref_pattern", Rust::RefPattern), + ("for", Rust::For), + ("self_parameter", Rust::SelfParameter), + ("enum_item", Rust::EnumItem), + ("type_arguments", Rust::TypeArguments), + ("tuple_pattern", Rust::TuplePattern), + ("tuple_pattern_repeat1", Rust::TuplePatternRepeat1), + ("true", Rust::True), + ("removed_trait_bound", Rust::RemovedTraitBound), + ("meta", Rust::Meta), + ("self", Rust::Zelf), + ("trait_bounds", Rust::TraitBounds), + ("try_expression", Rust::TryExpression), ("=", Rust::EQ), - ("|=", Rust::PIPEEQ), - ("type_arguments_repeat1", Rust::TypeArgumentsRepeat1), - ("%=", Rust::PERCENTEQ), + ("while_let_expression", Rust::WhileLetExpression), + ("token_tree", Rust::TokenTree), + ("*=", Rust::STAREQ), + ("compound_assignment_expr", Rust::CompoundAssignmentExpr), ("||", Rust::PIPEPIPE), - (";", Rust::SEMI), - ("float_literal", Rust::FloatLiteral), - ("return", Rust::Return), - ("slice_pattern", Rust::SlicePattern), - ("scoped_use_list", Rust::ScopedUseList), - ("_expression", Rust::Expression), - (">=", Rust::GTEQ), - ("or_pattern", Rust::OrPattern), - (")", Rust::RPAREN), - ("type_binding", Rust::TypeBinding), - ("unit_type", Rust::UnitType), - ("identifier", Rust::Identifier), + (">>=", Rust::GTGTEQ), + ("type_arguments_repeat1", Rust::TypeArgumentsRepeat1), + ("return_expression", Rust::ReturnExpression), + ("closure_parameters", Rust::ClosureParameters), + ("static", Rust::Static), + ("enum_variant", Rust::EnumVariant), + ("mut_pattern", Rust::MutPattern), + ("macro_invocation", Rust::MacroInvocation), + ("unsafe", Rust::Unsafe), + ("macro_rules!", Rust::MacroRulesBANG), + ("generic_type", Rust::GenericType), + ("optional_type_parameter", Rust::OptionalTypeParameter), + ("_expression_statement", Rust::ExpressionStatement), + ("trait_item", Rust::TraitItem), + ("^=", Rust::CARETEQ), + ("parameter", Rust::Parameter), + (":", Rust::COLON), + ("==", Rust::EQEQ), + ("field_initializer_list", Rust::FieldInitializerList), + ("!=", Rust::BANGEQ), + ("where_clause_repeat1", Rust::WhereClauseRepeat1), + ("fn", Rust::Fn), + ("primitive_type", Rust::PrimitiveType), + ("for_lifetimes_repeat1", Rust::ForLifetimesRepeat1), + (".", Rust::DOT), + ("type_parameters_repeat1", Rust::TypeParametersRepeat1), + ( + "token_repetition_pattern_token1", + Rust::TokenRepetitionPatternToken1, + ), + ("&", Rust::AMP), ("type_item", Rust::TypeItem), - ("for_expression", Rust::ForExpression), - ("_literal_pattern", Rust::LiteralPattern), - ("token_repetition_pattern", Rust::TokenRepetitionPattern), - ("function_item", Rust::FunctionItem), - ("pointer_type", Rust::PointerType), - ("tt", Rust::Tt), - ("unsafe_block", Rust::UnsafeBlock), - ("else_clause", Rust::ElseClause), + ("\\\"", Rust::DQUOTE), + ("&=", Rust::AMPEQ), + ("const_block", Rust::ConstBlock), + ("_expression", Rust::Expression), + ("expr", Rust::Expr), + ("match_expression", Rust::MatchExpression), + ("const", Rust::Const), + ("&&", Rust::AMPAMP), + ("/=", Rust::SLASHEQ), + ("match_pattern", Rust::MatchPattern), + ("[", Rust::LBRACK), + ("+", Rust::PLUS), + ("<", Rust::LT), + ("where_clause", Rust::WhereClause), ("if", Rust::If), - ("reference_type", Rust::ReferenceType), - ("tuple_struct_pattern", Rust::TupleStructPattern), - ("}", Rust::RBRACE), + ("parenthesized_expression", Rust::ParenthesizedExpression), + ("integer_literal", Rust::IntegerLiteral), + ("trait_bounds_repeat1", Rust::TraitBoundsRepeat1), + ("pat", Rust::Pat), + ("pointer_type", Rust::PointerType), + ("boolean_literal", Rust::BooleanLiteral), + ("(", Rust::LPAREN), + ("struct", Rust::Struct), + ("|", Rust::PIPE), + ("macro_definition", Rust::MacroDefinition), + ("use_declaration", Rust::UseDeclaration), + ("block_comment", Rust::BlockComment), + ("item", Rust::Item), + ("float_literal", Rust::FloatLiteral), + ("char_literal", Rust::CharLiteral), + ("->", Rust::DASHGT), + ("*", Rust::STAR), + ("declaration_list", Rust::DeclarationList), + ("use_list", Rust::UseList), + ("use", Rust::Use), + ("field_pattern", Rust::FieldPattern), + ("?", Rust::QMARK), + (",", Rust::COMMA), + ("for_lifetimes", Rust::ForLifetimes), + ("closure_expression", Rust::ClosureExpression), + ("{", Rust::LBRACE), + ("dynamic_type", Rust::DynamicType), + ("if_expression", Rust::IfExpression), + ("range_pattern", Rust::RangePattern), + ("call_expression", Rust::CallExpression), + ("mod_item", Rust::ModItem), + ("where", Rust::Where), + ("range_expression", Rust::RangeExpression), + (">>", Rust::GTGT), + ("constrained_type_parameter", Rust::ConstrainedTypeParameter), + ("type_binding", Rust::TypeBinding), + ("meta_arguments", Rust::MetaArguments), + ("type_parameters", Rust::TypeParameters), + ("continue_expression", Rust::ContinueExpression), + ("%", Rust::PERCENT), + ("unit_expression", Rust::UnitExpression), + ("enum_variant_list_repeat2", Rust::EnumVariantListRepeat2), + ("/", Rust::SLASH), + ("scoped_identifier", Rust::ScopedIdentifier), + ("array_expression", Rust::ArrayExpression), + ("token_binding_pattern", Rust::TokenBindingPattern), + ("]", Rust::RBRACK), + ("field_expression", Rust::FieldExpression), + ("parameters_repeat1", Rust::ParametersRepeat1), + ("union_item", Rust::UnionItem), + ("source_file", Rust::SourceFile), + ("::", Rust::COLONCOLON), + ("array_expression_repeat1", Rust::ArrayExpressionRepeat1), + (">", Rust::GT), + ("@", Rust::AT), ( "field_declaration_list_repeat1", Rust::FieldDeclarationListRepeat1, ), - ("/=", Rust::SLASHEQ), - ("*=", Rust::STAREQ), - ("%", Rust::PERCENT), - ("super", Rust::Super), - ("shorthand_field_identifier", Rust::ShorthandFieldIdentifier), - ("where", Rust::Where), - ("impl_item", Rust::ImplItem), - ("function_signature_item", Rust::FunctionSignatureItem), - ("/", Rust::SLASH), - ("macro_rule", Rust::MacroRule), - ("declaration_list", Rust::DeclarationList), - ("dyn", Rust::Dyn), - ("reference_expression", Rust::ReferenceExpression), - ("closure_parameters", Rust::ClosureParameters), - ("function_modifiers_repeat1", Rust::FunctionModifiersRepeat1), - ("token_tree_repeat1", Rust::TokenTreeRepeat1), - ("macro_definition_repeat1", Rust::MacroDefinitionRepeat1), - ("parameter", Rust::Parameter), - ("array_type", Rust::ArrayType), - ("impl", Rust::Impl), - ("_", Rust::UNDERSCORE), - ("while_let_expression", Rust::WhileLetExpression), - ("tuple_expression_repeat1", Rust::TupleExpressionRepeat1), + ("_string_content", Rust::StringContent), + ("=>", Rust::EQGT), + ("associated_type", Rust::AssociatedType), + ("%=", Rust::PERCENTEQ), + ("string_literal_repeat1", Rust::StringLiteralRepeat1), + ("token_repetition_pattern", Rust::TokenRepetitionPattern), + ("use_list_repeat1", Rust::UseListRepeat1), + ("#", Rust::HASH), + ("token_repetition", Rust::TokenRepetition), + ("_pattern", Rust::Pattern), + ("$", Rust::DOLLAR), + ("-", Rust::DASH), + ("source_file_repeat1", Rust::SourceFileRepeat1), + ("scoped_use_list", Rust::ScopedUseList), + ("function_modifiers", Rust::FunctionModifiers), + ("loop_label", Rust::LoopLabel), + ("closure_parameters_repeat1", Rust::ClosureParametersRepeat1), + ("empty_statement", Rust::EmptyStatement), ("meta_arguments_repeat1", Rust::MetaArgumentsRepeat1), - ("foreign_mod_item", Rust::ForeignModItem), - ("static_item", Rust::StaticItem), - ("!=", Rust::BANGEQ), - ("empty_type", Rust::EmptyType), - ("tuple_pattern_repeat1", Rust::TuplePatternRepeat1), - ("break", Rust::Break), + ("ref", Rust::Ref), + ("slice_pattern", Rust::SlicePattern), + ("union", Rust::Union), + ("type_cast_expression", Rust::TypeCastExpression), ("+=", Rust::PLUSEQ), - ("type_identifier", Rust::TypeIdentifier), - ("match", Rust::Match), - ("pat", Rust::Pat), - ("continue_expression", Rust::ContinueExpression), - ("block", Rust::Block), - ("unsafe", Rust::Unsafe), - ("::", Rust::COLONCOLON), - ("field_initializer", Rust::FieldInitializer), - ("parenthesized_expression", Rust::ParenthesizedExpression), - ("match_arm", Rust::MatchArm), - ("const_parameter", Rust::ConstParameter), - ("generic_type", Rust::GenericType), - ("<", Rust::LT), - (",", Rust::COMMA), - ("macro_invocation", Rust::MacroInvocation), - ("match_pattern", Rust::MatchPattern), - ("unit_expression", Rust::UnitExpression), - ("use_list", Rust::UseList), - ("while_expression", Rust::WhileExpression), - ("arguments_repeat1", Rust::ArgumentsRepeat1), - ("integer_literal", Rust::IntegerLiteral), - ("use_as_clause", Rust::UseAsClause), - ("^", Rust::CARET), - ("negative_literal", Rust::NegativeLiteral), - ("type_arguments", Rust::TypeArguments), - ("item", Rust::Item), - ("trait_bounds", Rust::TraitBounds), - ("<<", Rust::LTLT), - ]), + ("match_block_repeat1", Rust::MatchBlockRepeat1), + ("attribute_item", Rust::AttributeItem), + ("string_literal", Rust::StringLiteral), + ("token_tree_pattern_repeat1", Rust::TokenTreePatternRepeat1), + ("raw_string_literal", Rust::RawStringLiteral), + ("use_wildcard", Rust::UseWildcard), + ("await_expression", Rust::AwaitExpression), + ("field_identifier", Rust::FieldIdentifier), + ("end", Rust::End), + ("token_tree_repeat1", Rust::TokenTreeRepeat1), + ("arguments", Rust::Arguments), + ("struct_pattern", Rust::StructPattern), + ("enum_variant_list", Rust::EnumVariantList), + ("line_comment", Rust::LineComment), + ("|=", Rust::PIPEEQ), + ("assignment_expression", Rust::AssignmentExpression), + ( + "ordered_field_declaration_list_repeat1", + Rust::OrderedFieldDeclarationListRepeat1, + ), + ("unsafe_block", Rust::UnsafeBlock), + ("false", Rust::False), + ("metavariable", Rust::Metavariable), + ("..=", Rust::DOTDOTEQ), + ("inner_attribute_item", Rust::InnerAttributeItem), + ( + "shorthand_field_initializer", + Rust::ShorthandFieldInitializer, + ), + ("if_let_expression", Rust::IfLetExpression), + ("_non_special_token_token1", Rust::NonSpecialTokenToken1), + ("...", Rust::DOTDOTDOT), + ("unary_expression", Rust::UnaryExpression), + ("_token_pattern", Rust::TokenPattern), + ("for_expression", Rust::ForExpression), + ], }; impl From<&str> for Rust { diff --git a/src/languages/language_tsx.rs b/src/languages/language_tsx.rs index 1b73c0613..8f14b5656 100644 --- a/src/languages/language_tsx.rs +++ b/src/languages/language_tsx.rs @@ -357,433 +357,433 @@ pub enum Tsx { #[allow(clippy::unreadable_literal)] static KEYS: phf::Map<&'static str, Tsx> = ::phf::Map { - key: 3213172566270843353, - disps: ::phf::Slice::Static(&[ - (0, 2), - (3, 21), + key: 12913932095322966823, + disps: &[ + (4, 116), (0, 0), - (1, 61), - (0, 328), - (1, 44), (0, 1), - (1, 309), + (0, 181), + (1, 51), + (0, 42), (0, 9), - (0, 18), - (0, 277), + (3, 276), + (3, 38), + (0, 2), + (0, 6), + (2, 138), + (2, 333), + (0, 137), + (0, 2), + (0, 244), + (0, 39), + (0, 14), + (6, 122), (0, 3), - (0, 24), - (0, 0), - (0, 0), + (1, 30), + (1, 118), + (0, 201), + (3, 162), (0, 21), - (6, 13), - (12, 10), + (0, 5), (0, 0), - (0, 11), - (0, 32), - (0, 14), - (0, 59), - (1, 65), - (5, 173), - (0, 52), - (0, 224), - (0, 2), - (0, 34), - (1, 11), - (0, 53), (0, 0), - (0, 53), - (62, 248), + (0, 12), + (4, 176), + (0, 67), + (0, 40), + (4, 226), (0, 19), - (0, 8), - (0, 78), + (2, 77), + (6, 158), + (0, 6), + (0, 24), + (0, 4), + (12, 171), + (0, 130), + (0, 45), + (0, 305), + (0, 17), (0, 0), - (0, 115), - (1, 14), - (0, 3), - (0, 76), - (5, 138), - (0, 73), - (0, 85), - (4, 250), + (6, 49), + (2, 33), + (2, 254), + (3, 206), + (0, 100), + (78, 144), + (0, 93), + (9, 142), + (0, 140), + (5, 209), (0, 0), - (0, 76), - (1, 30), - (0, 297), - (8, 52), - (0, 8), - (17, 329), - (4, 157), - (5, 15), + (0, 308), + (7, 202), + (0, 72), + (0, 53), (0, 1), - (0, 10), - (3, 225), - (0, 9), - (13, 134), - (2, 148), - (1, 20), - (10, 49), - (17, 165), - (0, 96), - (1, 3), - (4, 174), - ]), - entries: ::phf::Slice::Static(&[ - ("try_statement", Tsx::TryStatement), - ("non_null_expression", Tsx::NonNullExpression), - ("export_clause_repeat1", Tsx::ExportClauseRepeat1), - ("^", Tsx::CARET), - ("%=", Tsx::PERCENTEQ), - ("type_arguments", Tsx::TypeArguments), - ("declare", Tsx::Declare), - ("expression", Tsx::Expression), - ("as", Tsx::As), - ("enum_assignment", Tsx::EnumAssignment), - ("type_alias_declaration", Tsx::TypeAliasDeclaration), - ("flow_maybe_type", Tsx::FlowMaybeType), - ("=", Tsx::EQ), - ("class_heritage", Tsx::ClassHeritage), - ("keyof", Tsx::Keyof), - ("class_body", Tsx::ClassBody), - ("class_declaration", Tsx::ClassDeclaration), - ("regex_pattern", Tsx::RegexPattern), - ("assignment_pattern", Tsx::AssignmentPattern), - ("<<", Tsx::LTLT), - ("binary_expression", Tsx::BinaryExpression), - ("true", Tsx::True), - ("template_substitution", Tsx::TemplateSubstitution), - ("jsx_closing_element", Tsx::JsxClosingElement), - ("for_in_statement", Tsx::ForInStatement), - ("{|", Tsx::LBRACEPIPE), - ("statement_identifier", Tsx::StatementIdentifier), - ("await", Tsx::Await), - ("abstract", Tsx::Abstract), - ("formal_parameters_repeat1", Tsx::FormalParametersRepeat1), - ("async", Tsx::Async), - ("_parameter_name", Tsx::ParameterName), - ("default_type", Tsx::DefaultType), - ("string_token2", Tsx::StringToken2), - ("throw_statement", Tsx::ThrowStatement), - ("~", Tsx::TILDE), - ("require", Tsx::Require), - ("continue", Tsx::Continue), - ("<", Tsx::LT), - ("void", Tsx::Void), - ("any", Tsx::Any), - ("program", Tsx::Program), - ("&=", Tsx::AMPEQ), - ("jsx_element_repeat1", Tsx::JsxElementRepeat1), + (2, 9), + (0, 6), + (0, 88), + (0, 18), + (45, 110), + (57, 231), + ], + entries: &[ + ("--", Tsx::DASHDASH), ( - "augmented_assignment_expression", - Tsx::AugmentedAssignmentExpression, + "generator_function_declaration", + Tsx::GeneratorFunctionDeclaration, ), - ("enum_body_repeat1", Tsx::EnumBodyRepeat1), - ("`", Tsx::BQUOTE), - ("string", Tsx::String), - (")", Tsx::RPAREN), - ("lookup_type", Tsx::LookupType), - ("*=", Tsx::STAREQ), - ("member_expression", Tsx::MemberExpression), - ("import_specifier", Tsx::ImportSpecifier), - ("static", Tsx::Static), - ("rest_pattern", Tsx::RestPattern), - ("program_repeat1", Tsx::ProgramRepeat1), - ("function_signature", Tsx::FunctionSignature), - ("construct_signature", Tsx::ConstructSignature), - ("internal_module", Tsx::InternalModule), - ("index_signature", Tsx::IndexSignature), - ("\'", Tsx::SQUOTE), - ("existential_type", Tsx::ExistentialType), - ("method_signature", Tsx::MethodSignature), - ("object_pattern", Tsx::ObjectPattern), - ("readonly_type", Tsx::ReadonlyType), + ("string_token1", Tsx::StringToken1), + (">>", Tsx::GTGT), + ("this", Tsx::This), + ("_primary_type", Tsx::PrimaryType), + ("_tuple_type_member", Tsx::TupleTypeMember), + ("meta_property", Tsx::MetaProperty), + ("protected", Tsx::Protected), + ("formal_parameters_repeat1", Tsx::FormalParametersRepeat1), + ("computed_property_name", Tsx::ComputedPropertyName), + ("_type", Tsx::Type), + ("hash_bang_line", Tsx::HashBangLine), + ("global", Tsx::Global), + ("statement_identifier", Tsx::StatementIdentifier), + ("+", Tsx::PLUS), ( "shorthand_property_identifier", Tsx::ShorthandPropertyIdentifier, ), - ("/=", Tsx::SLASHEQ), - ("[", Tsx::LBRACK), - ("predefined_type", Tsx::PredefinedType), - ("]", Tsx::RBRACK), - ("symbol", Tsx::Symbol), - ("pair", Tsx::Pair), - ("jsx_fragment", Tsx::JsxFragment), - ("await_expression", Tsx::AwaitExpression), - ("implements_clause_repeat1", Tsx::ImplementsClauseRepeat1), - ("method_definition", Tsx::MethodDefinition), - ("string_token1", Tsx::StringToken1), - ("jsx_text", Tsx::JsxText), - ("throw", Tsx::Throw), - ("expression_statement", Tsx::ExpressionStatement), - ("&&=", Tsx::AMPAMPEQ), - ("_template_chars", Tsx::TemplateChars), - ("|", Tsx::PIPE), - ("private", Tsx::Private), - ("generator_function", Tsx::GeneratorFunction), - ("-=", Tsx::DASHEQ), - ("public", Tsx::Public), - ("do", Tsx::Do), - ("export_statement_repeat1", Tsx::ExportStatementRepeat1), - ("string_repeat2", Tsx::StringRepeat2), - ("implements_clause", Tsx::ImplementsClause), - ("omitting_type_annotation", Tsx::OmittingTypeAnnotation), - ("primary_expression", Tsx::PrimaryExpression), - ("switch_body_repeat1", Tsx::SwitchBodyRepeat1), + ("array", Tsx::Array), + ("end", Tsx::End), + ("abstract_class_declaration", Tsx::AbstractClassDeclaration), + ("array_repeat1", Tsx::ArrayRepeat1), + ("declaration", Tsx::Declaration), + (">=", Tsx::GTEQ), + ("ternary_expression", Tsx::TernaryExpression), + ("escape_sequence", Tsx::EscapeSequence), ("||", Tsx::PIPEPIPE), - ("var", Tsx::Var), + ("-?:", Tsx::DASHQMARKCOLON), + ("rest_pattern", Tsx::RestPattern), + ("nested_identifier", Tsx::NestedIdentifier), + ("export_clause_repeat1", Tsx::ExportClauseRepeat1), + ("jsx_closing_element", Tsx::JsxClosingElement), + ("named_imports_repeat1", Tsx::NamedImportsRepeat1), + ("!=", Tsx::BANGEQ), + ("function_declaration", Tsx::FunctionDeclaration), + ("construct_signature", Tsx::ConstructSignature), ("export", Tsx::Export), - ("_for_header", Tsx::ForHeader), - ("finally_clause", Tsx::FinallyClause), - ("template_string", Tsx::TemplateString), - (">>>=", Tsx::GTGTGTEQ), - ("yield_expression", Tsx::YieldExpression), - ("*", Tsx::STAR), - ("_automatic_semicolon", Tsx::AutomaticSemicolon), - ("formal_parameters", Tsx::FormalParameters), - (">>=", Tsx::GTGTEQ), - ("${", Tsx::DOLLARLBRACE), - ("infer_type", Tsx::InferType), - ("switch", Tsx::Switch), - ("<<=", Tsx::LTLTEQ), - ("-", Tsx::DASH), - ("^=", Tsx::CARETEQ), ("switch_case", Tsx::SwitchCase), - ("/", Tsx::SLASH), - ("identifier", Tsx::Identifier), - ("empty_statement", Tsx::EmptyStatement), - ("|=", Tsx::PIPEEQ), - ("tuple_type", Tsx::TupleType), - ("else", Tsx::Else), - ("_from_clause", Tsx::FromClause), + ("spread_element", Tsx::SpreadElement), + ("'", Tsx::SQUOTE), + ("**=", Tsx::STARSTAREQ), + ("async", Tsx::Async), + ("pattern", Tsx::Pattern), + ("debugger_statement", Tsx::DebuggerStatement), + ("&&=", Tsx::AMPAMPEQ), + ("private", Tsx::Private), + ("**", Tsx::STARSTAR), + ("break", Tsx::Break), + ("non_null_expression", Tsx::NonNullExpression), + ("template_string_repeat1", Tsx::TemplateStringRepeat1), + ("infer_type", Tsx::InferType), + ("??=", Tsx::QMARKQMARKEQ), + ("enum", Tsx::Enum), + ("property_signature", Tsx::PropertySignature), + ("function_signature", Tsx::FunctionSignature), + ("_initializer", Tsx::Initializer), + ("assignment_pattern", Tsx::AssignmentPattern), + ("sequence_expression", Tsx::SequenceExpression), ("delete", Tsx::Delete), - ("object_assignment_pattern", Tsx::ObjectAssignmentPattern), - ("interface", Tsx::Interface), - ("parenthesized_expression", Tsx::ParenthesizedExpression), - ("super", Tsx::Super), - ("false", Tsx::False), - ("new_expression", Tsx::NewExpression), - ("export_statement", Tsx::ExportStatement), - ("set", Tsx::Set), - ("class_body_repeat1", Tsx::ClassBodyRepeat1), - (">", Tsx::GT), - ("while_statement", Tsx::WhileStatement), - ("(", Tsx::LPAREN), - ("ternary_expression", Tsx::TernaryExpression), - ("_primary_type", Tsx::PrimaryType), - ("class", Tsx::Class), - ("type_parameters_repeat1", Tsx::TypeParametersRepeat1), + ("jsx_text", Tsx::JsxText), + ("catch_clause", Tsx::CatchClause), + ("continue", Tsx::Continue), + ("variable_declarator", Tsx::VariableDeclarator), + ("named_imports", Tsx::NamedImports), + ("property_identifier", Tsx::PropertyIdentifier), + ("program", Tsx::Program), + ("&", Tsx::AMP), + ("import_specifier", Tsx::ImportSpecifier), + ("object", Tsx::Object), + ("import", Tsx::Import), + ("symbol", Tsx::Symbol), + ("if_statement", Tsx::IfStatement), + ("type_predicate_annotation", Tsx::TypePredicateAnnotation), + ("+=", Tsx::PLUSEQ), + ("number", Tsx::Number), + ("jsx_expression", Tsx::JsxExpression), + ("implements_clause_repeat1", Tsx::ImplementsClauseRepeat1), + ("type_predicate", Tsx::TypePredicate), + ("return", Tsx::Return), + ("switch_body_repeat1", Tsx::SwitchBodyRepeat1), + ("accessibility_modifier", Tsx::AccessibilityModifier), ("switch_default", Tsx::SwitchDefault), - ("readonly", Tsx::Readonly), - ("enum_declaration", Tsx::EnumDeclaration), - ("is", Tsx::Is), - ("import_statement", Tsx::ImportStatement), - ("=>", Tsx::EQGT), - ("_formal_parameter", Tsx::FormalParameter), - ("@", Tsx::AT), - ("extends_clause", Tsx::ExtendsClause), - ("named_imports_repeat1", Tsx::NamedImportsRepeat1), - ("!=", Tsx::BANGEQ), - ("optional_type", Tsx::OptionalType), + ("super", Tsx::Super), + ("abstract_method_signature", Tsx::AbstractMethodSignature), + ("existential_type", Tsx::ExistentialType), + ("in", Tsx::In), + ("case", Tsx::Case), ("jsx_attribute", Tsx::JsxAttribute), - ("jsx_expression", Tsx::JsxExpression), - ("enum", Tsx::Enum), - ("arrow_function", Tsx::ArrowFunction), - ("subscript_expression", Tsx::SubscriptExpression), - ("nested_type_identifier", Tsx::NestedTypeIdentifier), - ("with_statement", Tsx::WithStatement), - ("function_type", Tsx::FunctionType), - ("parenthesized_type", Tsx::ParenthesizedType), - ("ERROR", Tsx::Error), - ("comment", Tsx::Comment), - ("rest_type", Tsx::RestType), ("==", Tsx::EQEQ), - ("===", Tsx::EQEQEQ), - ("++", Tsx::PLUSPLUS), - ("pattern", Tsx::Pattern), - ("object_pattern_repeat1", Tsx::ObjectPatternRepeat1), - ("?.", Tsx::QMARKDOT), - ("nested_identifier", Tsx::NestedIdentifier), - ("computed_property_name", Tsx::ComputedPropertyName), - ("update_expression", Tsx::UpdateExpression), - ("+=", Tsx::PLUSEQ), - ("for_statement", Tsx::ForStatement), - ("break", Tsx::Break), - ("literal_type", Tsx::LiteralType), - (">=", Tsx::GTEQ), - ( - "variable_declaration_repeat1", - Tsx::VariableDeclarationRepeat1, - ), - ("import_alias", Tsx::ImportAlias), - ("decorator", Tsx::Decorator), - ("const", Tsx::Const), - ("unary_expression", Tsx::UnaryExpression), + ("set", Tsx::Set), + ("!==", Tsx::BANGEQEQ), + ("regex_pattern", Tsx::RegexPattern), + ("switch", Tsx::Switch), + ("{|", Tsx::LBRACEPIPE), + ("enum_declaration", Tsx::EnumDeclaration), + ("public", Tsx::Public), + ("default_type", Tsx::DefaultType), + ("finally", Tsx::Finally), + ("implements_clause", Tsx::ImplementsClause), + ("target", Tsx::Target), + ("statement_block", Tsx::StatementBlock), + ("readonly_type", Tsx::ReadonlyType), + ("import_require_clause", Tsx::ImportRequireClause), + ("?", Tsx::QMARK), + ("parenthesized_expression", Tsx::ParenthesizedExpression), + (">", Tsx::GT), + ("_parameter_name", Tsx::ParameterName), + ("<", Tsx::LT), + ("=", Tsx::EQ), + ("type_alias_declaration", Tsx::TypeAliasDeclaration), ("_destructuring_pattern", Tsx::DestructuringPattern), - ("this", Tsx::This), - ("?:", Tsx::QMARKCOLON), - ("for", Tsx::For), - ("abstract_method_signature", Tsx::AbstractMethodSignature), - ("while", Tsx::While), - ("with", Tsx::With), - ("public_field_definition", Tsx::PublicFieldDefinition), - ("return_statement", Tsx::ReturnStatement), - ("_tuple_type_member", Tsx::TupleTypeMember), - ("--", Tsx::DASHDASH), - ("string_repeat1", Tsx::StringRepeat1), - ("regex", Tsx::Regex), + ("template_string", Tsx::TemplateString), + ("...", Tsx::DOTDOTDOT), + ("jsx_opening_element", Tsx::JsxOpeningElement), + ("predefined_type", Tsx::PredefinedType), + ("jsx_fragment", Tsx::JsxFragment), + (":", Tsx::COLON), + ("void", Tsx::Void), + ("_formal_parameter", Tsx::FormalParameter), + ("array_type", Tsx::ArrayType), + ("tuple_type_repeat1", Tsx::TupleTypeRepeat1), + ("string_repeat2", Tsx::StringRepeat2), + (">>=", Tsx::GTGTEQ), + ("_from_clause", Tsx::FromClause), + ("type_parameter", Tsx::TypeParameter), + ("keyof", Tsx::Keyof), + ("generic_type", Tsx::GenericType), + ("&=", Tsx::AMPEQ), + ("|}", Tsx::PIPERBRACE), + ("null", Tsx::Null), + ("export_specifier", Tsx::ExportSpecifier), + ("program_repeat1", Tsx::ProgramRepeat1), ("call_expression", Tsx::CallExpression), - ("escape_sequence", Tsx::EscapeSequence), - ("typeof", Tsx::Typeof), - ("lexical_declaration", Tsx::LexicalDeclaration), - ("conditional_type", Tsx::ConditionalType), + ("_call_signature", Tsx::CallSignature), + ("arguments", Tsx::Arguments), + ("import_clause", Tsx::ImportClause), ( - "_function_signature_automatic_semicolon", - Tsx::FunctionSignatureAutomaticSemicolon, + "shorthand_property_identifier_pattern", + Tsx::ShorthandPropertyIdentifierPattern, ), - ("switch_statement", Tsx::SwitchStatement), - ("if_statement", Tsx::IfStatement), - ("import_clause", Tsx::ImportClause), - ("opting_type_annotation", Tsx::OptingTypeAnnotation), - ("function_declaration", Tsx::FunctionDeclaration), - ("as_expression", Tsx::AsExpression), - ("function", Tsx::Function), - ("infer", Tsx::Infer), - ("constructor_type", Tsx::ConstructorType), - ("array_type", Tsx::ArrayType), - ("asserts", Tsx::Asserts), ("union_type", Tsx::UnionType), - ("|}", Tsx::PIPERBRACE), - ("_augmented_assignment_lhs", Tsx::AugmentedAssignmentLhs), - ("jsx_namespace_name", Tsx::JsxNamespaceName), - ("mapped_type_clause", Tsx::MappedTypeClause), - ("finally", Tsx::Finally), - (":", Tsx::COLON), - ("pair_pattern", Tsx::PairPattern), - ("of", Tsx::Of), - ("sequence_expression", Tsx::SequenceExpression), - ("_type", Tsx::Type), - ("declaration", Tsx::Declaration), - ("object_type_repeat1", Tsx::ObjectTypeRepeat1), - ("!==", Tsx::BANGEQEQ), - ("statement_block", Tsx::StatementBlock), - ("??=", Tsx::QMARKQMARKEQ), - ("variable_declarator", Tsx::VariableDeclarator), - ("continue_statement", Tsx::ContinueStatement), - ("jsx_self_closing_element", Tsx::JsxSelfClosingElement), - ("\\\"", Tsx::DQUOTE), - ("debugger", Tsx::Debugger), + ("object_repeat1", Tsx::ObjectRepeat1), + ("/=", Tsx::SLASHEQ), ("do_statement", Tsx::DoStatement), - ("catch_clause", Tsx::CatchClause), - ("default", Tsx::Default), - ("generic_type", Tsx::GenericType), - ("break_statement", Tsx::BreakStatement), - ("array_pattern_repeat1", Tsx::ArrayPatternRepeat1), - ("hash_bang_line", Tsx::HashBangLine), - ("in", Tsx::In), - ("object", Tsx::Object), - ("interface_declaration", Tsx::InterfaceDeclaration), - ("_property_name", Tsx::PropertyName), + ("with", Tsx::With), + ("export_statement_repeat1", Tsx::ExportStatementRepeat1), ("let", Tsx::Let), - ("namespace", Tsx::Namespace), - ("arguments", Tsx::Arguments), - ("get", Tsx::Get), - ("global", Tsx::Global), - ( - "generator_function_declaration", - Tsx::GeneratorFunctionDeclaration, - ), - ("else_clause", Tsx::ElseClause), - ("accessibility_modifier", Tsx::AccessibilityModifier), - ("type_predicate", Tsx::TypePredicate), - ("module", Tsx::Module), - ("spread_element", Tsx::SpreadElement), - ("abstract_class_declaration", Tsx::AbstractClassDeclaration), - ("from", Tsx::From), - ("number", Tsx::Number), - ("-?:", Tsx::DASHQMARKCOLON), - ("&", Tsx::AMP), - ("target", Tsx::Target), - ("||=", Tsx::PIPEPIPEEQ), + ("constructor_type", Tsx::ConstructorType), + ("type_parameters", Tsx::TypeParameters), + ("member_expression", Tsx::MemberExpression), + ("undefined", Tsx::Undefined), ("extends_clause_repeat1", Tsx::ExtendsClauseRepeat1), - ("import", Tsx::Import), - ("_initializer", Tsx::Initializer), - ("property_identifier", Tsx::PropertyIdentifier), - ("debugger_statement", Tsx::DebuggerStatement), - ("required_parameter", Tsx::RequiredParameter), - ("<=", Tsx::LTEQ), - ("instanceof", Tsx::Instanceof), - ("protected", Tsx::Protected), - ("index_type_query", Tsx::IndexTypeQuery), + ("pair_pattern", Tsx::PairPattern), + ("type_identifier", Tsx::TypeIdentifier), + ("regex_flags", Tsx::RegexFlags), + ("expression", Tsx::Expression), + ("&&", Tsx::AMPAMP), + ("module", Tsx::Module), + ("optional_parameter", Tsx::OptionalParameter), + ("-", Tsx::DASH), + ("debugger", Tsx::Debugger), + ("await", Tsx::Await), ("catch", Tsx::Catch), - ("namespace_import", Tsx::NamespaceImport), - ("undefined", Tsx::Undefined), + ("is", Tsx::Is), + ("labeled_statement", Tsx::LabeledStatement), ("%", Tsx::PERCENT), + ("regex", Tsx::Regex), + ("empty_statement", Tsx::EmptyStatement), + ("array_pattern", Tsx::ArrayPattern), + ("instanceof", Tsx::Instanceof), + ("enum_body_repeat1", Tsx::EnumBodyRepeat1), + ("comment", Tsx::Comment), + ("?.", Tsx::QMARKDOT), ( - "shorthand_property_identifier_pattern", - Tsx::ShorthandPropertyIdentifierPattern, + "variable_declaration_repeat1", + Tsx::VariableDeclarationRepeat1, ), - ("array_repeat1", Tsx::ArrayRepeat1), - ("meta_property", Tsx::MetaProperty), - (">>>", Tsx::GTGTGT), - ("implements", Tsx::Implements), - ("...", Tsx::DOTDOTDOT), - ("**=", Tsx::STARSTAREQ), - ("named_imports", Tsx::NamedImports), + ("await_expression", Tsx::AwaitExpression), + ("~", Tsx::TILDE), + ("|=", Tsx::PIPEEQ), + ("continue_statement", Tsx::ContinueStatement), + ("export_statement", Tsx::ExportStatement), + ("^", Tsx::CARET), + ("interface_declaration", Tsx::InterfaceDeclaration), + ("array_pattern_repeat1", Tsx::ArrayPatternRepeat1), + ("asserts", Tsx::Asserts), + ("new_expression", Tsx::NewExpression), + ("as", Tsx::As), + ("false", Tsx::False), + ("===", Tsx::EQEQEQ), + ("index_type_query", Tsx::IndexTypeQuery), + ("nested_type_identifier", Tsx::NestedTypeIdentifier), + ("@", Tsx::AT), + ("=>", Tsx::EQGT), + ("interface", Tsx::Interface), + ("require", Tsx::Require), + ("]", Tsx::RBRACK), + ("flow_maybe_type", Tsx::FlowMaybeType), + ("-=", Tsx::DASHEQ), + ("namespace", Tsx::Namespace), + ("throw", Tsx::Throw), + ("return_statement", Tsx::ReturnStatement), + ("type_arguments", Tsx::TypeArguments), + ("[", Tsx::LBRACK), + ("conditional_type", Tsx::ConditionalType), + ("class_heritage", Tsx::ClassHeritage), + ("optional_type", Tsx::OptionalType), + ("internal_module", Tsx::InternalModule), + ("class_body_repeat1", Tsx::ClassBodyRepeat1), ("??", Tsx::QMARKQMARK), - ("_call_signature", Tsx::CallSignature), ("export_clause", Tsx::ExportClause), - ("object_type", Tsx::ObjectType), - (",", Tsx::COMMA), + ("/", Tsx::SLASH), + ("${", Tsx::DOLLARLBRACE), + ("if", Tsx::If), + ("namespace_import", Tsx::NamespaceImport), + ("yield_expression", Tsx::YieldExpression), + ("as_expression", Tsx::AsExpression), + ("assignment_expression", Tsx::AssignmentExpression), + ("get", Tsx::Get), + ("method_definition", Tsx::MethodDefinition), + ("required_parameter", Tsx::RequiredParameter), + ("new", Tsx::New), ("type_annotation", Tsx::TypeAnnotation), - ("switch_body", Tsx::SwitchBody), - ("ambient_declaration", Tsx::AmbientDeclaration), - ("variable_declaration", Tsx::VariableDeclaration), - ("regex_flags", Tsx::RegexFlags), + ("binary_expression", Tsx::BinaryExpression), + ("^=", Tsx::CARETEQ), + ("expression_statement", Tsx::ExpressionStatement), + ("_automatic_semicolon", Tsx::AutomaticSemicolon), + ("public_field_definition", Tsx::PublicFieldDefinition), + (")", Tsx::RPAREN), + ("primary_expression", Tsx::PrimaryExpression), + ("try_statement", Tsx::TryStatement), + ("constraint", Tsx::Constraint), + ("<<", Tsx::LTLT), + ("}", Tsx::RBRACE), + ("<<=", Tsx::LTLTEQ), + ("type_parameters_repeat1", Tsx::TypeParametersRepeat1), + ("%=", Tsx::PERCENTEQ), + ("declare", Tsx::Declare), + ("do", Tsx::Do), + ("import_alias", Tsx::ImportAlias), + (",", Tsx::COMMA), + ("boolean", Tsx::Boolean), + ("decorator", Tsx::Decorator), + (";", Tsx::SEMI), + ("(", Tsx::LPAREN), + ("lookup_type", Tsx::LookupType), + ("infer", Tsx::Infer), + ("function", Tsx::Function), + ("string_repeat1", Tsx::StringRepeat1), + ("index_signature", Tsx::IndexSignature), + ("*=", Tsx::STAREQ), + ("update_expression", Tsx::UpdateExpression), + ("else_clause", Tsx::ElseClause), + ("for", Tsx::For), + ("readonly", Tsx::Readonly), + ("switch_statement", Tsx::SwitchStatement), + ( + "_function_signature_automatic_semicolon", + Tsx::FunctionSignatureAutomaticSemicolon, + ), + ("identifier", Tsx::Identifier), + ("mapped_type_clause", Tsx::MappedTypeClause), + ("*", Tsx::STAR), + ("while", Tsx::While), + ("default", Tsx::Default), + ("enum_assignment", Tsx::EnumAssignment), + ("true", Tsx::True), ( "_jsx_start_opening_element_repeat1", Tsx::JsxStartOpeningElementRepeat1, ), - ("&&", Tsx::AMPAMP), - ("tuple_type_repeat1", Tsx::TupleTypeRepeat1), - ("{", Tsx::LBRACE), - ("array_pattern", Tsx::ArrayPattern), - ("case", Tsx::Case), - ("return", Tsx::Return), - ("template_string_repeat1", Tsx::TemplateStringRepeat1), - ("+", Tsx::PLUS), + ("abstract", Tsx::Abstract), ("type_query", Tsx::TypeQuery), - ("try", Tsx::Try), - ("extends", Tsx::Extends), - (".", Tsx::DOT), - ("export_specifier", Tsx::ExportSpecifier), + ("object_pattern", Tsx::ObjectPattern), + ("switch_body", Tsx::SwitchBody), + ("jsx_element_repeat1", Tsx::JsxElementRepeat1), + ("implements", Tsx::Implements), + ("variable_declaration", Tsx::VariableDeclaration), + ("formal_parameters", Tsx::FormalParameters), + ("arrow_function", Tsx::ArrowFunction), + ("class_declaration", Tsx::ClassDeclaration), + ("string_token2", Tsx::StringToken2), + ("extends_clause", Tsx::ExtendsClause), + ("method_signature", Tsx::MethodSignature), + ("object_pattern_repeat1", Tsx::ObjectPatternRepeat1), + ("jsx_namespace_name", Tsx::JsxNamespaceName), ("yield", Tsx::Yield), - ("assignment_expression", Tsx::AssignmentExpression), - ("property_signature", Tsx::PropertySignature), - ("new", Tsx::New), - ("jsx_opening_element", Tsx::JsxOpeningElement), - ("array", Tsx::Array), - ("?", Tsx::QMARK), - (";", Tsx::SEMI), - ("import_require_clause", Tsx::ImportRequireClause), - ("}", Tsx::RBRACE), - ("boolean", Tsx::Boolean), - ("type_predicate_annotation", Tsx::TypePredicateAnnotation), - ("type_parameter", Tsx::TypeParameter), - ("type_identifier", Tsx::TypeIdentifier), - ("constraint", Tsx::Constraint), - ("if", Tsx::If), - (">>", Tsx::GTGT), + ("tuple_type", Tsx::TupleType), + ("while_statement", Tsx::WhileStatement), + ("const", Tsx::Const), + ("subscript_expression", Tsx::SubscriptExpression), + (">>>=", Tsx::GTGTGTEQ), + ("opting_type_annotation", Tsx::OptingTypeAnnotation), + ("<=", Tsx::LTEQ), + ("import_statement", Tsx::ImportStatement), + ("enum_body", Tsx::EnumBody), ("intersection_type", Tsx::IntersectionType), - ("labeled_statement", Tsx::LabeledStatement), - ("!", Tsx::BANG), - ("null", Tsx::Null), + ("object_type", Tsx::ObjectType), + ("jsx_self_closing_element", Tsx::JsxSelfClosingElement), + ("of", Tsx::Of), + ("rest_type", Tsx::RestType), + ("object_assignment_pattern", Tsx::ObjectAssignmentPattern), + ("?:", Tsx::QMARKCOLON), + ("any", Tsx::Any), + ("++", Tsx::PLUSPLUS), + ( + "augmented_assignment_expression", + Tsx::AugmentedAssignmentExpression, + ), + ("literal_type", Tsx::LiteralType), + ("function_type", Tsx::FunctionType), + ("var", Tsx::Var), + ("pair", Tsx::Pair), + ("generator_function", Tsx::GeneratorFunction), + ("object_type_repeat1", Tsx::ObjectTypeRepeat1), + (">>>", Tsx::GTGTGT), + (".", Tsx::DOT), + ("class_body", Tsx::ClassBody), + ("with_statement", Tsx::WithStatement), + ("for_in_statement", Tsx::ForInStatement), + ("class", Tsx::Class), + ("try", Tsx::Try), + ("from", Tsx::From), + ("_property_name", Tsx::PropertyName), + ("omitting_type_annotation", Tsx::OmittingTypeAnnotation), + ("finally_clause", Tsx::FinallyClause), ("jsx_element", Tsx::JsxElement), - ("enum_body", Tsx::EnumBody), - ("type_parameters", Tsx::TypeParameters), - ("optional_parameter", Tsx::OptionalParameter), - ("**", Tsx::STARSTAR), - ("end", Tsx::End), - ("object_repeat1", Tsx::ObjectRepeat1), - ]), + ("throw_statement", Tsx::ThrowStatement), + ("_template_chars", Tsx::TemplateChars), + ("!", Tsx::BANG), + ("parenthesized_type", Tsx::ParenthesizedType), + ("static", Tsx::Static), + ("_for_header", Tsx::ForHeader), + ("`", Tsx::BQUOTE), + ("break_statement", Tsx::BreakStatement), + ("string", Tsx::String), + ("else", Tsx::Else), + ("typeof", Tsx::Typeof), + ("lexical_declaration", Tsx::LexicalDeclaration), + ("_augmented_assignment_lhs", Tsx::AugmentedAssignmentLhs), + ("\\\"", Tsx::DQUOTE), + ("extends", Tsx::Extends), + ("|", Tsx::PIPE), + ("||=", Tsx::PIPEPIPEEQ), + ("ambient_declaration", Tsx::AmbientDeclaration), + ("for_statement", Tsx::ForStatement), + ("template_substitution", Tsx::TemplateSubstitution), + ("unary_expression", Tsx::UnaryExpression), + ("ERROR", Tsx::Error), + ("{", Tsx::LBRACE), + ], }; impl From<&str> for Tsx { diff --git a/src/languages/language_typescript.rs b/src/languages/language_typescript.rs index 4ca0061a0..1dc29cf8d 100644 --- a/src/languages/language_typescript.rs +++ b/src/languages/language_typescript.rs @@ -346,448 +346,448 @@ pub enum Typescript { #[allow(clippy::unreadable_literal)] static KEYS: phf::Map<&'static str, Typescript> = ::phf::Map { - key: 3213172566270843353, - disps: ::phf::Slice::Static(&[ - (1, 8), - (0, 14), - (2, 194), - (0, 2), - (0, 62), - (0, 52), - (0, 5), - (0, 82), + key: 12913932095322966823, + disps: &[ (0, 0), - (1, 238), - (0, 40), - (0, 59), (0, 1), - (0, 7), - (0, 67), + (0, 20), + (0, 1), (0, 41), + (0, 19), + (0, 0), + (1, 289), + (1, 207), + (0, 9), + (0, 14), + (1, 114), + (0, 51), + (0, 15), + (0, 0), + (0, 21), (0, 1), - (3, 91), - (22, 34), - (2, 150), - (6, 280), - (2, 19), - (0, 23), - (0, 59), - (11, 3), - (53, 294), (0, 5), - (0, 52), - (7, 305), - (1, 1), - (5, 34), + (0, 165), + (1, 30), (0, 0), - (0, 163), - (0, 203), - (0, 66), + (5, 168), + (2, 63), + (0, 22), + (0, 26), + (1, 2), + (7, 193), + (0, 22), (0, 0), - (0, 43), - (1, 138), - (1, 36), - (0, 50), - (0, 69), - (0, 32), + (0, 242), + (0, 65), + (0, 80), + (0, 119), + (0, 239), + (0, 3), + (0, 187), + (5, 9), + (0, 48), + (4, 97), + (0, 21), + (61, 287), (0, 1), - (0, 127), - (0, 56), - (0, 116), - (1, 6), - (5, 312), - (7, 95), - (0, 9), - (18, 9), - (2, 158), - (0, 5), - (0, 11), - (23, 115), - (2, 272), - (0, 52), - (0, 144), - (2, 48), - (0, 9), - (0, 6), - (0, 144), - (54, 171), - (2, 30), - (1, 25), - ]), - entries: ::phf::Slice::Static(&[ - ("target", Typescript::Target), - ("statement_block", Typescript::StatementBlock), - ("typeof", Typescript::Typeof), - ("lookup_type", Typescript::LookupType), - ("_for_header", Typescript::ForHeader), - ("type_identifier", Typescript::TypeIdentifier), - ("switch_case", Typescript::SwitchCase), - ("variable_declarator", Typescript::VariableDeclarator), - ("+=", Typescript::PLUSEQ), + (0, 275), + (1, 27), + (0, 268), + (0, 296), + (3, 277), + (0, 13), + (3, 19), + (0, 49), + (8, 75), + (7, 278), + (0, 0), + (0, 35), + (0, 211), + (10, 194), + (11, 96), + (0, 24), + (0, 105), + (0, 21), + (1, 67), + (0, 2), + (81, 272), + (0, 205), + (13, 129), + ], + entries: &[ + ("as_expression", Typescript::AsExpression), + ("variable_declaration", Typescript::VariableDeclaration), + ("generic_type", Typescript::GenericType), + ("construct_signature", Typescript::ConstructSignature), ( - "_function_signature_automatic_semicolon", - Typescript::FunctionSignatureAutomaticSemicolon, + "implements_clause_repeat1", + Typescript::ImplementsClauseRepeat1, ), - ("assignment_pattern", Typescript::AssignmentPattern), + ("!==", Typescript::BANGEQEQ), + ("enum", Typescript::Enum), + ("yield_expression", Typescript::YieldExpression), + ("as", Typescript::As), + ("extends", Typescript::Extends), + ("let", Typescript::Let), + ("return", Typescript::Return), + ("%=", Typescript::PERCENTEQ), + ("infer_type", Typescript::InferType), ("get", Typescript::Get), - ("}", Typescript::RBRACE), - ("~", Typescript::TILDE), - ("type_parameters", Typescript::TypeParameters), - ("?", Typescript::QMARK), - ("|}", Typescript::PIPERBRACE), - ("enum_body", Typescript::EnumBody), - ("statement_identifier", Typescript::StatementIdentifier), - ("while", Typescript::While), - ("non_null_expression", Typescript::NonNullExpression), + ("_formal_parameter", Typescript::FormalParameter), + ("object_type", Typescript::ObjectType), + ("property_identifier", Typescript::PropertyIdentifier), + ("formal_parameters", Typescript::FormalParameters), + ("template_string", Typescript::TemplateString), + ("method_definition", Typescript::MethodDefinition), + ("enum_declaration", Typescript::EnumDeclaration), + ("export_clause_repeat1", Typescript::ExportClauseRepeat1), + ("|", Typescript::PIPE), ( - "parenthesized_expression", - Typescript::ParenthesizedExpression, + "abstract_class_declaration", + Typescript::AbstractClassDeclaration, ), - ("_call_signature", Typescript::CallSignature), - ("union_type", Typescript::UnionType), + ("import_specifier", Typescript::ImportSpecifier), ("for", Typescript::For), - ("symbol", Typescript::Symbol), - ("pattern", Typescript::Pattern), - ("-", Typescript::DASH), + ("for_statement", Typescript::ForStatement), + ("meta_property", Typescript::MetaProperty), + ("debugger", Typescript::Debugger), + ( + "omitting_type_annotation", + Typescript::OmittingTypeAnnotation, + ), + ("if_statement", Typescript::IfStatement), + ("<=", Typescript::LTEQ), + ("tuple_type_repeat1", Typescript::TupleTypeRepeat1), + ("generator_function", Typescript::GeneratorFunction), + ( + "variable_declaration_repeat1", + Typescript::VariableDeclarationRepeat1, + ), + ("**", Typescript::STARSTAR), + ("object_pattern", Typescript::ObjectPattern), + ("number", Typescript::Number), + ("do", Typescript::Do), + ("identifier", Typescript::Identifier), + ("ternary_expression", Typescript::TernaryExpression), + ("binary_expression", Typescript::BinaryExpression), + ("arguments", Typescript::Arguments), + ("<", Typescript::LT), + ("rest_type", Typescript::RestType), + ("if", Typescript::If), + ("mapped_type_clause", Typescript::MappedTypeClause), + ("private", Typescript::Private), + ( + "abstract_method_signature", + Typescript::AbstractMethodSignature, + ), + ("'", Typescript::SQUOTE), + ("array_repeat1", Typescript::ArrayRepeat1), + ("_destructuring_pattern", Typescript::DestructuringPattern), + ( + "type_predicate_annotation", + Typescript::TypePredicateAnnotation, + ), + ("existential_type", Typescript::ExistentialType), + ("default_type", Typescript::DefaultType), + ("union_type", Typescript::UnionType), + (">>>", Typescript::GTGTGT), + ("extends_clause_repeat1", Typescript::ExtendsClauseRepeat1), + ("=", Typescript::EQ), + ("namespace", Typescript::Namespace), + ("import_statement", Typescript::ImportStatement), + ("lexical_declaration", Typescript::LexicalDeclaration), + (">>=", Typescript::GTGTEQ), + ("undefined", Typescript::Undefined), + ("abstract", Typescript::Abstract), ("with", Typescript::With), - ("type_arguments", Typescript::TypeArguments), - ("public", Typescript::Public), - ("throw", Typescript::Throw), - (".", Typescript::DOT), - ("_parameter_name", Typescript::ParameterName), + ("{|", Typescript::LBRACEPIPE), + ("throw_statement", Typescript::ThrowStatement), + ("++", Typescript::PLUSPLUS), + ("type_parameters", Typescript::TypeParameters), + ("regex_flags", Typescript::RegexFlags), + ("~", Typescript::TILDE), + ("statement_identifier", Typescript::StatementIdentifier), + ("required_parameter", Typescript::RequiredParameter), + ("string_repeat2", Typescript::StringRepeat2), + ("class_declaration", Typescript::ClassDeclaration), + ("string", Typescript::String), + ("-=", Typescript::DASHEQ), + ("?", Typescript::QMARK), + ("ambient_declaration", Typescript::AmbientDeclaration), + ("regex", Typescript::Regex), + ("accessibility_modifier", Typescript::AccessibilityModifier), ("arrow_function", Typescript::ArrowFunction), + ("+=", Typescript::PLUSEQ), ("switch_body_repeat1", Typescript::SwitchBodyRepeat1), - ("\'", Typescript::SQUOTE), - ("/=", Typescript::SLASHEQ), - ("this", Typescript::This), - ("export_clause_repeat1", Typescript::ExportClauseRepeat1), - ("??=", Typescript::QMARKQMARKEQ), - ("string_repeat2", Typescript::StringRepeat2), - ("as", Typescript::As), - ("parenthesized_type", Typescript::ParenthesizedType), - ("labeled_statement", Typescript::LabeledStatement), - ("**", Typescript::STARSTAR), - ("!=", Typescript::BANGEQ), - ("class_body", Typescript::ClassBody), + ("||=", Typescript::PIPEPIPEEQ), + ("type_identifier", Typescript::TypeIdentifier), + ("_for_header", Typescript::ForHeader), + ("(", Typescript::LPAREN), + ("|}", Typescript::PIPERBRACE), + ("of", Typescript::Of), + ("named_imports", Typescript::NamedImports), + ( + "export_statement_repeat1", + Typescript::ExportStatementRepeat1, + ), + ("namespace_import", Typescript::NamespaceImport), + ("program", Typescript::Program), + ("internal_module", Typescript::InternalModule), + ("continue_statement", Typescript::ContinueStatement), + ("conditional_type", Typescript::ConditionalType), + ("?.", Typescript::QMARKDOT), + ("readonly", Typescript::Readonly), + (":", Typescript::COLON), + ("opting_type_annotation", Typescript::OptingTypeAnnotation), + ("else", Typescript::Else), + ("false", Typescript::False), + ("global", Typescript::Global), ( "augmented_assignment_expression", Typescript::AugmentedAssignmentExpression, ), - ("debugger_statement", Typescript::DebuggerStatement), - ("array_type", Typescript::ArrayType), - ("!==", Typescript::BANGEQEQ), - ("identifier", Typescript::Identifier), + ("escape_sequence", Typescript::EscapeSequence), + ("void", Typescript::Void), + ("export_clause", Typescript::ExportClause), + ("type_parameter", Typescript::TypeParameter), + ("_call_signature", Typescript::CallSignature), + (",", Typescript::COMMA), + ("export_specifier", Typescript::ExportSpecifier), + ("named_imports_repeat1", Typescript::NamedImportsRepeat1), + ("<<", Typescript::LTLT), + ("predefined_type", Typescript::PredefinedType), + ("infer", Typescript::Infer), + ("break", Typescript::Break), + ("set", Typescript::Set), + ("computed_property_name", Typescript::ComputedPropertyName), + (";", Typescript::SEMI), + ("update_expression", Typescript::UpdateExpression), + ("pair_pattern", Typescript::PairPattern), + ("interface", Typescript::Interface), + ("for_in_statement", Typescript::ForInStatement), + ("keyof", Typescript::Keyof), + ("??", Typescript::QMARKQMARK), + ("optional_type", Typescript::OptionalType), + ("type_arguments", Typescript::TypeArguments), ("constraint", Typescript::Constraint), - ("unary_expression", Typescript::UnaryExpression), + ("pair", Typescript::Pair), + ("string_token2", Typescript::StringToken2), + ("**=", Typescript::STARSTAREQ), + ("intersection_type", Typescript::IntersectionType), + ("||", Typescript::PIPEPIPE), + ("statement_block", Typescript::StatementBlock), ( - "type_predicate_annotation", - Typescript::TypePredicateAnnotation, + "shorthand_property_identifier", + Typescript::ShorthandPropertyIdentifier, ), - ("else_clause", Typescript::ElseClause), + ("\\\"", Typescript::DQUOTE), + ("function_type", Typescript::FunctionType), + ("target", Typescript::Target), ( "object_assignment_pattern", Typescript::ObjectAssignmentPattern, ), - ("flow_maybe_type", Typescript::FlowMaybeType), - ("require", Typescript::Require), - ("number", Typescript::Number), - ("global", Typescript::Global), - ("<<=", Typescript::LTLTEQ), - ("\\\"", Typescript::DQUOTE), - ("existential_type", Typescript::ExistentialType), - ("template_string", Typescript::TemplateString), - ("pair", Typescript::Pair), - ("async", Typescript::Async), - ("(", Typescript::LPAREN), - ("/", Typescript::SLASH), + ("else_clause", Typescript::ElseClause), + ("class_body", Typescript::ClassBody), + ("index_type_query", Typescript::IndexTypeQuery), + ("string_token1", Typescript::StringToken1), + ("import_clause", Typescript::ImportClause), + ("labeled_statement", Typescript::LabeledStatement), + ("null", Typescript::Null), + ("class_body_repeat1", Typescript::ClassBodyRepeat1), + ("declare", Typescript::Declare), + ("*", Typescript::STAR), + ("_type", Typescript::Type), + ("module", Typescript::Module), + ("function", Typescript::Function), + ("class_heritage", Typescript::ClassHeritage), + ("readonly_type", Typescript::ReadonlyType), + ("method_signature", Typescript::MethodSignature), + ("function_signature", Typescript::FunctionSignature), + ("implements_clause", Typescript::ImplementsClause), + ("variable_declarator", Typescript::VariableDeclarator), + ("empty_statement", Typescript::EmptyStatement), + ("?:", Typescript::QMARKCOLON), + ("symbol", Typescript::Symbol), + ("template_string_repeat1", Typescript::TemplateStringRepeat1), ( - "generator_function_declaration", - Typescript::GeneratorFunctionDeclaration, + "formal_parameters_repeat1", + Typescript::FormalParametersRepeat1, ), - ("delete", Typescript::Delete), - ( - "omitting_type_annotation", - Typescript::OmittingTypeAnnotation, - ), - ("any", Typescript::Any), - ("ambient_declaration", Typescript::AmbientDeclaration), - (">>=", Typescript::GTGTEQ), - ("type_annotation", Typescript::TypeAnnotation), - ("string", Typescript::String), - ("sequence_expression", Typescript::SequenceExpression), - ("import_require_clause", Typescript::ImportRequireClause), - ("named_imports", Typescript::NamedImports), - ("yield_expression", Typescript::YieldExpression), - ("new_expression", Typescript::NewExpression), - ("rest_pattern", Typescript::RestPattern), - ("false", Typescript::False), - ("end", Typescript::End), - (",", Typescript::COMMA), - ("do", Typescript::Do), - ("type_query", Typescript::TypeQuery), - ("=>", Typescript::EQGT), - ("?.", Typescript::QMARKDOT), - ("tuple_type_repeat1", Typescript::TupleTypeRepeat1), - ("[", Typescript::LBRACK), - (">>>=", Typescript::GTGTGTEQ), - ("variable_declaration", Typescript::VariableDeclaration), - ("try_statement", Typescript::TryStatement), - (">>", Typescript::GTGT), - ("`", Typescript::BQUOTE), - ("extends_clause_repeat1", Typescript::ExtendsClauseRepeat1), - ("_destructuring_pattern", Typescript::DestructuringPattern), - ("_template_chars", Typescript::TemplateChars), + ("optional_parameter", Typescript::OptionalParameter), + ("function_declaration", Typescript::FunctionDeclaration), ("%", Typescript::PERCENT), - ("continue", Typescript::Continue), - ("array_pattern", Typescript::ArrayPattern), - ("lexical_declaration", Typescript::LexicalDeclaration), - ("try", Typescript::Try), - ("switch_statement", Typescript::SwitchStatement), - ("regex_flags", Typescript::RegexFlags), - ("null", Typescript::Null), - ("for_in_statement", Typescript::ForInStatement), - ("instanceof", Typescript::Instanceof), + ("interface_declaration", Typescript::InterfaceDeclaration), + ("boolean", Typescript::Boolean), + ("await_expression", Typescript::AwaitExpression), + (".", Typescript::DOT), + ("array", Typescript::Array), + ("^", Typescript::CARET), + ("string_repeat1", Typescript::StringRepeat1), + ("===", Typescript::EQEQEQ), + ("while", Typescript::While), ("object_repeat1", Typescript::ObjectRepeat1), - ("<=", Typescript::LTEQ), - ("pair_pattern", Typescript::PairPattern), - ("assignment_expression", Typescript::AssignmentExpression), - ("_from_clause", Typescript::FromClause), - ("ERROR", Typescript::Error), - ("_type", Typescript::Type), - ("import_alias", Typescript::ImportAlias), - ("=", Typescript::EQ), + ("class", Typescript::Class), + ("&&=", Typescript::AMPAMPEQ), + ("flow_maybe_type", Typescript::FlowMaybeType), + ("object", Typescript::Object), ( - "abstract_class_declaration", - Typescript::AbstractClassDeclaration, + "_function_signature_automatic_semicolon", + Typescript::FunctionSignatureAutomaticSemicolon, ), - ("tuple_type", Typescript::TupleType), - ("boolean", Typescript::Boolean), - ("with_statement", Typescript::WithStatement), - ("object_pattern", Typescript::ObjectPattern), - ("?:", Typescript::QMARKCOLON), - ("default", Typescript::Default), - ("switch_default", Typescript::SwitchDefault), - ("formal_parameters", Typescript::FormalParameters), - (">>>", Typescript::GTGTGT), - ("]", Typescript::RBRACK), - ("static", Typescript::Static), - ("implements_clause", Typescript::ImplementsClause), - ("++", Typescript::PLUSPLUS), - ("object_type", Typescript::ObjectType), - ("named_imports_repeat1", Typescript::NamedImportsRepeat1), - ("switch_body", Typescript::SwitchBody), - ("class_heritage", Typescript::ClassHeritage), - ("conditional_type", Typescript::ConditionalType), - ("finally", Typescript::Finally), - ("function_type", Typescript::FunctionType), - ("import_statement", Typescript::ImportStatement), - ("export_specifier", Typescript::ExportSpecifier), - ("program_repeat1", Typescript::ProgramRepeat1), - ("*", Typescript::STAR), - ("readonly", Typescript::Readonly), - ("export_clause", Typescript::ExportClause), - ("property_identifier", Typescript::PropertyIdentifier), - ("do_statement", Typescript::DoStatement), - ("comment", Typescript::Comment), - ("enum_assignment", Typescript::EnumAssignment), - ("void", Typescript::Void), - ("_primary_type", Typescript::PrimaryType), - ("**=", Typescript::STARSTAREQ), - ("literal_type", Typescript::LiteralType), - ("escape_sequence", Typescript::EscapeSequence), - ("if", Typescript::If), - (">=", Typescript::GTEQ), - ("%=", Typescript::PERCENTEQ), - ("type_predicate", Typescript::TypePredicate), - ("new", Typescript::New), - ("extends", Typescript::Extends), - ("type_alias_declaration", Typescript::TypeAliasDeclaration), - ("array_repeat1", Typescript::ArrayRepeat1), + ("spread_element", Typescript::SpreadElement), + ("const", Typescript::Const), + ("assignment_expression", Typescript::AssignmentExpression), + ("member_expression", Typescript::MemberExpression), + ("switch_statement", Typescript::SwitchStatement), + ("type_assertion", Typescript::TypeAssertion), + ("end", Typescript::End), + ("debugger_statement", Typescript::DebuggerStatement), + ("nested_type_identifier", Typescript::NestedTypeIdentifier), + ("lookup_type", Typescript::LookupType), + ("==", Typescript::EQEQ), + ("/", Typescript::SLASH), (">", Typescript::GT), - ("primary_expression", Typescript::PrimaryExpression), + ("try_statement", Typescript::TryStatement), + ("literal_type", Typescript::LiteralType), + ("public_field_definition", Typescript::PublicFieldDefinition), + ("object_pattern_repeat1", Typescript::ObjectPatternRepeat1), + ("ERROR", Typescript::Error), ( "shorthand_property_identifier_pattern", Typescript::ShorthandPropertyIdentifierPattern, ), - ("import_specifier", Typescript::ImportSpecifier), - ("??", Typescript::QMARKQMARK), - ("-=", Typescript::DASHEQ), - ("opting_type_annotation", Typescript::OptingTypeAnnotation), - ("subscript_expression", Typescript::SubscriptExpression), - (")", Typescript::RPAREN), - ("else", Typescript::Else), - ("array_pattern_repeat1", Typescript::ArrayPatternRepeat1), - ("&=", Typescript::AMPEQ), - ("case", Typescript::Case), - ("default_type", Typescript::DefaultType), - ("program", Typescript::Program), - ("{", Typescript::LBRACE), - ("||=", Typescript::PIPEPIPEEQ), - ("string_token1", Typescript::StringToken1), - ("===", Typescript::EQEQEQ), - ("hash_bang_line", Typescript::HashBangLine), - ("<", Typescript::LT), - ("interface", Typescript::Interface), + ("switch_body", Typescript::SwitchBody), + ("object_type_repeat1", Typescript::ObjectTypeRepeat1), + ("decorator", Typescript::Decorator), + ("async", Typescript::Async), + ("this", Typescript::This), + ("--", Typescript::DASHDASH), + ("non_null_expression", Typescript::NonNullExpression), + ("default", Typescript::Default), ( - "abstract_method_signature", - Typescript::AbstractMethodSignature, + "parenthesized_expression", + Typescript::ParenthesizedExpression, ), - ("keyof", Typescript::Keyof), - ("export", Typescript::Export), - ("return", Typescript::Return), - ("^", Typescript::CARET), - ("protected", Typescript::Protected), - ("!", Typescript::BANG), - ("==", Typescript::EQEQ), - ("public_field_definition", Typescript::PublicFieldDefinition), - ("index_signature", Typescript::IndexSignature), - ("regex_pattern", Typescript::RegexPattern), - ("computed_property_name", Typescript::ComputedPropertyName), + ("enum_body_repeat1", Typescript::EnumBodyRepeat1), + ("throw", Typescript::Throw), ("is", Typescript::Is), - ("for_statement", Typescript::ForStatement), - ("from", Typescript::From), - ("as_expression", Typescript::AsExpression), + ("_from_clause", Typescript::FromClause), + ("!", Typescript::BANG), + ("implements", Typescript::Implements), + ("tuple_type", Typescript::TupleType), + ("require", Typescript::Require), + ("_automatic_semicolon", Typescript::AutomaticSemicolon), + ("&&", Typescript::AMPAMP), + ("enum_assignment", Typescript::EnumAssignment), + ("any", Typescript::Any), + ("property_signature", Typescript::PropertySignature), + ("]", Typescript::RBRACK), ("import", Typescript::Import), - ("string_repeat1", Typescript::StringRepeat1), - ("readonly_type", Typescript::ReadonlyType), - ("method_definition", Typescript::MethodDefinition), - ("intersection_type", Typescript::IntersectionType), - ("function_declaration", Typescript::FunctionDeclaration), - ("+", Typescript::PLUS), - ("class_declaration", Typescript::ClassDeclaration), + ("export", Typescript::Export), + ("try", Typescript::Try), + ("assignment_pattern", Typescript::AssignmentPattern), + ("switch_case", Typescript::SwitchCase), + (">=", Typescript::GTEQ), + (">>", Typescript::GTGT), ("type_parameters_repeat1", Typescript::TypeParametersRepeat1), - ("|", Typescript::PIPE), - ("mapped_type_clause", Typescript::MappedTypeClause), - ("switch", Typescript::Switch), - ("||", Typescript::PIPEPIPE), + ("|=", Typescript::PIPEEQ), + ("*=", Typescript::STAREQ), + ("parenthesized_type", Typescript::ParenthesizedType), + ("_template_chars", Typescript::TemplateChars), + ("delete", Typescript::Delete), + ("hash_bang_line", Typescript::HashBangLine), + ("expression_statement", Typescript::ExpressionStatement), + ("true", Typescript::True), + ("static", Typescript::Static), + ("array_type", Typescript::ArrayType), + ("comment", Typescript::Comment), + ("import_alias", Typescript::ImportAlias), + ("finally_clause", Typescript::FinallyClause), + ("return_statement", Typescript::ReturnStatement), + ("catch_clause", Typescript::CatchClause), + ("template_substitution", Typescript::TemplateSubstitution), + ("case", Typescript::Case), + ("asserts", Typescript::Asserts), ("_initializer", Typescript::Initializer), + ("from", Typescript::From), + ("protected", Typescript::Protected), + ("public", Typescript::Public), + ("call_expression", Typescript::CallExpression), + ("yield", Typescript::Yield), ("&", Typescript::AMP), + ("=>", Typescript::EQGT), + ("&=", Typescript::AMPEQ), + ("await", Typescript::Await), + ("regex_pattern", Typescript::RegexPattern), + ("_tuple_type_member", Typescript::TupleTypeMember), + ("declaration", Typescript::Declaration), + ("array_pattern", Typescript::ArrayPattern), + ("primary_expression", Typescript::PrimaryExpression), ("^=", Typescript::CARETEQ), - ("yield", Typescript::Yield), - ("class", Typescript::Class), - ("<<", Typescript::LTLT), - ("catch", Typescript::Catch), - ("export_statement", Typescript::ExportStatement), - ("meta_property", Typescript::MetaProperty), - ("generator_function", Typescript::GeneratorFunction), - ("implements", Typescript::Implements), - ("decorator", Typescript::Decorator), - ("if_statement", Typescript::IfStatement), - ("&&", Typescript::AMPAMP), - ("binary_expression", Typescript::BinaryExpression), - ("var", Typescript::Var), - ("enum_body_repeat1", Typescript::EnumBodyRepeat1), - ("undefined", Typescript::Undefined), - ("object_pattern_repeat1", Typescript::ObjectPatternRepeat1), - ("required_parameter", Typescript::RequiredParameter), - ("&&=", Typescript::AMPAMPEQ), - ("@", Typescript::AT), - ("debugger", Typescript::Debugger), - ("infer_type", Typescript::InferType), ("break_statement", Typescript::BreakStatement), - ("asserts", Typescript::Asserts), - ("predefined_type", Typescript::PredefinedType), - (";", Typescript::SEMI), - ("finally_clause", Typescript::FinallyClause), + ("export_statement", Typescript::ExportStatement), + ("<<=", Typescript::LTLTEQ), + ("+", Typescript::PLUS), + ("constructor_type", Typescript::ConstructorType), + ("import_require_clause", Typescript::ImportRequireClause), + ("[", Typescript::LBRACK), + ("typeof", Typescript::Typeof), + ("${", Typescript::DOLLARLBRACE), ( - "shorthand_property_identifier", - Typescript::ShorthandPropertyIdentifier, + "generator_function_declaration", + Typescript::GeneratorFunctionDeclaration, ), - ("accessibility_modifier", Typescript::AccessibilityModifier), - ("internal_module", Typescript::InternalModule), - ("module", Typescript::Module), - ("return_statement", Typescript::ReturnStatement), - ("throw_statement", Typescript::ThrowStatement), - ("template_substitution", Typescript::TemplateSubstitution), - ("-?:", Typescript::DASHQMARKCOLON), - ("string_token2", Typescript::StringToken2), - ("...", Typescript::DOTDOTDOT), + ("expression", Typescript::Expression), + ("}", Typescript::RBRACE), + ("array_pattern_repeat1", Typescript::ArrayPatternRepeat1), + ("enum_body", Typescript::EnumBody), + ("while_statement", Typescript::WhileStatement), + ("_primary_type", Typescript::PrimaryType), + ("var", Typescript::Var), + ("subscript_expression", Typescript::SubscriptExpression), + ("type_alias_declaration", Typescript::TypeAliasDeclaration), ("in", Typescript::In), - ("function", Typescript::Function), - ("update_expression", Typescript::UpdateExpression), - ("await_expression", Typescript::AwaitExpression), - ("type_parameter", Typescript::TypeParameter), - ("declare", Typescript::Declare), - ("arguments", Typescript::Arguments), - ("set", Typescript::Set), + ("type_query", Typescript::TypeQuery), + ("{", Typescript::LBRACE), + ("`", Typescript::BQUOTE), + ("super", Typescript::Super), + ("_parameter_name", Typescript::ParameterName), + ("sequence_expression", Typescript::SequenceExpression), + ("switch", Typescript::Switch), + ("pattern", Typescript::Pattern), + ("with_statement", Typescript::WithStatement), + ("catch", Typescript::Catch), + ("instanceof", Typescript::Instanceof), + ("-", Typescript::DASH), + ("extends_clause", Typescript::ExtendsClause), + ("type_annotation", Typescript::TypeAnnotation), + (">>>=", Typescript::GTGTGTEQ), + ("switch_default", Typescript::SwitchDefault), ("nested_identifier", Typescript::NestedIdentifier), - ("empty_statement", Typescript::EmptyStatement), - ("type_assertion", Typescript::TypeAssertion), - ("private", Typescript::Private), - ("expression_statement", Typescript::ExpressionStatement), - ("array", Typescript::Array), - ("${", Typescript::DOLLARLBRACE), - ("spread_element", Typescript::SpreadElement), - ("member_expression", Typescript::MemberExpression), - ("method_signature", Typescript::MethodSignature), - ("await", Typescript::Await), - ("constructor_type", Typescript::ConstructorType), - ("|=", Typescript::PIPEEQ), - ("ternary_expression", Typescript::TernaryExpression), - ("function_signature", Typescript::FunctionSignature), - ("rest_type", Typescript::RestType), - ("construct_signature", Typescript::ConstructSignature), - ("expression", Typescript::Expression), - ("const", Typescript::Const), - ("namespace", Typescript::Namespace), - (":", Typescript::COLON), - ( - "export_statement_repeat1", - Typescript::ExportStatementRepeat1, - ), - ("generic_type", Typescript::GenericType), - ("true", Typescript::True), - ("optional_type", Typescript::OptionalType), - ("_property_name", Typescript::PropertyName), - ("enum_declaration", Typescript::EnumDeclaration), - ("object_type_repeat1", Typescript::ObjectTypeRepeat1), - ("namespace_import", Typescript::NamespaceImport), - ("object", Typescript::Object), + ("index_signature", Typescript::IndexSignature), + ("/=", Typescript::SLASHEQ), + ("new", Typescript::New), + ("??=", Typescript::QMARKQMARKEQ), ( "_augmented_assignment_lhs", Typescript::AugmentedAssignmentLhs, ), - ("_formal_parameter", Typescript::FormalParameter), - ("property_signature", Typescript::PropertySignature), - ("abstract", Typescript::Abstract), - ("enum", Typescript::Enum), - ("template_string_repeat1", Typescript::TemplateStringRepeat1), - ( - "implements_clause_repeat1", - Typescript::ImplementsClauseRepeat1, - ), - ("--", Typescript::DASHDASH), - ("_automatic_semicolon", Typescript::AutomaticSemicolon), - ("infer", Typescript::Infer), - ("_tuple_type_member", Typescript::TupleTypeMember), - ("optional_parameter", Typescript::OptionalParameter), - ("import_clause", Typescript::ImportClause), - ("of", Typescript::Of), - ("*=", Typescript::STAREQ), - ("declaration", Typescript::Declaration), - ("super", Typescript::Super), - ("continue_statement", Typescript::ContinueStatement), - ("class_body_repeat1", Typescript::ClassBodyRepeat1), - ("index_type_query", Typescript::IndexTypeQuery), - ("break", Typescript::Break), - ("{|", Typescript::LBRACEPIPE), - ("nested_type_identifier", Typescript::NestedTypeIdentifier), - ("interface_declaration", Typescript::InterfaceDeclaration), - ("while_statement", Typescript::WhileStatement), - ("call_expression", Typescript::CallExpression), - ("regex", Typescript::Regex), - ( - "formal_parameters_repeat1", - Typescript::FormalParametersRepeat1, - ), - ( - "variable_declaration_repeat1", - Typescript::VariableDeclarationRepeat1, - ), - ("let", Typescript::Let), - ("extends_clause", Typescript::ExtendsClause), - ("catch_clause", Typescript::CatchClause), - ]), + ("_property_name", Typescript::PropertyName), + (")", Typescript::RPAREN), + ("-?:", Typescript::DASHQMARKCOLON), + ("continue", Typescript::Continue), + ("rest_pattern", Typescript::RestPattern), + ("type_predicate", Typescript::TypePredicate), + ("program_repeat1", Typescript::ProgramRepeat1), + ("!=", Typescript::BANGEQ), + ("...", Typescript::DOTDOTDOT), + ("finally", Typescript::Finally), + ("new_expression", Typescript::NewExpression), + ("do_statement", Typescript::DoStatement), + ("unary_expression", Typescript::UnaryExpression), + ("@", Typescript::AT), + ], }; impl From<&str> for Typescript {