#[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,
JSPUBLICAPI = 244,
RawStringLiteral = 245,
TranslationUnit = 246,
PreprocInclude = 247,
PreprocDef = 248,
PreprocFunctionDef = 249,
PreprocParams = 250,
PreprocCall = 251,
PreprocIf = 252,
PreprocIfdef = 253,
PreprocElse = 254,
PreprocElif = 255,
PreprocIf2 = 256,
PreprocIfdef2 = 257,
PreprocElse2 = 258,
PreprocElif2 = 259,
PreprocExpression = 260,
ParenthesizedExpression = 261,
PreprocDefined = 262,
UnaryExpression = 263,
CallExpression = 264,
ArgumentList = 265,
BinaryExpression = 266,
FunctionDefinition = 267,
Declaration = 268,
TypeDefinition = 269,
DeclarationSpecifiers = 270,
LinkageSpecification = 271,
AttributeSpecifier = 272,
MsDeclspecModifier = 273,
MsBasedModifier = 274,
MsCallModifier = 275,
MsUnalignedPtrModifier = 276,
MsPointerModifier = 277,
DeclarationList = 278,
Declarator = 279,
FieldDeclarator = 280,
TypeDeclarator = 281,
AbstractDeclarator = 282,
ParenthesizedDeclarator = 283,
ParenthesizedDeclarator2 = 284,
ParenthesizedDeclarator3 = 285,
AbstractParenthesizedDeclarator = 286,
PointerDeclarator = 287,
PointerDeclarator2 = 288,
PointerDeclarator3 = 289,
AbstractPointerDeclarator = 290,
FunctionDeclarator = 291,
FunctionDeclarator2 = 292,
FunctionDeclarator3 = 293,
AbstractFunctionDeclarator = 294,
ArrayDeclarator = 295,
ArrayDeclarator2 = 296,
ArrayDeclarator3 = 297,
AbstractArrayDeclarator = 298,
InitDeclarator = 299,
CompoundStatement = 300,
StorageClassSpecifier = 301,
TypeQualifier = 302,
TypeSpecifier = 303,
SizedTypeSpecifier = 304,
EnumSpecifier = 305,
EnumeratorList = 306,
StructSpecifier = 307,
UnionSpecifier = 308,
FieldDeclarationList = 309,
FieldDeclarationListItem = 310,
FieldDeclaration = 311,
BitfieldClause = 312,
Enumerator = 313,
ParameterList = 314,
ParameterDeclaration = 315,
LabeledStatement = 316,
ExpressionStatement = 317,
IfStatement = 318,
SwitchStatement = 319,
CaseStatement = 320,
WhileStatement = 321,
DoStatement = 322,
ForStatement = 323,
ReturnStatement = 324,
BreakStatement = 325,
ContinueStatement = 326,
GotoStatement = 327,
Expression = 328,
CommaExpression = 329,
ConditionalExpression = 330,
AssignmentExpression = 331,
PointerExpression = 332,
UnaryExpression2 = 333,
BinaryExpression2 = 334,
UpdateExpression = 335,
CastExpression = 336,
TypeDescriptor = 337,
SizeofExpression = 338,
SubscriptExpression = 339,
CallExpression2 = 340,
ArgumentList2 = 341,
FieldExpression = 342,
CompoundLiteralExpression = 343,
ParenthesizedExpression2 = 344,
InitializerList = 345,
InitializerPair = 346,
SubscriptDesignator = 347,
FieldDesignator = 348,
CharLiteral = 349,
ConcatenatedString = 350,
StringLiteral = 351,
EmptyDeclaration = 352,
Decltype = 353,
ClassSpecifier = 354,
ClassName = 355,
VirtualSpecifier = 356,
VirtualFunctionSpecifier = 357,
ExplicitFunctionSpecifier = 358,
BaseClassClause = 359,
EnumBaseClause = 360,
DependentType = 361,
TemplateDeclaration = 362,
TemplateInstantiation = 363,
TemplateParameterList = 364,
TypeParameterDeclaration = 365,
VariadicTypeParameterDeclaration = 366,
OptionalTypeParameterDeclaration = 367,
TemplateTemplateParameterDeclaration = 368,
OptionalParameterDeclaration = 369,
VariadicParameterDeclaration = 370,
VariadicDeclarator = 371,
ReferenceDeclarator = 372,
OperatorCast = 373,
FieldInitializerList = 374,
FieldInitializer = 375,
FunctionDefinition2 = 376,
ConstructorSpecifiers = 377,
FunctionDefinition3 = 378,
Declaration2 = 379,
FunctionDefinition4 = 380,
Declaration3 = 381,
DefaultMethodClause = 382,
DeleteMethodClause = 383,
FriendDeclaration = 384,
AccessSpecifier = 385,
ReferenceDeclarator2 = 386,
ReferenceDeclarator3 = 387,
AbstractReferenceDeclarator = 388,
StructuredBindingDeclarator = 389,
TrailingReturnType = 390,
Noexcept = 391,
ThrowSpecifier = 392,
TemplateType = 393,
TemplateMethod = 394,
TemplateFunction = 395,
TemplateArgumentList = 396,
NamespaceDefinition = 397,
UsingDeclaration = 398,
AliasDeclaration = 399,
StaticAssertDeclaration = 400,
ConditionClause = 401,
Declaration4 = 402,
ForRangeLoop = 403,
ThrowStatement = 404,
TryStatement = 405,
CatchClause = 406,
Attribute = 407,
NewExpression = 408,
NewDeclarator = 409,
DeleteExpression = 410,
LambdaExpression = 411,
LambdaCaptureSpecifier = 412,
LambdaDefaultCapture = 413,
ParameterPackExpansion = 414,
ParameterPackExpansion2 = 415,
DestructorName = 416,
ScopedFieldIdentifier = 417,
ScopedIdentifier = 418,
ScopedTypeIdentifier = 419,
ScopedNamespaceIdentifier = 420,
AloneMacroCall = 421,
CallMacroWithDeclFirstArg = 422,
MacroStatement = 423,
MacroAnnotation = 424,
TranslationUnitRepeat1 = 425,
PreprocParamsRepeat1 = 426,
PreprocIfInFieldDeclarationListRepeat1 = 427,
PreprocArgumentListRepeat1 = 428,
FunctionDefinitionRepeat1 = 429,
DeclarationRepeat1 = 430,
TypeDefinitionRepeat1 = 431,
TypeDefinitionRepeat2 = 432,
DeclarationSpecifiersRepeat1 = 433,
PointerDeclaratorRepeat1 = 434,
FunctionDeclaratorRepeat1 = 435,
FunctionDeclaratorRepeat2 = 436,
AbstractFunctionDeclaratorRepeat1 = 437,
SizedTypeSpecifierRepeat1 = 438,
EnumeratorListRepeat1 = 439,
FieldDeclarationRepeat1 = 440,
ParameterListRepeat1 = 441,
CaseStatementRepeat1 = 442,
ArgumentListRepeat1 = 443,
InitializerListRepeat1 = 444,
InitializerPairRepeat1 = 445,
ConcatenatedStringRepeat1 = 446,
StringLiteralRepeat1 = 447,
ClassSpecifierRepeat1 = 448,
BaseClassClauseRepeat1 = 449,
TemplateParameterListRepeat1 = 450,
FieldInitializerListRepeat1 = 451,
StructuredBindingDeclaratorRepeat1 = 452,
ThrowSpecifierRepeat1 = 453,
TemplateArgumentListRepeat1 = 454,
TryStatementRepeat1 = 455,
AttributeRepeat1 = 456,
AloneMacroCallRepeat1 = 457,
FieldIdentifier = 458,
NamespaceIdentifier = 459,
StatementIdentifier = 460,
TypeIdentifier = 461,
Error = 462,
}
impl From<Cpp> for &'static str {
#[inline(always)]
fn from(tok: Cpp) -> Self {
match tok {
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::CACHETRYINSPECT => "CACHE_TRY_INSPECT",
Cpp::CACHETRYUNWRAP => "CACHE_TRY_UNWRAP",
Cpp::FORWARD => "FORWARD",
Cpp::FORWARDSETATTRIBUTE => "FORWARD_SET_ATTRIBUTE",
Cpp::IDBTRYINSPECT => "IDB_TRY_INSPECT",
Cpp::IDBTRYUNWRAP => "IDB_TRY_UNWRAP",
Cpp::LSTRYINSPECT => "LS_TRY_INSPECT",
Cpp::LSTRYUNWRAP => "LS_TRY_UNWRAP",
Cpp::SDBTRYINSPECT => "SDB_TRY_INSPECT",
Cpp::SDBTRYUNWRAP => "SDB_TRY_UNWRAP",
Cpp::PSGET => "PS_GET",
Cpp::PSGETANDSET => "PS_GET_AND_SET",
Cpp::PSGETLOCKLESS => "PS_GET_LOCKLESS",
Cpp::QMTRYINSPECT => "QM_TRY_INSPECT",
Cpp::QMNOTEONLYTRYUNWRAP => "QM_NOTEONLY_TRY_UNWRAP",
Cpp::QMTRYUNWRAP => "QM_TRY_UNWRAP",
Cpp::QMWARNONLYTRYUNWRAP => "QM_WARNONLY_TRY_UNWRAP",
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::JSPUBLICAPI => "JS_PUBLIC_API",
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::ConstructorSpecifiers => "_constructor_specifiers",
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::CallMacroWithDeclFirstArg => "_call_macro_with_decl_first_arg",
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::ClassSpecifierRepeat1 => "class_specifier_repeat1",
Cpp::BaseClassClauseRepeat1 => "base_class_clause_repeat1",
Cpp::TemplateParameterListRepeat1 => "template_parameter_list_repeat1",
Cpp::FieldInitializerListRepeat1 => "field_initializer_list_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",
}
}
}
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
}
}