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