#[derive(Clone, Debug, PartialEq, FromPrimitive)]
pub enum Cpp {
End = 0,
Identifier = 1,
HASHinclude = 2,
LF = 3,
HASHdefine = 4,
LPAREN = 5,
DOTDOTDOT = 6,
COMMA = 7,
RPAREN = 8,
HASHif = 9,
HASHendif = 10,
HASHifdef = 11,
HASHifndef = 12,
HASHelse = 13,
HASHelif = 14,
PreprocDirective = 15,
PreprocArg = 16,
LPAREN2 = 17,
Defined = 18,
BANG = 19,
TILDE = 20,
DASH = 21,
PLUS = 22,
STAR = 23,
SLASH = 24,
PERCENT = 25,
PIPEPIPE = 26,
AMPAMP = 27,
PIPE = 28,
CARET = 29,
AMP = 30,
EQEQ = 31,
BANGEQ = 32,
GT = 33,
GTEQ = 34,
LTEQ = 35,
LT = 36,
LTLT = 37,
GTGT = 38,
SEMI = 39,
Typedef = 40,
Extern = 41,
Attribute2 = 42,
Declspec = 43,
Based = 44,
Cdecl = 45,
Clrcall = 46,
Stdcall = 47,
Fastcall = 48,
Thiscall = 49,
Vectorcall = 50,
MsRestrictModifier = 51,
MsUnsignedPtrModifier = 52,
MsSignedPtrModifier = 53,
Unaligned = 54,
Unaligned2 = 55,
LBRACE = 56,
RBRACE = 57,
LBRACK = 58,
RBRACK = 59,
EQ = 60,
Static = 61,
Register = 62,
Inline = 63,
Const = 64,
Volatile = 65,
Restrict = 66,
Atomic = 67,
Mutable = 68,
Constexpr = 69,
Signed = 70,
Unsigned = 71,
Long = 72,
Short = 73,
PrimitiveType = 74,
Enum = 75,
Class = 76,
Struct = 77,
Union = 78,
COLON = 79,
If = 80,
Else = 81,
Switch = 82,
Case = 83,
Default = 84,
While = 85,
Do = 86,
For = 87,
Return = 88,
Break = 89,
Continue = 90,
Goto = 91,
QMARK = 92,
STAREQ = 93,
SLASHEQ = 94,
PERCENTEQ = 95,
PLUSEQ = 96,
DASHEQ = 97,
LTLTEQ = 98,
GTGTEQ = 99,
AMPEQ = 100,
CARETEQ = 101,
PIPEEQ = 102,
DASHDASH = 103,
PLUSPLUS = 104,
Sizeof = 105,
DOT = 106,
DASHGT = 107,
NumberLiteral = 108,
LSQUOTE = 109,
USQUOTE = 110,
USQUOTE2 = 111,
U8SQUOTE = 112,
SQUOTE = 113,
CharLiteralToken1 = 114,
LDQUOTE = 115,
UDQUOTE = 116,
UDQUOTE2 = 117,
U8DQUOTE = 118,
DQUOTE = 119,
StringLiteralToken1 = 120,
EscapeSequence = 121,
SystemLibString = 122,
True = 123,
False = 124,
Null = 125,
Comment = 126,
Decltype2 = 127,
Final = 128,
Override = 129,
Virtual = 130,
Explicit = 131,
Public = 132,
Private = 133,
Protected = 134,
Auto = 135,
Typename = 136,
Template = 137,
GT2 = 138,
COLONCOLON = 139,
Operator = 140,
Delete = 141,
Friend = 142,
Noexcept2 = 143,
Throw = 144,
Namespace = 145,
Using = 146,
StaticAssert = 147,
Try = 148,
Catch = 149,
LBRACKLBRACK = 150,
RBRACKRBRACK = 151,
New = 152,
OperatorName = 153,
This = 154,
Nullptr = 155,
AloneMacro = 156,
AloneMacroCallToken1 = 157,
CACHETRYINSPECT = 158,
CACHETRYUNWRAP = 159,
FORWARD = 160,
FORWARDSETATTRIBUTE = 161,
IDBTRYINSPECT = 162,
IDBTRYUNWRAP = 163,
LSTRYINSPECT = 164,
LSTRYUNWRAP = 165,
SDBTRYINSPECT = 166,
SDBTRYUNWRAP = 167,
PSGET = 168,
PSGETANDSET = 169,
PSGETLOCKLESS = 170,
QMTRYINSPECT = 171,
QMNOTEONLYTRYUNWRAP = 172,
QMTRYUNWRAP = 173,
QMWARNONLYTRYUNWRAP = 174,
MOZDECLUSEGUARDOBJECTNOTIFIER = 175,
MOZALLOCATOR = 176,
MOZALLOWTEMPORARY = 177,
MOZALWAYSINLINE = 178,
MOZALWAYSINLINEEVENDEBUG = 179,
MOZASANBLACKLIST = 180,
MOZCANRUNSCRIPT = 181,
MOZCANRUNSCRIPTBOUNDARY = 182,
MOZCANRUNSCRIPTFORDEFINITION = 183,
MOZCOLD = 184,
MOZFALLTHROUGH = 185,
MOZFORMATPRINTF = 186,
MOZHAVEANALYZERNORETURN = 187,
MOZHAVEASANBLACKLIST = 188,
MOZHAVENEVERINLINE = 189,
MOZHAVENORETURN = 190,
MOZHAVENORETURNPTR = 191,
MOZHAVENOSANITIZEATTR = 192,
MOZHAVESIGNEDOVERFLOWSANITIZEATTR = 193,
MOZHAVEUNSIGNEDOVERFLOWSANITIZEATTR = 194,
MOZHEAPALLOCATOR = 195,
MOZHEAPCLASS = 196,
MOZIMPLICIT = 197,
MOZINHERITTYPEANNOTATIONSFROMTEMPLATEARGS = 198,
MOZINITOUTSIDECTOR = 199,
MOZISCLASSINIT = 200,
MOZISREFPTR = 201,
MOZISSMARTPTRTOREFCOUNTED = 202,
MOZMAYBEUNUSED = 203,
MOZMAYCALLAFTERMUSTRETURN = 204,
MOZMUSTOVERRIDE = 205,
MOZMUSTRETURNFROMCALLERIFTHISISARG = 206,
MOZMUSTUSE = 207,
MOZMUSTUSETYPE = 208,
MOZNEEDSMEMMOVABLEMEMBERS = 209,
MOZNEEDSMEMMOVABLETYPE = 210,
MOZNEEDSNOVTABLETYPE = 211,
MOZNEVERINLINE = 212,
MOZNEVERINLINEDEBUG = 213,
MOZNONHEAPCLASS = 214,
MOZNONNULL = 215,
MOZNONNULLRETURN = 216,
MOZNONAUTOABLE = 217,
MOZNONMEMMOVABLE = 218,
MOZNONOWNINGREF = 219,
MOZNONPARAM = 220,
MOZNONTEMPORARYCLASS = 221,
MOZNORETURN = 222,
MOZNORETURNPTR = 223,
MOZNOADDREFRELEASEONRETURN = 224,
MOZNOARITHMETICEXPRINARGUMENT = 225,
MOZNODANGLINGONTEMPORARIES = 226,
MOZNOSANITIZESIGNEDOVERFLOW = 227,
MOZNOSANITIZEUNSIGNEDOVERFLOW = 228,
MOZONLYUSEDTOAVOIDSTATICCONSTRUCTORS = 229,
MOZOWNINGREF = 230,
MOZPOPDISABLENONTRIVIALUNIONWARNINGS = 231,
MOZPRETENDNORETURNFORSTATICANALYSIS = 232,
MOZPUSHDISABLENONTRIVIALUNIONWARNINGS = 233,
MOZRAII = 234,
MOZREQUIREDBASEMETHOD = 235,
MOZSTACKCLASS = 236,
MOZSTATICCLASS = 237,
MOZSTATICLOCALCLASS = 238,
MOZTEMPORARYCLASS = 239,
MOZTRIVIALCTORDTOR = 240,
MOZTSANBLACKLIST = 241,
MOZUNSAFEREF = 242,
MOZXPCOMABI = 243,
RawStringLiteral = 244,
TranslationUnit = 245,
PreprocInclude = 246,
PreprocDef = 247,
PreprocFunctionDef = 248,
PreprocParams = 249,
PreprocCall = 250,
PreprocIf = 251,
PreprocIfdef = 252,
PreprocElse = 253,
PreprocElif = 254,
PreprocIf2 = 255,
PreprocIfdef2 = 256,
PreprocElse2 = 257,
PreprocElif2 = 258,
PreprocExpression = 259,
ParenthesizedExpression = 260,
PreprocDefined = 261,
UnaryExpression = 262,
CallExpression = 263,
ArgumentList = 264,
BinaryExpression = 265,
FunctionDefinition = 266,
Declaration = 267,
TypeDefinition = 268,
DeclarationSpecifiers = 269,
LinkageSpecification = 270,
AttributeSpecifier = 271,
MsDeclspecModifier = 272,
MsBasedModifier = 273,
MsCallModifier = 274,
MsUnalignedPtrModifier = 275,
MsPointerModifier = 276,
DeclarationList = 277,
Declarator = 278,
FieldDeclarator = 279,
TypeDeclarator = 280,
AbstractDeclarator = 281,
ParenthesizedDeclarator = 282,
ParenthesizedDeclarator2 = 283,
ParenthesizedDeclarator3 = 284,
AbstractParenthesizedDeclarator = 285,
PointerDeclarator = 286,
PointerDeclarator2 = 287,
PointerDeclarator3 = 288,
AbstractPointerDeclarator = 289,
FunctionDeclarator = 290,
FunctionDeclarator2 = 291,
FunctionDeclarator3 = 292,
AbstractFunctionDeclarator = 293,
ArrayDeclarator = 294,
ArrayDeclarator2 = 295,
ArrayDeclarator3 = 296,
AbstractArrayDeclarator = 297,
InitDeclarator = 298,
CompoundStatement = 299,
StorageClassSpecifier = 300,
TypeQualifier = 301,
TypeSpecifier = 302,
SizedTypeSpecifier = 303,
EnumSpecifier = 304,
EnumeratorList = 305,
StructSpecifier = 306,
UnionSpecifier = 307,
FieldDeclarationList = 308,
FieldDeclarationListItem = 309,
FieldDeclaration = 310,
BitfieldClause = 311,
Enumerator = 312,
ParameterList = 313,
ParameterDeclaration = 314,
LabeledStatement = 315,
ExpressionStatement = 316,
IfStatement = 317,
SwitchStatement = 318,
CaseStatement = 319,
WhileStatement = 320,
DoStatement = 321,
ForStatement = 322,
ReturnStatement = 323,
BreakStatement = 324,
ContinueStatement = 325,
GotoStatement = 326,
Expression = 327,
CommaExpression = 328,
ConditionalExpression = 329,
AssignmentExpression = 330,
PointerExpression = 331,
UnaryExpression2 = 332,
BinaryExpression2 = 333,
UpdateExpression = 334,
CastExpression = 335,
TypeDescriptor = 336,
SizeofExpression = 337,
SubscriptExpression = 338,
CallExpression2 = 339,
ArgumentList2 = 340,
FieldExpression = 341,
CompoundLiteralExpression = 342,
ParenthesizedExpression2 = 343,
InitializerList = 344,
InitializerPair = 345,
SubscriptDesignator = 346,
FieldDesignator = 347,
CharLiteral = 348,
ConcatenatedString = 349,
StringLiteral = 350,
EmptyDeclaration = 351,
Decltype = 352,
ClassSpecifier = 353,
ClassName = 354,
VirtualSpecifier = 355,
VirtualFunctionSpecifier = 356,
ExplicitFunctionSpecifier = 357,
BaseClassClause = 358,
EnumBaseClause = 359,
DependentType = 360,
TemplateDeclaration = 361,
TemplateInstantiation = 362,
TemplateParameterList = 363,
TypeParameterDeclaration = 364,
VariadicTypeParameterDeclaration = 365,
OptionalTypeParameterDeclaration = 366,
TemplateTemplateParameterDeclaration = 367,
OptionalParameterDeclaration = 368,
VariadicParameterDeclaration = 369,
VariadicDeclarator = 370,
ReferenceDeclarator = 371,
OperatorCast = 372,
FieldInitializerList = 373,
FieldInitializer = 374,
FunctionDefinition2 = 375,
ConstructorSpecifiers = 376,
FunctionDefinition3 = 377,
Declaration2 = 378,
FunctionDefinition4 = 379,
Declaration3 = 380,
DefaultMethodClause = 381,
DeleteMethodClause = 382,
FriendDeclaration = 383,
AccessSpecifier = 384,
ReferenceDeclarator2 = 385,
ReferenceDeclarator3 = 386,
AbstractReferenceDeclarator = 387,
StructuredBindingDeclarator = 388,
TrailingReturnType = 389,
Noexcept = 390,
ThrowSpecifier = 391,
TemplateType = 392,
TemplateMethod = 393,
TemplateFunction = 394,
TemplateArgumentList = 395,
NamespaceDefinition = 396,
UsingDeclaration = 397,
AliasDeclaration = 398,
StaticAssertDeclaration = 399,
ConditionClause = 400,
Declaration4 = 401,
ForRangeLoop = 402,
ThrowStatement = 403,
TryStatement = 404,
CatchClause = 405,
Attribute = 406,
NewExpression = 407,
NewDeclarator = 408,
DeleteExpression = 409,
LambdaExpression = 410,
LambdaCaptureSpecifier = 411,
LambdaDefaultCapture = 412,
ParameterPackExpansion = 413,
ParameterPackExpansion2 = 414,
DestructorName = 415,
ScopedFieldIdentifier = 416,
ScopedIdentifier = 417,
ScopedTypeIdentifier = 418,
ScopedNamespaceIdentifier = 419,
AloneMacroCall = 420,
CallMacroWithDeclFirstArg = 421,
MacroStatement = 422,
MacroAnnotation = 423,
TranslationUnitRepeat1 = 424,
PreprocParamsRepeat1 = 425,
PreprocIfInFieldDeclarationListRepeat1 = 426,
PreprocArgumentListRepeat1 = 427,
FunctionDefinitionRepeat1 = 428,
DeclarationRepeat1 = 429,
TypeDefinitionRepeat1 = 430,
TypeDefinitionRepeat2 = 431,
DeclarationSpecifiersRepeat1 = 432,
PointerDeclaratorRepeat1 = 433,
FunctionDeclaratorRepeat1 = 434,
FunctionDeclaratorRepeat2 = 435,
AbstractFunctionDeclaratorRepeat1 = 436,
SizedTypeSpecifierRepeat1 = 437,
EnumeratorListRepeat1 = 438,
FieldDeclarationRepeat1 = 439,
ParameterListRepeat1 = 440,
CaseStatementRepeat1 = 441,
ArgumentListRepeat1 = 442,
InitializerListRepeat1 = 443,
InitializerPairRepeat1 = 444,
ConcatenatedStringRepeat1 = 445,
StringLiteralRepeat1 = 446,
BaseClassClauseRepeat1 = 447,
TemplateParameterListRepeat1 = 448,
FieldInitializerListRepeat1 = 449,
StructuredBindingDeclaratorRepeat1 = 450,
ThrowSpecifierRepeat1 = 451,
TemplateArgumentListRepeat1 = 452,
TryStatementRepeat1 = 453,
AttributeRepeat1 = 454,
AloneMacroCallRepeat1 = 455,
FieldIdentifier = 456,
NamespaceIdentifier = 457,
StatementIdentifier = 458,
TypeIdentifier = 459,
Error = 460,
}
#[allow(clippy::unreadable_literal)]
static KEYS: phf::Map<&'static str, Cpp> = ::phf::Map {
key: 3213172566270843353,
disps: ::phf::Slice::Static(&[
(0, 2),
(0, 4),
(0, 4),
(0, 51),
(0, 32),
(1, 127),
(0, 22),
(0, 42),
(0, 1),
(6, 326),
(0, 5),
(0, 1),
(0, 18),
(0, 349),
(0, 47),
(0, 278),
(0, 0),
(0, 144),
(0, 0),
(4, 264),
(0, 0),
(0, 157),
(0, 2),
(0, 0),
(0, 65),
(0, 49),
(0, 208),
(1, 106),
(1, 237),
(0, 1),
(0, 2),
(0, 4),
(0, 36),
(1, 4),
(11, 10),
(0, 3),
(0, 421),
(0, 8),
(0, 201),
(3, 229),
(2, 341),
(0, 6),
(0, 374),
(0, 80),
(0, 1),
(2, 60),
(1, 190),
(0, 0),
(0, 0),
(0, 61),
(0, 48),
(0, 292),
(15, 274),
(0, 240),
(0, 3),
(0, 39),
(0, 135),
(0, 45),
(0, 5),
(1, 65),
(0, 65),
(0, 191),
(4, 373),
(5, 224),
(2, 391),
(0, 14),
(3, 294),
(4, 363),
(0, 74),
(0, 3),
(9, 421),
(0, 99),
(14, 317),
(0, 144),
(20, 266),
(24, 14),
(0, 155),
(0, 57),
(9, 124),
(12, 422),
(0, 133),
(30, 126),
(11, 47),
(0, 174),
(1, 37),
(0, 67),
]),
entries: ::phf::Slice::Static(&[
("\'", Cpp::SQUOTE),
("MOZ_NONNULL", Cpp::MOZNONNULL),
("type_qualifier", Cpp::TypeQualifier),
(
"MOZ_PUSH_DISABLE_NONTRIVIAL_UNION_WARNINGS",
Cpp::MOZPUSHDISABLENONTRIVIALUNIONWARNINGS,
),
("condition_clause", Cpp::ConditionClause),
("_type_specifier", Cpp::TypeSpecifier),
("MOZ_ALLOCATOR", Cpp::MOZALLOCATOR),
(
"optional_type_parameter_declaration",
Cpp::OptionalTypeParameterDeclaration,
),
("subscript_expression", Cpp::SubscriptExpression),
("trailing_return_type", Cpp::TrailingReturnType),
("lambda_default_capture", Cpp::LambdaDefaultCapture),
("labeled_statement", Cpp::LabeledStatement),
("register", Cpp::Register),
("QM_TRY_INSPECT", Cpp::QMTRYINSPECT),
("MOZ_NON_TEMPORARY_CLASS", Cpp::MOZNONTEMPORARYCLASS),
("^=", Cpp::CARETEQ),
("MOZ_TEMPORARY_CLASS", Cpp::MOZTEMPORARYCLASS),
("MOZ_ALLOW_TEMPORARY", Cpp::MOZALLOWTEMPORARY),
(
"MOZ_IS_SMARTPTR_TO_REFCOUNTED",
Cpp::MOZISSMARTPTRTOREFCOUNTED,
),
("_type_declarator", Cpp::TypeDeclarator),
("storage_class_specifier", Cpp::StorageClassSpecifier),
("{", Cpp::LBRACE),
("default_method_clause", Cpp::DefaultMethodClause),
("__clrcall", Cpp::Clrcall),
("_abstract_declarator", Cpp::AbstractDeclarator),
("sizeof", Cpp::Sizeof),
("_expression", Cpp::Expression),
("preproc_params", Cpp::PreprocParams),
("decltype", Cpp::Decltype),
("MOZ_FALLTHROUGH", Cpp::MOZFALLTHROUGH),
("pointer_declarator_repeat1", Cpp::PointerDeclaratorRepeat1),
("MOZ_STATIC_LOCAL_CLASS", Cpp::MOZSTATICLOCALCLASS),
("MOZ_NONNULL_RETURN", Cpp::MOZNONNULLRETURN),
("else", Cpp::Else),
("MOZ_NORETURN", Cpp::MOZNORETURN),
(
"MOZ_NO_SANITIZE_UNSIGNED_OVERFLOW",
Cpp::MOZNOSANITIZEUNSIGNEDOVERFLOW,
),
("type_definition", Cpp::TypeDefinition),
("&&", Cpp::AMPAMP),
("MOZ_OWNING_REF", Cpp::MOZOWNINGREF),
("class_specifier", Cpp::ClassSpecifier),
("preproc_function_def", Cpp::PreprocFunctionDef),
("pointer_expression", Cpp::PointerExpression),
(
"_declaration_specifiers_repeat1",
Cpp::DeclarationSpecifiersRepeat1,
),
("false", Cpp::False),
(
"preproc_argument_list_repeat1",
Cpp::PreprocArgumentListRepeat1,
),
("goto", Cpp::Goto),
("assignment_expression", Cpp::AssignmentExpression),
("MOZ_MUST_USE", Cpp::MOZMUSTUSE),
("throw", Cpp::Throw),
("MOZ_HAVE_ANALYZER_NORETURN", Cpp::MOZHAVEANALYZERNORETURN),
("throw_statement", Cpp::ThrowStatement),
("template", Cpp::Template),
("conditional_expression", Cpp::ConditionalExpression),
("string_literal_repeat1", Cpp::StringLiteralRepeat1),
("reference_declarator", Cpp::ReferenceDeclarator),
("try_statement_repeat1", Cpp::TryStatementRepeat1),
("parenthesized_expression", Cpp::ParenthesizedExpression),
("comment", Cpp::Comment),
("IDB_TRY_UNWRAP", Cpp::IDBTRYUNWRAP),
(
"MOZ_NO_SANITIZE_SIGNED_OVERFLOW",
Cpp::MOZNOSANITIZESIGNEDOVERFLOW,
),
("using", Cpp::Using),
(
"MOZ_PRETEND_NORETURN_FOR_STATIC_ANALYSIS",
Cpp::MOZPRETENDNORETURNFORSTATICANALYSIS,
),
("char_literal", Cpp::CharLiteral),
("template_function", Cpp::TemplateFunction),
("u\\\"", Cpp::UDQUOTE),
(
"MOZ_NO_ARITHMETIC_EXPR_IN_ARGUMENT",
Cpp::MOZNOARITHMETICEXPRINARGUMENT,
),
("parameter_declaration", Cpp::ParameterDeclaration),
("continue", Cpp::Continue),
("<=", Cpp::LTEQ),
("MOZ_HAVE_NO_SANITIZE_ATTR", Cpp::MOZHAVENOSANITIZEATTR),
("lambda_capture_specifier", Cpp::LambdaCaptureSpecifier),
("namespace_definition", Cpp::NamespaceDefinition),
("FORWARD_SET_ATTRIBUTE", Cpp::FORWARDSETATTRIBUTE),
(
"template_argument_list_repeat1",
Cpp::TemplateArgumentListRepeat1,
),
(
"MOZ_NO_ADDREF_RELEASE_ON_RETURN",
Cpp::MOZNOADDREFRELEASEONRETURN,
),
("scoped_field_identifier", Cpp::ScopedFieldIdentifier),
("ERROR", Cpp::Error),
("primitive_type", Cpp::PrimitiveType),
("escape_sequence", Cpp::EscapeSequence),
("sizeof_expression", Cpp::SizeofExpression),
("catch", Cpp::Catch),
("new_expression", Cpp::NewExpression),
("__fastcall", Cpp::Fastcall),
("signed", Cpp::Signed),
("initializer_list_repeat1", Cpp::InitializerListRepeat1),
("MOZ_NON_MEMMOVABLE", Cpp::MOZNONMEMMOVABLE),
("MOZ_NEVER_INLINE_DEBUG", Cpp::MOZNEVERINLINEDEBUG),
("union_specifier", Cpp::UnionSpecifier),
("QM_NOTEONLY_TRY_UNWRAP", Cpp::QMNOTEONLYTRYUNWRAP),
(
"function_declarator_repeat1",
Cpp::FunctionDeclaratorRepeat1,
),
("preproc_ifdef", Cpp::PreprocIfdef),
("^", Cpp::CARET),
(
"abstract_reference_declarator",
Cpp::AbstractReferenceDeclarator,
),
("for", Cpp::For),
("MOZ_NEEDS_MEMMOVABLE_TYPE", Cpp::MOZNEEDSMEMMOVABLETYPE),
("-=", Cpp::DASHEQ),
("template_argument_list", Cpp::TemplateArgumentList),
("namespace_identifier", Cpp::NamespaceIdentifier),
("MOZ_IS_REFPTR", Cpp::MOZISREFPTR),
("attribute", Cpp::Attribute),
("ms_unaligned_ptr_modifier", Cpp::MsUnalignedPtrModifier),
(
"MOZ_MUST_RETURN_FROM_CALLER_IF_THIS_IS_ARG",
Cpp::MOZMUSTRETURNFROMCALLERIFTHISISARG,
),
("operator_cast", Cpp::OperatorCast),
("operator_name", Cpp::OperatorName),
("argument_list", Cpp::ArgumentList),
("string_literal_token1", Cpp::StringLiteralToken1),
("}", Cpp::RBRACE),
(
"MOZ_HAVE_UNSIGNED_OVERFLOW_SANITIZE_ATTR",
Cpp::MOZHAVEUNSIGNEDOVERFLOWSANITIZEATTR,
),
("system_lib_string", Cpp::SystemLibString),
(
"structured_binding_declarator_repeat1",
Cpp::StructuredBindingDeclaratorRepeat1,
),
("#define", Cpp::HASHdefine),
("scoped_identifier", Cpp::ScopedIdentifier),
("MOZ_HEAP_ALLOCATOR", Cpp::MOZHEAPALLOCATOR),
("_constructor_specifiers", Cpp::ConstructorSpecifiers),
("binary_expression", Cpp::BinaryExpression),
("&", Cpp::AMP),
("return_statement", Cpp::ReturnStatement),
("initializer_pair_repeat1", Cpp::InitializerPairRepeat1),
("==", Cpp::EQEQ),
("alone_macro_call", Cpp::AloneMacroCall),
(
"abstract_function_declarator_repeat1",
Cpp::AbstractFunctionDeclaratorRepeat1,
),
("type_identifier", Cpp::TypeIdentifier),
("#include", Cpp::HASHinclude),
("<<=", Cpp::LTLTEQ),
(
"function_declarator_repeat2",
Cpp::FunctionDeclaratorRepeat2,
),
("compound_statement", Cpp::CompoundStatement),
("%", Cpp::PERCENT),
("MOZ_MUST_USE_TYPE", Cpp::MOZMUSTUSETYPE),
("function_definition", Cpp::FunctionDefinition),
("MOZ_XPCOM_ABI", Cpp::MOZXPCOMABI),
("MOZ_UNSAFE_REF", Cpp::MOZUNSAFEREF),
("parameter_pack_expansion", Cpp::ParameterPackExpansion),
("auto", Cpp::Auto),
("protected", Cpp::Protected),
("using_declaration", Cpp::UsingDeclaration),
("dependent_type", Cpp::DependentType),
("parameter_list_repeat1", Cpp::ParameterListRepeat1),
("SDB_TRY_UNWRAP", Cpp::SDBTRYUNWRAP),
("__stdcall", Cpp::Stdcall),
("#else", Cpp::HASHelse),
("IDB_TRY_INSPECT", Cpp::IDBTRYINSPECT),
("override", Cpp::Override),
("+", Cpp::PLUS),
("u\'", Cpp::USQUOTE),
("while_statement", Cpp::WhileStatement),
("sized_type_specifier", Cpp::SizedTypeSpecifier),
("MOZ_HAVE_ASAN_BLACKLIST", Cpp::MOZHAVEASANBLACKLIST),
("preproc_arg", Cpp::PreprocArg),
("PS_GET", Cpp::PSGET),
(
"_call_macro_with_decl_first_arg",
Cpp::CallMacroWithDeclFirstArg,
),
("if", Cpp::If),
("/=", Cpp::SLASHEQ),
("__thiscall", Cpp::Thiscall),
("SDB_TRY_INSPECT", Cpp::SDBTRYINSPECT),
("long", Cpp::Long),
("subscript_designator", Cpp::SubscriptDesignator),
("switch", Cpp::Switch),
("_enum_base_clause", Cpp::EnumBaseClause),
("field_declaration_repeat1", Cpp::FieldDeclarationRepeat1),
("QM_WARNONLY_TRY_UNWRAP", Cpp::QMWARNONLYTRYUNWRAP),
("catch_clause", Cpp::CatchClause),
("MOZ_STACK_CLASS", Cpp::MOZSTACKCLASS),
("char_literal_token1", Cpp::CharLiteralToken1),
("MOZ_HEAP_CLASS", Cpp::MOZHEAPCLASS),
("field_initializer", Cpp::FieldInitializer),
("virtual", Cpp::Virtual),
("parenthesized_declarator", Cpp::ParenthesizedDeclarator),
("*", Cpp::STAR),
("MOZ_NEEDS_NO_VTABLE_TYPE", Cpp::MOZNEEDSNOVTABLETYPE),
(
"compound_literal_expression",
Cpp::CompoundLiteralExpression,
),
("||", Cpp::PIPEPIPE),
("MOZ_HAVE_NORETURN", Cpp::MOZHAVENORETURN),
("static", Cpp::Static),
("|=", Cpp::PIPEEQ),
("MOZ_MUST_OVERRIDE", Cpp::MOZMUSTOVERRIDE),
("!=", Cpp::BANGEQ),
("FORWARD", Cpp::FORWARD),
("[", Cpp::LBRACK),
("throw_specifier_repeat1", Cpp::ThrowSpecifierRepeat1),
("MOZ_FORMAT_PRINTF", Cpp::MOZFORMATPRINTF),
("__cdecl", Cpp::Cdecl),
("do_statement", Cpp::DoStatement),
("class", Cpp::Class),
("final", Cpp::Final),
("MOZ_NON_AUTOABLE", Cpp::MOZNONAUTOABLE),
("template_type", Cpp::TemplateType),
(",", Cpp::COMMA),
("template_method", Cpp::TemplateMethod),
("argument_list_repeat1", Cpp::ArgumentListRepeat1),
("base_class_clause", Cpp::BaseClassClause),
("pointer_declarator", Cpp::PointerDeclarator),
("nullptr", Cpp::Nullptr),
("preproc_else", Cpp::PreprocElse),
("comma_expression", Cpp::CommaExpression),
("MOZ_NON_PARAM", Cpp::MOZNONPARAM),
(
"MOZ_NO_DANGLING_ON_TEMPORARIES",
Cpp::MOZNODANGLINGONTEMPORARIES,
),
("base_class_clause_repeat1", Cpp::BaseClassClauseRepeat1),
("PS_GET_AND_SET", Cpp::PSGETANDSET),
("raw_string_literal", Cpp::RawStringLiteral),
("CACHE_TRY_UNWRAP", Cpp::CACHETRYUNWRAP),
("template_declaration", Cpp::TemplateDeclaration),
("preproc_if", Cpp::PreprocIf),
("--", Cpp::DASHDASH),
(">>", Cpp::GTGT),
("MOZ_TSAN_BLACKLIST", Cpp::MOZTSANBLACKLIST),
("try_statement", Cpp::TryStatement),
("#endif", Cpp::HASHendif),
("unary_expression", Cpp::UnaryExpression),
(
"MOZ_MAY_CALL_AFTER_MUST_RETURN",
Cpp::MOZMAYCALLAFTERMUSTRETURN,
),
("MOZ_ALWAYS_INLINE", Cpp::MOZALWAYSINLINE),
("cast_expression", Cpp::CastExpression),
("translation_unit", Cpp::TranslationUnit),
("_empty_declaration", Cpp::EmptyDeclaration),
("alias_declaration", Cpp::AliasDeclaration),
("/", Cpp::SLASH),
(
"MOZ_CAN_RUN_SCRIPT_FOR_DEFINITION",
Cpp::MOZCANRUNSCRIPTFORDEFINITION,
),
("function_declarator", Cpp::FunctionDeclarator),
("throw_specifier", Cpp::ThrowSpecifier),
("static_assert_declaration", Cpp::StaticAssertDeclaration),
("template_parameter_list", Cpp::TemplateParameterList),
("volatile", Cpp::Volatile),
("(", Cpp::LPAREN),
("++", Cpp::PLUSPLUS),
("friend", Cpp::Friend),
("if_statement", Cpp::IfStatement),
("MOZ_NORETURN_PTR", Cpp::MOZNORETURNPTR),
("try", Cpp::Try),
("for_statement", Cpp::ForStatement),
("attribute_repeat1", Cpp::AttributeRepeat1),
("type_parameter_declaration", Cpp::TypeParameterDeclaration),
("switch_statement", Cpp::SwitchStatement),
(")", Cpp::RPAREN),
("short", Cpp::Short),
("MOZ_NEVER_INLINE", Cpp::MOZNEVERINLINE),
("virtual_function_specifier", Cpp::VirtualFunctionSpecifier),
("preproc_defined", Cpp::PreprocDefined),
("lambda_expression", Cpp::LambdaExpression),
("...", Cpp::DOTDOTDOT),
("ms_declspec_modifier", Cpp::MsDeclspecModifier),
(
"sized_type_specifier_repeat1",
Cpp::SizedTypeSpecifierRepeat1,
),
(
"preproc_if_in_field_declaration_list_repeat1",
Cpp::PreprocIfInFieldDeclarationListRepeat1,
),
("call_expression", Cpp::CallExpression),
("_declarator", Cpp::Declarator),
(">>=", Cpp::GTGTEQ),
(
"MOZ_ALWAYS_INLINE_EVEN_DEBUG",
Cpp::MOZALWAYSINLINEEVENDEBUG,
),
("identifier", Cpp::Identifier),
("struct_specifier", Cpp::StructSpecifier),
("#ifndef", Cpp::HASHifndef),
("default", Cpp::Default),
("MOZ_STATIC_CLASS", Cpp::MOZSTATICCLASS),
("case_statement", Cpp::CaseStatement),
("null", Cpp::Null),
("L\'", Cpp::LSQUOTE),
("delete_method_clause", Cpp::DeleteMethodClause),
("abstract_array_declarator", Cpp::AbstractArrayDeclarator),
(
"MOZ_DECL_USE_GUARD_OBJECT_NOTIFIER",
Cpp::MOZDECLUSEGUARDOBJECTNOTIFIER,
),
(
"_field_declaration_list_item",
Cpp::FieldDeclarationListItem,
),
("QM_TRY_UNWRAP", Cpp::QMTRYUNWRAP),
("public", Cpp::Public),
("ms_unsigned_ptr_modifier", Cpp::MsUnsignedPtrModifier),
("ms_call_modifier", Cpp::MsCallModifier),
(
"MOZ_HAVE_SIGNED_OVERFLOW_SANITIZE_ATTR",
Cpp::MOZHAVESIGNEDOVERFLOWSANITIZEATTR,
),
("friend_declaration", Cpp::FriendDeclaration),
("::", Cpp::COLONCOLON),
("init_declarator", Cpp::InitDeclarator),
("macro_statement", Cpp::MacroStatement),
("<<", Cpp::LTLT),
("%=", Cpp::PERCENTEQ),
("preproc_elif", Cpp::PreprocElif),
("struct", Cpp::Struct),
("do", Cpp::Do),
("_declaration_specifiers", Cpp::DeclarationSpecifiers),
(
"function_definition_repeat1",
Cpp::FunctionDefinitionRepeat1,
),
("translation_unit_repeat1", Cpp::TranslationUnitRepeat1),
("enumerator_list", Cpp::EnumeratorList),
("field_identifier", Cpp::FieldIdentifier),
("MOZ_INIT_OUTSIDE_CTOR", Cpp::MOZINITOUTSIDECTOR),
("constexpr", Cpp::Constexpr),
("bitfield_clause", Cpp::BitfieldClause),
("_class_name", Cpp::ClassName),
("PS_GET_LOCKLESS", Cpp::PSGETLOCKLESS),
(
"structured_binding_declarator",
Cpp::StructuredBindingDeclarator,
),
("case_statement_repeat1", Cpp::CaseStatementRepeat1),
("type_definition_repeat1", Cpp::TypeDefinitionRepeat1),
(
"field_initializer_list_repeat1",
Cpp::FieldInitializerListRepeat1,
),
("break_statement", Cpp::BreakStatement),
("variadic_declarator", Cpp::VariadicDeclarator),
("preproc_directive", Cpp::PreprocDirective),
("declaration", Cpp::Declaration),
("<", Cpp::LT),
("initializer_pair", Cpp::InitializerPair),
("L\\\"", Cpp::LDQUOTE),
("MOZ_HAVE_NORETURN_PTR", Cpp::MOZHAVENORETURNPTR),
("explicit", Cpp::Explicit),
("mutable", Cpp::Mutable),
("MOZ_REQUIRED_BASE_METHOD", Cpp::MOZREQUIREDBASEMETHOD),
("field_initializer_list", Cpp::FieldInitializerList),
("type_definition_repeat2", Cpp::TypeDefinitionRepeat2),
("]]", Cpp::RBRACKRBRACK),
("ms_based_modifier", Cpp::MsBasedModifier),
("preproc_def", Cpp::PreprocDef),
("enum", Cpp::Enum),
("_unaligned", Cpp::Unaligned),
("__vectorcall", Cpp::Vectorcall),
("MOZ_CAN_RUN_SCRIPT_BOUNDARY", Cpp::MOZCANRUNSCRIPTBOUNDARY),
("MOZ_MAYBE_UNUSED", Cpp::MOZMAYBEUNUSED),
("alone_macro_call_repeat1", Cpp::AloneMacroCallRepeat1),
("this", Cpp::This),
("linkage_specification", Cpp::LinkageSpecification),
("!", Cpp::BANG),
("static_assert", Cpp::StaticAssert),
("macro_annotation", Cpp::MacroAnnotation),
("parameter_list", Cpp::ParameterList),
(
"MOZ_POP_DISABLE_NONTRIVIAL_UNION_WARNINGS",
Cpp::MOZPOPDISABLENONTRIVIALUNIONWARNINGS,
),
("type_descriptor", Cpp::TypeDescriptor),
("enumerator", Cpp::Enumerator),
("expression_statement", Cpp::ExpressionStatement),
("u8\\\"", Cpp::U8DQUOTE),
("LS_TRY_INSPECT", Cpp::LSTRYINSPECT),
(".", Cpp::DOT),
("alone_macro_call_token1", Cpp::AloneMacroCallToken1),
("preproc_include", Cpp::PreprocInclude),
("concatenated_string", Cpp::ConcatenatedString),
("delete", Cpp::Delete),
("array_declarator", Cpp::ArrayDeclarator),
("ms_pointer_modifier", Cpp::MsPointerModifier),
("unsigned", Cpp::Unsigned),
("declaration_repeat1", Cpp::DeclarationRepeat1),
("[[", Cpp::LBRACKLBRACK),
(">=", Cpp::GTEQ),
("u8\'", Cpp::U8SQUOTE),
("update_expression", Cpp::UpdateExpression),
("virtual_specifier", Cpp::VirtualSpecifier),
("#ifdef", Cpp::HASHifdef),
(
"template_parameter_list_repeat1",
Cpp::TemplateParameterListRepeat1,
),
("_preproc_expression", Cpp::PreprocExpression),
("MOZ_CAN_RUN_SCRIPT", Cpp::MOZCANRUNSCRIPT),
("#if", Cpp::HASHif),
("typedef", Cpp::Typedef),
("preproc_params_repeat1", Cpp::PreprocParamsRepeat1),
("continue_statement", Cpp::ContinueStatement),
("typename", Cpp::Typename),
(
"explicit_function_specifier",
Cpp::ExplicitFunctionSpecifier,
),
(
"MOZ_ONLY_USED_TO_AVOID_STATIC_CONSTRUCTORS",
Cpp::MOZONLYUSEDTOAVOIDSTATICCONSTRUCTORS,
),
(
"scoped_namespace_identifier",
Cpp::ScopedNamespaceIdentifier,
),
("ms_signed_ptr_modifier", Cpp::MsSignedPtrModifier),
("string_literal", Cpp::StringLiteral),
("while", Cpp::While),
(
"optional_parameter_declaration",
Cpp::OptionalParameterDeclaration,
),
(
"abstract_pointer_declarator",
Cpp::AbstractPointerDeclarator,
),
("template_instantiation", Cpp::TemplateInstantiation),
("restrict", Cpp::Restrict),
("~", Cpp::TILDE),
("namespace", Cpp::Namespace),
("break", Cpp::Break),
("LS_TRY_UNWRAP", Cpp::LSTRYUNWRAP),
("MOZ_NONHEAP_CLASS", Cpp::MOZNONHEAPCLASS),
("initializer_list", Cpp::InitializerList),
("scoped_type_identifier", Cpp::ScopedTypeIdentifier),
("MOZ_IS_CLASS_INIT", Cpp::MOZISCLASSINIT),
("+=", Cpp::PLUSEQ),
("_field_declarator", Cpp::FieldDeclarator),
("CACHE_TRY_INSPECT", Cpp::CACHETRYINSPECT),
("extern", Cpp::Extern),
(
"template_template_parameter_declaration",
Cpp::TemplateTemplateParameterDeclaration,
),
(
"variadic_parameter_declaration",
Cpp::VariadicParameterDeclaration,
),
("MOZ_TRIVIAL_CTOR_DTOR", Cpp::MOZTRIVIALCTORDTOR),
("&=", Cpp::AMPEQ),
("?", Cpp::QMARK),
("__based", Cpp::Based),
("-", Cpp::DASH),
("union", Cpp::Union),
("delete_expression", Cpp::DeleteExpression),
("statement_identifier", Cpp::StatementIdentifier),
(
"variadic_type_parameter_declaration",
Cpp::VariadicTypeParameterDeclaration,
),
("number_literal", Cpp::NumberLiteral),
("inline", Cpp::Inline),
("=", Cpp::EQ),
("new", Cpp::New),
("->", Cpp::DASHGT),
("preproc_call", Cpp::PreprocCall),
("enum_specifier", Cpp::EnumSpecifier),
("true", Cpp::True),
("access_specifier", Cpp::AccessSpecifier),
("for_range_loop", Cpp::ForRangeLoop),
("operator", Cpp::Operator),
("alone_macro", Cpp::AloneMacro),
(":", Cpp::COLON),
("destructor_name", Cpp::DestructorName),
(
"MOZ_NEEDS_MEMMOVABLE_MEMBERS",
Cpp::MOZNEEDSMEMMOVABLEMEMBERS,
),
("*=", Cpp::STAREQ),
("|", Cpp::PIPE),
("]", Cpp::RBRACK),
("MOZ_RAII", Cpp::MOZRAII),
(">", Cpp::GT),
("\\n", Cpp::LF),
(
"abstract_function_declarator",
Cpp::AbstractFunctionDeclarator,
),
("field_expression", Cpp::FieldExpression),
("__declspec", Cpp::Declspec),
("declaration_list", Cpp::DeclarationList),
("end", Cpp::End),
("case", Cpp::Case),
("MOZ_COLD", Cpp::MOZCOLD),
("noexcept", Cpp::Noexcept),
(";", Cpp::SEMI),
(
"MOZ_INHERIT_TYPE_ANNOTATIONS_FROM_TEMPLATE_ARGS",
Cpp::MOZINHERITTYPEANNOTATIONSFROMTEMPLATEARGS,
),
("MOZ_HAVE_NEVER_INLINE", Cpp::MOZHAVENEVERINLINE),
("field_declaration", Cpp::FieldDeclaration),
("field_designator", Cpp::FieldDesignator),
("MOZ_IMPLICIT", Cpp::MOZIMPLICIT),
(
"abstract_parenthesized_declarator",
Cpp::AbstractParenthesizedDeclarator,
),
("attribute_specifier", Cpp::AttributeSpecifier),
("return", Cpp::Return),
("MOZ_ASAN_BLACKLIST", Cpp::MOZASANBLACKLIST),
("new_declarator", Cpp::NewDeclarator),
("\\\"", Cpp::DQUOTE),
("const", Cpp::Const),
("_Atomic", Cpp::Atomic),
("goto_statement", Cpp::GotoStatement),
("enumerator_list_repeat1", Cpp::EnumeratorListRepeat1),
("MOZ_NON_OWNING_REF", Cpp::MOZNONOWNINGREF),
("field_declaration_list", Cpp::FieldDeclarationList),
("#elif", Cpp::HASHelif),
("ms_restrict_modifier", Cpp::MsRestrictModifier),
("defined", Cpp::Defined),
("private", Cpp::Private),
(
"concatenated_string_repeat1",
Cpp::ConcatenatedStringRepeat1,
),
]),
};
impl From<&str> for Cpp {
#[inline(always)]
fn from(key: &str) -> Self {
KEYS.get(key).unwrap().clone()
}
}
impl From<u16> for Cpp {
#[inline(always)]
fn from(x: u16) -> Self {
num::FromPrimitive::from_u16(x).unwrap_or(Self::Error)
}
}
impl PartialEq<u16> for Cpp {
#[inline(always)]
fn eq(&self, x: &u16) -> bool {
*self == Cpp::from(*x)
}
}
impl PartialEq<Cpp> for u16 {
#[inline(always)]
fn eq(&self, x: &Cpp) -> bool {
*x == *self
}
}