1#![allow(clippy::match_same_arms, clippy::too_many_lines)]
4#![allow(missing_docs)]
7
8use num_derive::FromPrimitive;
11
12#[derive(Clone, Debug, PartialEq, Eq, FromPrimitive)]
13pub enum Cpp {
14 End = 0,
15 Identifier = 1,
16 HASHinclude = 2,
17 PreprocIncludeToken2 = 3,
18 HASHdefine = 4,
19 LPAREN = 5,
20 DOTDOTDOT = 6,
21 COMMA = 7,
22 RPAREN = 8,
23 HASHif = 9,
24 LF = 10,
25 HASHendif = 11,
26 HASHifdef = 12,
27 HASHifndef = 13,
28 HASHelse = 14,
29 HASHelif = 15,
30 HASHelifdef = 16,
31 HASHelifndef = 17,
32 PreprocArg = 18,
33 PreprocDirective = 19,
34 LPAREN2 = 20,
35 Defined = 21,
36 BANG = 22,
37 TILDE = 23,
38 DASH = 24,
39 PLUS = 25,
40 STAR = 26,
41 SLASH = 27,
42 PERCENT = 28,
43 PIPEPIPE = 29,
44 AMPAMP = 30,
45 PIPE = 31,
46 CARET = 32,
47 AMP = 33,
48 EQEQ = 34,
49 BANGEQ = 35,
50 GT = 36,
51 GTEQ = 37,
52 LTEQ = 38,
53 LT = 39,
54 LTLT = 40,
55 GTGT = 41,
56 SEMI = 42,
57 Extension = 43,
58 Typedef = 44,
59 Virtual = 45,
60 Extern = 46,
61 Attribute2 = 47,
62 Attribute3 = 48,
63 COLONCOLON = 49,
64 LBRACKLBRACK = 50,
65 RBRACKRBRACK = 51,
66 Declspec = 52,
67 Based = 53,
68 Cdecl = 54,
69 Clrcall = 55,
70 Stdcall = 56,
71 Fastcall = 57,
72 Thiscall = 58,
73 Vectorcall = 59,
74 MsRestrictModifier = 60,
75 MsUnsignedPtrModifier = 61,
76 MsSignedPtrModifier = 62,
77 Unaligned = 63,
78 Unaligned2 = 64,
79 LBRACE = 65,
80 RBRACE = 66,
81 Signed = 67,
82 Unsigned = 68,
83 Long = 69,
84 Short = 70,
85 LBRACK = 71,
86 Static = 72,
87 RBRACK = 73,
88 EQ = 74,
89 Register = 75,
90 Inline = 76,
91 Inline2 = 77,
92 Inline3 = 78,
93 Forceinline = 79,
94 ThreadLocal = 80,
95 Thread = 81,
96 Const = 82,
97 Constexpr = 83,
98 Volatile = 84,
99 Restrict = 85,
100 Restrict2 = 86,
101 Atomic = 87,
102 Noreturn = 88,
103 Noreturn2 = 89,
104 Nonnull = 90,
105 Mutable = 91,
106 Constinit = 92,
107 Consteval = 93,
108 Alignas = 94,
109 Alignas2 = 95,
110 PrimitiveType = 96,
111 Enum = 97,
112 Class = 98,
113 Struct = 99,
114 Union = 100,
115 COLON = 101,
116 If = 102,
117 Else = 103,
118 Switch = 104,
119 Case = 105,
120 Default = 106,
121 While = 107,
122 Do = 108,
123 For = 109,
124 Return = 110,
125 Break = 111,
126 Continue = 112,
127 Goto = 113,
128 Try = 114,
129 Except = 115,
130 Finally = 116,
131 Leave = 117,
132 QMARK = 118,
133 STAREQ = 119,
134 SLASHEQ = 120,
135 PERCENTEQ = 121,
136 PLUSEQ = 122,
137 DASHEQ = 123,
138 LTLTEQ = 124,
139 GTGTEQ = 125,
140 AMPEQ = 126,
141 CARETEQ = 127,
142 PIPEEQ = 128,
143 AndEq = 129,
144 OrEq = 130,
145 XorEq = 131,
146 Not = 132,
147 Compl = 133,
148 LTEQGT = 134,
149 Or = 135,
150 And = 136,
151 Bitor = 137,
152 Xor = 138,
153 Bitand = 139,
154 NotEq = 140,
155 DASHDASH = 141,
156 PLUSPLUS = 142,
157 Sizeof = 143,
158 Alignof = 144,
159 Alignof2 = 145,
160 Alignof3 = 146,
161 Alignof4 = 147,
162 Alignof5 = 148,
163 Offsetof = 149,
164 Generic = 150,
165 Asm = 151,
166 Asm2 = 152,
167 Asm3 = 153,
168 Volatile2 = 154,
169 DOT = 155,
170 DOTSTAR = 156,
171 DASHGT = 157,
172 NumberLiteral = 158,
173 LSQUOTE = 159,
174 USQUOTE = 160,
175 USQUOTE2 = 161,
176 U8SQUOTE = 162,
177 SQUOTE = 163,
178 Character = 164,
179 LDQUOTE = 165,
180 UDQUOTE = 166,
181 UDQUOTE2 = 167,
182 U8DQUOTE = 168,
183 DQUOTE = 169,
184 StringContent = 170,
185 EscapeSequence = 171,
186 SystemLibString = 172,
187 True = 173,
188 False = 174,
189 NULL = 175,
190 Nullptr = 176,
191 Comment = 177,
192 Auto = 178,
193 Decltype3 = 179,
194 Final = 180,
195 Override = 181,
196 Explicit = 182,
197 Typename = 183,
198 Template = 184,
199 GT2 = 185,
200 Operator = 186,
201 Try2 = 187,
202 Delete = 188,
203 PureVirtualClauseToken1 = 189,
204 Friend = 190,
205 Public = 191,
206 Private = 192,
207 Protected = 193,
208 Noexcept2 = 194,
209 Throw = 195,
210 Namespace = 196,
211 Using = 197,
212 StaticAssert = 198,
213 Concept = 199,
214 CoReturn = 200,
215 CoYield = 201,
216 Catch = 202,
217 RDQUOTE = 203,
218 LRDQUOTE = 204,
219 URDQUOTE = 205,
220 URDQUOTE2 = 206,
221 U8RDQUOTE = 207,
222 CoAwait = 208,
223 New = 209,
224 Requires = 210,
225 DASHGTSTAR = 211,
226 LPARENRPAREN = 212,
227 LBRACKRBRACK = 213,
228 DQUOTEDQUOTE = 214,
229 This = 215,
230 LiteralSuffix = 216,
231 RawStringDelimiter = 217,
232 RawStringContent = 218,
233 TranslationUnit = 219,
234 TopLevelItem = 220,
235 BlockItem = 221,
236 PreprocInclude = 222,
237 PreprocDef = 223,
238 PreprocFunctionDef = 224,
239 PreprocParams = 225,
240 PreprocCall = 226,
241 PreprocIf = 227,
242 PreprocIfdef = 228,
243 PreprocElse = 229,
244 PreprocElif = 230,
245 PreprocElifdef = 231,
246 PreprocIf2 = 232,
247 PreprocIfdef2 = 233,
248 PreprocElse2 = 234,
249 PreprocElif2 = 235,
250 PreprocElifdef2 = 236,
251 PreprocIf3 = 237,
252 PreprocIfdef3 = 238,
253 PreprocElse3 = 239,
254 PreprocElif3 = 240,
255 PreprocElifdef3 = 241,
256 PreprocIf4 = 242,
257 PreprocIfdef4 = 243,
258 PreprocElse4 = 244,
259 PreprocElif4 = 245,
260 PreprocElifdef4 = 246,
261 PreprocExpression = 247,
262 ParenthesizedExpression = 248,
263 PreprocDefined = 249,
264 UnaryExpression = 250,
265 CallExpression = 251,
266 ArgumentList = 252,
267 BinaryExpression = 253,
268 FunctionDefinition = 254,
269 Declaration = 255,
270 TypeDefinition = 256,
271 TypeDefinitionType = 257,
272 TypeDefinitionDeclarators = 258,
273 DeclarationModifiers = 259,
274 DeclarationSpecifiers = 260,
275 LinkageSpecification = 261,
276 AttributeSpecifier = 262,
277 Attribute = 263,
278 AttributeDeclaration = 264,
279 MsDeclspecModifier = 265,
280 MsBasedModifier = 266,
281 MsCallModifier = 267,
282 MsUnalignedPtrModifier = 268,
283 MsPointerModifier = 269,
284 DeclarationList = 270,
285 Declarator = 271,
286 FieldDeclarator = 272,
287 TypeDeclarator = 273,
288 AbstractDeclarator = 274,
289 ParenthesizedDeclarator = 275,
290 ParenthesizedDeclarator2 = 276,
291 ParenthesizedDeclarator3 = 277,
292 AbstractParenthesizedDeclarator = 278,
293 AttributedDeclarator = 279,
294 AttributedDeclarator2 = 280,
295 AttributedDeclarator3 = 281,
296 PointerDeclarator = 282,
297 PointerDeclarator2 = 283,
298 PointerTypeDeclarator = 284,
299 AbstractPointerDeclarator = 285,
300 FunctionDeclarator = 286,
301 FunctionDeclarator2 = 287,
302 FunctionDeclarator3 = 288,
303 AbstractFunctionDeclarator = 289,
304 ArrayDeclarator = 290,
305 ArrayDeclarator2 = 291,
306 ArrayDeclarator3 = 292,
307 AbstractArrayDeclarator = 293,
308 InitDeclarator = 294,
309 CompoundStatement = 295,
310 StorageClassSpecifier = 296,
311 TypeQualifier = 297,
312 AlignasQualifier = 298,
313 TypeSpecifier = 299,
314 SizedTypeSpecifier = 300,
315 EnumSpecifier = 301,
316 EnumeratorList = 302,
317 StructSpecifier = 303,
318 UnionSpecifier = 304,
319 FieldDeclarationList = 305,
320 FieldDeclarationListItem = 306,
321 FieldDeclaration = 307,
322 BitfieldClause = 308,
323 Enumerator = 309,
324 ParameterList = 310,
325 ParameterDeclaration = 311,
326 AttributedStatement = 312,
327 Statement = 313,
328 TopLevelStatement = 314,
329 LabeledStatement = 315,
330 ExpressionStatement = 316,
331 ExpressionStatement2 = 317,
332 IfStatement = 318,
333 ElseClause = 319,
334 SwitchStatement = 320,
335 CaseStatement = 321,
336 WhileStatement = 322,
337 DoStatement = 323,
338 ForStatement = 324,
339 ForStatementBody = 325,
340 ReturnStatement = 326,
341 BreakStatement = 327,
342 ContinueStatement = 328,
343 GotoStatement = 329,
344 SehTryStatement = 330,
345 SehExceptClause = 331,
346 SehFinallyClause = 332,
347 SehLeaveStatement = 333,
348 Expression = 334,
349 String = 335,
350 CommaExpression = 336,
351 ConditionalExpression = 337,
352 AssignmentExpression = 338,
353 PointerExpression = 339,
354 UnaryExpression2 = 340,
355 BinaryExpression2 = 341,
356 UpdateExpression = 342,
357 CastExpression = 343,
358 TypeDescriptor = 344,
359 SizeofExpression = 345,
360 AlignofExpression = 346,
361 OffsetofExpression = 347,
362 GenericExpression = 348,
363 SubscriptExpression = 349,
364 CallExpression2 = 350,
365 GnuAsmExpression = 351,
366 GnuAsmQualifier = 352,
367 GnuAsmOutputOperandList = 353,
368 GnuAsmOutputOperand = 354,
369 GnuAsmInputOperandList = 355,
370 GnuAsmInputOperand = 356,
371 GnuAsmClobberList = 357,
372 GnuAsmGotoList = 358,
373 ExtensionExpression = 359,
374 ArgumentList2 = 360,
375 FieldExpression = 361,
376 CompoundLiteralExpression = 362,
377 ParenthesizedExpression2 = 363,
378 InitializerList = 364,
379 InitializerPair = 365,
380 SubscriptDesignator = 366,
381 SubscriptRangeDesignator = 367,
382 FieldDesignator = 368,
383 CharLiteral = 369,
384 ConcatenatedString = 370,
385 StringLiteral = 371,
386 Null = 372,
387 EmptyDeclaration = 373,
388 PlaceholderTypeSpecifier = 374,
389 Decltype = 375,
390 Decltype2 = 376,
391 ClassDeclaration = 377,
392 ClassDeclarationItem = 378,
393 ClassSpecifier = 379,
394 ClassName = 380,
395 VirtualSpecifier = 381,
396 ExplicitFunctionSpecifier = 382,
397 BaseClassClause = 383,
398 EnumBaseClause = 384,
399 DependentType = 385,
400 TemplateDeclaration = 386,
401 TemplateInstantiation = 387,
402 TemplateParameterList = 388,
403 TypeParameterDeclaration = 389,
404 VariadicTypeParameterDeclaration = 390,
405 OptionalTypeParameterDeclaration = 391,
406 TemplateTemplateParameterDeclaration = 392,
407 OptionalParameterDeclaration = 393,
408 VariadicParameterDeclaration = 394,
409 VariadicDeclarator = 395,
410 ReferenceDeclarator = 396,
411 OperatorCast = 397,
412 FieldInitializerList = 398,
413 FieldInitializer = 399,
414 FunctionDefinition2 = 400,
415 ConstructorSpecifiers = 401,
416 FunctionDefinition3 = 402,
417 Declaration2 = 403,
418 TryStatement = 404,
419 FunctionDefinition4 = 405,
420 Declaration3 = 406,
421 DefaultMethodClause = 407,
422 DeleteMethodClause = 408,
423 PureVirtualClause = 409,
424 FriendDeclaration = 410,
425 AccessSpecifier = 411,
426 ReferenceDeclarator2 = 412,
427 ReferenceDeclarator3 = 413,
428 ReferenceDeclarator4 = 414,
429 AbstractReferenceDeclarator = 415,
430 StructuredBindingDeclarator = 416,
431 RefQualifier = 417,
432 FunctionDeclaratorSeq = 418,
433 FunctionAttributesStart = 419,
434 FunctionExceptionSpecification = 420,
435 FunctionAttributesEnd = 421,
436 FunctionPostfix = 422,
437 TrailingReturnType = 423,
438 Noexcept = 424,
439 ThrowSpecifier = 425,
440 TemplateType = 426,
441 TemplateMethod = 427,
442 TemplateFunction = 428,
443 TemplateArgumentList = 429,
444 NamespaceDefinition = 430,
445 NamespaceAliasDefinition = 431,
446 NamespaceSpecifier = 432,
447 NestedNamespaceSpecifier = 433,
448 UsingDeclaration = 434,
449 AliasDeclaration = 435,
450 StaticAssertDeclaration = 436,
451 ConceptDefinition = 437,
452 ForRangeLoop = 438,
453 ForRangeLoopBody = 439,
454 InitStatement = 440,
455 ConditionClause = 441,
456 Declaration4 = 442,
457 CoReturnStatement = 443,
458 CoYieldStatement = 444,
459 ThrowStatement = 445,
460 TryStatement2 = 446,
461 CatchClause = 447,
462 RawStringLiteral = 448,
463 SubscriptArgumentList = 449,
464 CoAwaitExpression = 450,
465 NewExpression = 451,
466 NewDeclarator = 452,
467 DeleteExpression = 453,
468 TypeRequirement = 454,
469 CompoundRequirement = 455,
470 Requirement = 456,
471 RequirementSeq = 457,
472 ConstraintConjunction = 458,
473 ConstraintDisjunction = 459,
474 RequirementClauseConstraint = 460,
475 RequiresClause = 461,
476 ParameterList2 = 462,
477 RequiresExpression = 463,
478 LambdaExpression = 464,
479 LambdaCaptureSpecifier = 465,
480 LambdaDefaultCapture = 466,
481 LambdaCaptureIdentifier = 467,
482 LambdaCaptureInitializer = 468,
483 LambdaCapture = 469,
484 FoldOperator = 470,
485 BinaryFoldOperator = 471,
486 UnaryLeftFold = 472,
487 UnaryRightFold = 473,
488 BinaryFold = 474,
489 FoldExpression = 475,
490 ParameterPackExpansion = 476,
491 ParameterPackExpansion2 = 477,
492 ParameterPackExpansion3 = 478,
493 DestructorName = 479,
494 DependentName = 480,
495 DependentName2 = 481,
496 DependentName3 = 482,
497 ScopeResolution = 483,
498 QualifiedIdentifier = 484,
499 QualifiedIdentifier2 = 485,
500 QualifiedIdentifier3 = 486,
501 QualifiedIdentifier4 = 487,
502 AssignmentExpression2 = 488,
503 OperatorName = 489,
504 UserDefinedLiteral = 490,
505 TranslationUnitRepeat1 = 491,
506 PreprocParamsRepeat1 = 492,
507 PreprocIfRepeat1 = 493,
508 PreprocIfInFieldDeclarationListRepeat1 = 494,
509 PreprocIfInEnumeratorListRepeat1 = 495,
510 PreprocIfInEnumeratorListNoCommaRepeat1 = 496,
511 PreprocArgumentListRepeat1 = 497,
512 DeclarationRepeat1 = 498,
513 TypeDefinitionRepeat1 = 499,
514 TypeDefinitionTypeRepeat1 = 500,
515 TypeDefinitionDeclaratorsRepeat1 = 501,
516 DeclarationSpecifiersRepeat1 = 502,
517 AttributeDeclarationRepeat1 = 503,
518 AttributedDeclaratorRepeat1 = 504,
519 PointerDeclaratorRepeat1 = 505,
520 ArrayDeclaratorRepeat1 = 506,
521 SizedTypeSpecifierRepeat1 = 507,
522 EnumeratorListRepeat1 = 508,
523 FieldDeclarationRepeat1 = 509,
524 ParameterListRepeat1 = 510,
525 CaseStatementRepeat1 = 511,
526 GenericExpressionRepeat1 = 512,
527 GnuAsmExpressionRepeat1 = 513,
528 GnuAsmOutputOperandListRepeat1 = 514,
529 GnuAsmInputOperandListRepeat1 = 515,
530 GnuAsmClobberListRepeat1 = 516,
531 GnuAsmGotoListRepeat1 = 517,
532 ArgumentListRepeat1 = 518,
533 InitializerListRepeat1 = 519,
534 InitializerPairRepeat1 = 520,
535 CharLiteralRepeat1 = 521,
536 ConcatenatedStringRepeat1 = 522,
537 StringLiteralRepeat1 = 523,
538 ClassDeclarationRepeat1 = 524,
539 BaseClassClauseRepeat1 = 525,
540 TemplateParameterListRepeat1 = 526,
541 FieldInitializerListRepeat1 = 527,
542 OperatorCastDefinitionRepeat1 = 528,
543 ConstructorTryStatementRepeat1 = 529,
544 StructuredBindingDeclaratorRepeat1 = 530,
545 FunctionPostfixRepeat1 = 531,
546 ThrowSpecifierRepeat1 = 532,
547 TemplateArgumentListRepeat1 = 533,
548 SubscriptArgumentListRepeat1 = 534,
549 RequirementSeqRepeat1 = 535,
550 RequiresParameterListRepeat1 = 536,
551 LambdaCaptureSpecifierRepeat1 = 537,
552 FieldIdentifier = 538,
553 NamespaceIdentifier = 539,
554 SimpleRequirement = 540,
555 StatementIdentifier = 541,
556 TypeIdentifier = 542,
557 Error = 543,
558}
559
560impl From<Cpp> for &'static str {
561 #[inline]
562 fn from(tok: Cpp) -> Self {
563 match tok {
564 Cpp::End => "end",
565 Cpp::Identifier => "identifier",
566 Cpp::HASHinclude => "#include",
567 Cpp::PreprocIncludeToken2 => "preproc_include_token2",
568 Cpp::HASHdefine => "#define",
569 Cpp::LPAREN => "(",
570 Cpp::DOTDOTDOT => "...",
571 Cpp::COMMA => ",",
572 Cpp::RPAREN => ")",
573 Cpp::HASHif => "#if",
574 Cpp::LF => "\n",
575 Cpp::HASHendif => "#endif",
576 Cpp::HASHifdef => "#ifdef",
577 Cpp::HASHifndef => "#ifndef",
578 Cpp::HASHelse => "#else",
579 Cpp::HASHelif => "#elif",
580 Cpp::HASHelifdef => "#elifdef",
581 Cpp::HASHelifndef => "#elifndef",
582 Cpp::PreprocArg => "preproc_arg",
583 Cpp::PreprocDirective => "preproc_directive",
584 Cpp::LPAREN2 => "(",
585 Cpp::Defined => "defined",
586 Cpp::BANG => "!",
587 Cpp::TILDE => "~",
588 Cpp::DASH => "-",
589 Cpp::PLUS => "+",
590 Cpp::STAR => "*",
591 Cpp::SLASH => "/",
592 Cpp::PERCENT => "%",
593 Cpp::PIPEPIPE => "||",
594 Cpp::AMPAMP => "&&",
595 Cpp::PIPE => "|",
596 Cpp::CARET => "^",
597 Cpp::AMP => "&",
598 Cpp::EQEQ => "==",
599 Cpp::BANGEQ => "!=",
600 Cpp::GT => ">",
601 Cpp::GTEQ => ">=",
602 Cpp::LTEQ => "<=",
603 Cpp::LT => "<",
604 Cpp::LTLT => "<<",
605 Cpp::GTGT => ">>",
606 Cpp::SEMI => ";",
607 Cpp::Extension => "__extension__",
608 Cpp::Typedef => "typedef",
609 Cpp::Virtual => "virtual",
610 Cpp::Extern => "extern",
611 Cpp::Attribute2 => "__attribute__",
612 Cpp::Attribute3 => "__attribute",
613 Cpp::COLONCOLON => "::",
614 Cpp::LBRACKLBRACK => "[[",
615 Cpp::RBRACKRBRACK => "]]",
616 Cpp::Declspec => "__declspec",
617 Cpp::Based => "__based",
618 Cpp::Cdecl => "__cdecl",
619 Cpp::Clrcall => "__clrcall",
620 Cpp::Stdcall => "__stdcall",
621 Cpp::Fastcall => "__fastcall",
622 Cpp::Thiscall => "__thiscall",
623 Cpp::Vectorcall => "__vectorcall",
624 Cpp::MsRestrictModifier => "ms_restrict_modifier",
625 Cpp::MsUnsignedPtrModifier => "ms_unsigned_ptr_modifier",
626 Cpp::MsSignedPtrModifier => "ms_signed_ptr_modifier",
627 Cpp::Unaligned => "_unaligned",
628 Cpp::Unaligned2 => "__unaligned",
629 Cpp::LBRACE => "{",
630 Cpp::RBRACE => "}",
631 Cpp::Signed => "signed",
632 Cpp::Unsigned => "unsigned",
633 Cpp::Long => "long",
634 Cpp::Short => "short",
635 Cpp::LBRACK => "[",
636 Cpp::Static => "static",
637 Cpp::RBRACK => "]",
638 Cpp::EQ => "=",
639 Cpp::Register => "register",
640 Cpp::Inline => "inline",
641 Cpp::Inline2 => "__inline",
642 Cpp::Inline3 => "__inline__",
643 Cpp::Forceinline => "__forceinline",
644 Cpp::ThreadLocal => "thread_local",
645 Cpp::Thread => "__thread",
646 Cpp::Const => "const",
647 Cpp::Constexpr => "constexpr",
648 Cpp::Volatile => "volatile",
649 Cpp::Restrict => "restrict",
650 Cpp::Restrict2 => "__restrict__",
651 Cpp::Atomic => "_Atomic",
652 Cpp::Noreturn => "_Noreturn",
653 Cpp::Noreturn2 => "noreturn",
654 Cpp::Nonnull => "_Nonnull",
655 Cpp::Mutable => "mutable",
656 Cpp::Constinit => "constinit",
657 Cpp::Consteval => "consteval",
658 Cpp::Alignas => "alignas",
659 Cpp::Alignas2 => "_Alignas",
660 Cpp::PrimitiveType => "primitive_type",
661 Cpp::Enum => "enum",
662 Cpp::Class => "class",
663 Cpp::Struct => "struct",
664 Cpp::Union => "union",
665 Cpp::COLON => ":",
666 Cpp::If => "if",
667 Cpp::Else => "else",
668 Cpp::Switch => "switch",
669 Cpp::Case => "case",
670 Cpp::Default => "default",
671 Cpp::While => "while",
672 Cpp::Do => "do",
673 Cpp::For => "for",
674 Cpp::Return => "return",
675 Cpp::Break => "break",
676 Cpp::Continue => "continue",
677 Cpp::Goto => "goto",
678 Cpp::Try => "__try",
679 Cpp::Except => "__except",
680 Cpp::Finally => "__finally",
681 Cpp::Leave => "__leave",
682 Cpp::QMARK => "?",
683 Cpp::STAREQ => "*=",
684 Cpp::SLASHEQ => "/=",
685 Cpp::PERCENTEQ => "%=",
686 Cpp::PLUSEQ => "+=",
687 Cpp::DASHEQ => "-=",
688 Cpp::LTLTEQ => "<<=",
689 Cpp::GTGTEQ => ">>=",
690 Cpp::AMPEQ => "&=",
691 Cpp::CARETEQ => "^=",
692 Cpp::PIPEEQ => "|=",
693 Cpp::AndEq => "and_eq",
694 Cpp::OrEq => "or_eq",
695 Cpp::XorEq => "xor_eq",
696 Cpp::Not => "not",
697 Cpp::Compl => "compl",
698 Cpp::LTEQGT => "<=>",
699 Cpp::Or => "or",
700 Cpp::And => "and",
701 Cpp::Bitor => "bitor",
702 Cpp::Xor => "xor",
703 Cpp::Bitand => "bitand",
704 Cpp::NotEq => "not_eq",
705 Cpp::DASHDASH => "--",
706 Cpp::PLUSPLUS => "++",
707 Cpp::Sizeof => "sizeof",
708 Cpp::Alignof => "__alignof__",
709 Cpp::Alignof2 => "__alignof",
710 Cpp::Alignof3 => "_alignof",
711 Cpp::Alignof4 => "alignof",
712 Cpp::Alignof5 => "_Alignof",
713 Cpp::Offsetof => "offsetof",
714 Cpp::Generic => "_Generic",
715 Cpp::Asm => "asm",
716 Cpp::Asm2 => "__asm__",
717 Cpp::Asm3 => "__asm",
718 Cpp::Volatile2 => "__volatile__",
719 Cpp::DOT => ".",
720 Cpp::DOTSTAR => ".*",
721 Cpp::DASHGT => "->",
722 Cpp::NumberLiteral => "number_literal",
723 Cpp::LSQUOTE => "L'",
724 Cpp::USQUOTE => "u'",
725 Cpp::USQUOTE2 => "U'",
726 Cpp::U8SQUOTE => "u8'",
727 Cpp::SQUOTE => "'",
728 Cpp::Character => "character",
729 Cpp::LDQUOTE => "L\"",
730 Cpp::UDQUOTE => "u\"",
731 Cpp::UDQUOTE2 => "U\"",
732 Cpp::U8DQUOTE => "u8\"",
733 Cpp::DQUOTE => "\"",
734 Cpp::StringContent => "string_content",
735 Cpp::EscapeSequence => "escape_sequence",
736 Cpp::SystemLibString => "system_lib_string",
737 Cpp::True => "true",
738 Cpp::False => "false",
739 Cpp::NULL => "NULL",
740 Cpp::Nullptr => "nullptr",
741 Cpp::Comment => "comment",
742 Cpp::Auto => "auto",
743 Cpp::Decltype3 => "decltype",
744 Cpp::Final => "final",
745 Cpp::Override => "override",
746 Cpp::Explicit => "explicit",
747 Cpp::Typename => "typename",
748 Cpp::Template => "template",
749 Cpp::GT2 => ">",
750 Cpp::Operator => "operator",
751 Cpp::Try2 => "try",
752 Cpp::Delete => "delete",
753 Cpp::PureVirtualClauseToken1 => "pure_virtual_clause_token1",
754 Cpp::Friend => "friend",
755 Cpp::Public => "public",
756 Cpp::Private => "private",
757 Cpp::Protected => "protected",
758 Cpp::Noexcept2 => "noexcept",
759 Cpp::Throw => "throw",
760 Cpp::Namespace => "namespace",
761 Cpp::Using => "using",
762 Cpp::StaticAssert => "static_assert",
763 Cpp::Concept => "concept",
764 Cpp::CoReturn => "co_return",
765 Cpp::CoYield => "co_yield",
766 Cpp::Catch => "catch",
767 Cpp::RDQUOTE => "R\"",
768 Cpp::LRDQUOTE => "LR\"",
769 Cpp::URDQUOTE => "uR\"",
770 Cpp::URDQUOTE2 => "UR\"",
771 Cpp::U8RDQUOTE => "u8R\"",
772 Cpp::CoAwait => "co_await",
773 Cpp::New => "new",
774 Cpp::Requires => "requires",
775 Cpp::DASHGTSTAR => "->*",
776 Cpp::LPARENRPAREN => "()",
777 Cpp::LBRACKRBRACK => "[]",
778 Cpp::DQUOTEDQUOTE => "\"\"",
779 Cpp::This => "this",
780 Cpp::LiteralSuffix => "literal_suffix",
781 Cpp::RawStringDelimiter => "raw_string_delimiter",
782 Cpp::RawStringContent => "raw_string_content",
783 Cpp::TranslationUnit => "translation_unit",
784 Cpp::TopLevelItem => "_top_level_item",
785 Cpp::BlockItem => "_block_item",
786 Cpp::PreprocInclude => "preproc_include",
787 Cpp::PreprocDef => "preproc_def",
788 Cpp::PreprocFunctionDef => "preproc_function_def",
789 Cpp::PreprocParams => "preproc_params",
790 Cpp::PreprocCall => "preproc_call",
791 Cpp::PreprocIf => "preproc_if",
792 Cpp::PreprocIfdef => "preproc_ifdef",
793 Cpp::PreprocElse => "preproc_else",
794 Cpp::PreprocElif => "preproc_elif",
795 Cpp::PreprocElifdef => "preproc_elifdef",
796 Cpp::PreprocIf2 => "preproc_if",
797 Cpp::PreprocIfdef2 => "preproc_ifdef",
798 Cpp::PreprocElse2 => "preproc_else",
799 Cpp::PreprocElif2 => "preproc_elif",
800 Cpp::PreprocElifdef2 => "preproc_elifdef",
801 Cpp::PreprocIf3 => "preproc_if",
802 Cpp::PreprocIfdef3 => "preproc_ifdef",
803 Cpp::PreprocElse3 => "preproc_else",
804 Cpp::PreprocElif3 => "preproc_elif",
805 Cpp::PreprocElifdef3 => "preproc_elifdef",
806 Cpp::PreprocIf4 => "preproc_if",
807 Cpp::PreprocIfdef4 => "preproc_ifdef",
808 Cpp::PreprocElse4 => "preproc_else",
809 Cpp::PreprocElif4 => "preproc_elif",
810 Cpp::PreprocElifdef4 => "preproc_elifdef",
811 Cpp::PreprocExpression => "_preproc_expression",
812 Cpp::ParenthesizedExpression => "parenthesized_expression",
813 Cpp::PreprocDefined => "preproc_defined",
814 Cpp::UnaryExpression => "unary_expression",
815 Cpp::CallExpression => "call_expression",
816 Cpp::ArgumentList => "argument_list",
817 Cpp::BinaryExpression => "binary_expression",
818 Cpp::FunctionDefinition => "function_definition",
819 Cpp::Declaration => "declaration",
820 Cpp::TypeDefinition => "type_definition",
821 Cpp::TypeDefinitionType => "_type_definition_type",
822 Cpp::TypeDefinitionDeclarators => "_type_definition_declarators",
823 Cpp::DeclarationModifiers => "_declaration_modifiers",
824 Cpp::DeclarationSpecifiers => "_declaration_specifiers",
825 Cpp::LinkageSpecification => "linkage_specification",
826 Cpp::AttributeSpecifier => "attribute_specifier",
827 Cpp::Attribute => "attribute",
828 Cpp::AttributeDeclaration => "attribute_declaration",
829 Cpp::MsDeclspecModifier => "ms_declspec_modifier",
830 Cpp::MsBasedModifier => "ms_based_modifier",
831 Cpp::MsCallModifier => "ms_call_modifier",
832 Cpp::MsUnalignedPtrModifier => "ms_unaligned_ptr_modifier",
833 Cpp::MsPointerModifier => "ms_pointer_modifier",
834 Cpp::DeclarationList => "declaration_list",
835 Cpp::Declarator => "_declarator",
836 Cpp::FieldDeclarator => "_field_declarator",
837 Cpp::TypeDeclarator => "_type_declarator",
838 Cpp::AbstractDeclarator => "_abstract_declarator",
839 Cpp::ParenthesizedDeclarator => "parenthesized_declarator",
840 Cpp::ParenthesizedDeclarator2 => "parenthesized_declarator",
841 Cpp::ParenthesizedDeclarator3 => "parenthesized_declarator",
842 Cpp::AbstractParenthesizedDeclarator => "abstract_parenthesized_declarator",
843 Cpp::AttributedDeclarator => "attributed_declarator",
844 Cpp::AttributedDeclarator2 => "attributed_declarator",
845 Cpp::AttributedDeclarator3 => "attributed_declarator",
846 Cpp::PointerDeclarator => "pointer_declarator",
847 Cpp::PointerDeclarator2 => "pointer_declarator",
848 Cpp::PointerTypeDeclarator => "pointer_type_declarator",
849 Cpp::AbstractPointerDeclarator => "abstract_pointer_declarator",
850 Cpp::FunctionDeclarator => "function_declarator",
851 Cpp::FunctionDeclarator2 => "function_declarator",
852 Cpp::FunctionDeclarator3 => "function_declarator",
853 Cpp::AbstractFunctionDeclarator => "abstract_function_declarator",
854 Cpp::ArrayDeclarator => "array_declarator",
855 Cpp::ArrayDeclarator2 => "array_declarator",
856 Cpp::ArrayDeclarator3 => "array_declarator",
857 Cpp::AbstractArrayDeclarator => "abstract_array_declarator",
858 Cpp::InitDeclarator => "init_declarator",
859 Cpp::CompoundStatement => "compound_statement",
860 Cpp::StorageClassSpecifier => "storage_class_specifier",
861 Cpp::TypeQualifier => "type_qualifier",
862 Cpp::AlignasQualifier => "alignas_qualifier",
863 Cpp::TypeSpecifier => "type_specifier",
864 Cpp::SizedTypeSpecifier => "sized_type_specifier",
865 Cpp::EnumSpecifier => "enum_specifier",
866 Cpp::EnumeratorList => "enumerator_list",
867 Cpp::StructSpecifier => "struct_specifier",
868 Cpp::UnionSpecifier => "union_specifier",
869 Cpp::FieldDeclarationList => "field_declaration_list",
870 Cpp::FieldDeclarationListItem => "_field_declaration_list_item",
871 Cpp::FieldDeclaration => "field_declaration",
872 Cpp::BitfieldClause => "bitfield_clause",
873 Cpp::Enumerator => "enumerator",
874 Cpp::ParameterList => "parameter_list",
875 Cpp::ParameterDeclaration => "parameter_declaration",
876 Cpp::AttributedStatement => "attributed_statement",
877 Cpp::Statement => "statement",
878 Cpp::TopLevelStatement => "_top_level_statement",
879 Cpp::LabeledStatement => "labeled_statement",
880 Cpp::ExpressionStatement => "expression_statement",
881 Cpp::ExpressionStatement2 => "expression_statement",
882 Cpp::IfStatement => "if_statement",
883 Cpp::ElseClause => "else_clause",
884 Cpp::SwitchStatement => "switch_statement",
885 Cpp::CaseStatement => "case_statement",
886 Cpp::WhileStatement => "while_statement",
887 Cpp::DoStatement => "do_statement",
888 Cpp::ForStatement => "for_statement",
889 Cpp::ForStatementBody => "_for_statement_body",
890 Cpp::ReturnStatement => "return_statement",
891 Cpp::BreakStatement => "break_statement",
892 Cpp::ContinueStatement => "continue_statement",
893 Cpp::GotoStatement => "goto_statement",
894 Cpp::SehTryStatement => "seh_try_statement",
895 Cpp::SehExceptClause => "seh_except_clause",
896 Cpp::SehFinallyClause => "seh_finally_clause",
897 Cpp::SehLeaveStatement => "seh_leave_statement",
898 Cpp::Expression => "expression",
899 Cpp::String => "_string",
900 Cpp::CommaExpression => "comma_expression",
901 Cpp::ConditionalExpression => "conditional_expression",
902 Cpp::AssignmentExpression => "assignment_expression",
903 Cpp::PointerExpression => "pointer_expression",
904 Cpp::UnaryExpression2 => "unary_expression",
905 Cpp::BinaryExpression2 => "binary_expression",
906 Cpp::UpdateExpression => "update_expression",
907 Cpp::CastExpression => "cast_expression",
908 Cpp::TypeDescriptor => "type_descriptor",
909 Cpp::SizeofExpression => "sizeof_expression",
910 Cpp::AlignofExpression => "alignof_expression",
911 Cpp::OffsetofExpression => "offsetof_expression",
912 Cpp::GenericExpression => "generic_expression",
913 Cpp::SubscriptExpression => "subscript_expression",
914 Cpp::CallExpression2 => "call_expression",
915 Cpp::GnuAsmExpression => "gnu_asm_expression",
916 Cpp::GnuAsmQualifier => "gnu_asm_qualifier",
917 Cpp::GnuAsmOutputOperandList => "gnu_asm_output_operand_list",
918 Cpp::GnuAsmOutputOperand => "gnu_asm_output_operand",
919 Cpp::GnuAsmInputOperandList => "gnu_asm_input_operand_list",
920 Cpp::GnuAsmInputOperand => "gnu_asm_input_operand",
921 Cpp::GnuAsmClobberList => "gnu_asm_clobber_list",
922 Cpp::GnuAsmGotoList => "gnu_asm_goto_list",
923 Cpp::ExtensionExpression => "extension_expression",
924 Cpp::ArgumentList2 => "argument_list",
925 Cpp::FieldExpression => "field_expression",
926 Cpp::CompoundLiteralExpression => "compound_literal_expression",
927 Cpp::ParenthesizedExpression2 => "parenthesized_expression",
928 Cpp::InitializerList => "initializer_list",
929 Cpp::InitializerPair => "initializer_pair",
930 Cpp::SubscriptDesignator => "subscript_designator",
931 Cpp::SubscriptRangeDesignator => "subscript_range_designator",
932 Cpp::FieldDesignator => "field_designator",
933 Cpp::CharLiteral => "char_literal",
934 Cpp::ConcatenatedString => "concatenated_string",
935 Cpp::StringLiteral => "string_literal",
936 Cpp::Null => "null",
937 Cpp::EmptyDeclaration => "_empty_declaration",
938 Cpp::PlaceholderTypeSpecifier => "placeholder_type_specifier",
939 Cpp::Decltype => "decltype",
940 Cpp::Decltype2 => "decltype",
941 Cpp::ClassDeclaration => "_class_declaration",
942 Cpp::ClassDeclarationItem => "_class_declaration_item",
943 Cpp::ClassSpecifier => "class_specifier",
944 Cpp::ClassName => "_class_name",
945 Cpp::VirtualSpecifier => "virtual_specifier",
946 Cpp::ExplicitFunctionSpecifier => "explicit_function_specifier",
947 Cpp::BaseClassClause => "base_class_clause",
948 Cpp::EnumBaseClause => "_enum_base_clause",
949 Cpp::DependentType => "dependent_type",
950 Cpp::TemplateDeclaration => "template_declaration",
951 Cpp::TemplateInstantiation => "template_instantiation",
952 Cpp::TemplateParameterList => "template_parameter_list",
953 Cpp::TypeParameterDeclaration => "type_parameter_declaration",
954 Cpp::VariadicTypeParameterDeclaration => "variadic_type_parameter_declaration",
955 Cpp::OptionalTypeParameterDeclaration => "optional_type_parameter_declaration",
956 Cpp::TemplateTemplateParameterDeclaration => "template_template_parameter_declaration",
957 Cpp::OptionalParameterDeclaration => "optional_parameter_declaration",
958 Cpp::VariadicParameterDeclaration => "variadic_parameter_declaration",
959 Cpp::VariadicDeclarator => "variadic_declarator",
960 Cpp::ReferenceDeclarator => "reference_declarator",
961 Cpp::OperatorCast => "operator_cast",
962 Cpp::FieldInitializerList => "field_initializer_list",
963 Cpp::FieldInitializer => "field_initializer",
964 Cpp::FunctionDefinition2 => "function_definition",
965 Cpp::ConstructorSpecifiers => "_constructor_specifiers",
966 Cpp::FunctionDefinition3 => "function_definition",
967 Cpp::Declaration2 => "declaration",
968 Cpp::TryStatement => "try_statement",
969 Cpp::FunctionDefinition4 => "function_definition",
970 Cpp::Declaration3 => "declaration",
971 Cpp::DefaultMethodClause => "default_method_clause",
972 Cpp::DeleteMethodClause => "delete_method_clause",
973 Cpp::PureVirtualClause => "pure_virtual_clause",
974 Cpp::FriendDeclaration => "friend_declaration",
975 Cpp::AccessSpecifier => "access_specifier",
976 Cpp::ReferenceDeclarator2 => "reference_declarator",
977 Cpp::ReferenceDeclarator3 => "reference_declarator",
978 Cpp::ReferenceDeclarator4 => "reference_declarator",
979 Cpp::AbstractReferenceDeclarator => "abstract_reference_declarator",
980 Cpp::StructuredBindingDeclarator => "structured_binding_declarator",
981 Cpp::RefQualifier => "ref_qualifier",
982 Cpp::FunctionDeclaratorSeq => "_function_declarator_seq",
983 Cpp::FunctionAttributesStart => "_function_attributes_start",
984 Cpp::FunctionExceptionSpecification => "_function_exception_specification",
985 Cpp::FunctionAttributesEnd => "_function_attributes_end",
986 Cpp::FunctionPostfix => "_function_postfix",
987 Cpp::TrailingReturnType => "trailing_return_type",
988 Cpp::Noexcept => "noexcept",
989 Cpp::ThrowSpecifier => "throw_specifier",
990 Cpp::TemplateType => "template_type",
991 Cpp::TemplateMethod => "template_method",
992 Cpp::TemplateFunction => "template_function",
993 Cpp::TemplateArgumentList => "template_argument_list",
994 Cpp::NamespaceDefinition => "namespace_definition",
995 Cpp::NamespaceAliasDefinition => "namespace_alias_definition",
996 Cpp::NamespaceSpecifier => "_namespace_specifier",
997 Cpp::NestedNamespaceSpecifier => "nested_namespace_specifier",
998 Cpp::UsingDeclaration => "using_declaration",
999 Cpp::AliasDeclaration => "alias_declaration",
1000 Cpp::StaticAssertDeclaration => "static_assert_declaration",
1001 Cpp::ConceptDefinition => "concept_definition",
1002 Cpp::ForRangeLoop => "for_range_loop",
1003 Cpp::ForRangeLoopBody => "_for_range_loop_body",
1004 Cpp::InitStatement => "init_statement",
1005 Cpp::ConditionClause => "condition_clause",
1006 Cpp::Declaration4 => "declaration",
1007 Cpp::CoReturnStatement => "co_return_statement",
1008 Cpp::CoYieldStatement => "co_yield_statement",
1009 Cpp::ThrowStatement => "throw_statement",
1010 Cpp::TryStatement2 => "try_statement",
1011 Cpp::CatchClause => "catch_clause",
1012 Cpp::RawStringLiteral => "raw_string_literal",
1013 Cpp::SubscriptArgumentList => "subscript_argument_list",
1014 Cpp::CoAwaitExpression => "co_await_expression",
1015 Cpp::NewExpression => "new_expression",
1016 Cpp::NewDeclarator => "new_declarator",
1017 Cpp::DeleteExpression => "delete_expression",
1018 Cpp::TypeRequirement => "type_requirement",
1019 Cpp::CompoundRequirement => "compound_requirement",
1020 Cpp::Requirement => "_requirement",
1021 Cpp::RequirementSeq => "requirement_seq",
1022 Cpp::ConstraintConjunction => "constraint_conjunction",
1023 Cpp::ConstraintDisjunction => "constraint_disjunction",
1024 Cpp::RequirementClauseConstraint => "_requirement_clause_constraint",
1025 Cpp::RequiresClause => "requires_clause",
1026 Cpp::ParameterList2 => "parameter_list",
1027 Cpp::RequiresExpression => "requires_expression",
1028 Cpp::LambdaExpression => "lambda_expression",
1029 Cpp::LambdaCaptureSpecifier => "lambda_capture_specifier",
1030 Cpp::LambdaDefaultCapture => "lambda_default_capture",
1031 Cpp::LambdaCaptureIdentifier => "_lambda_capture_identifier",
1032 Cpp::LambdaCaptureInitializer => "lambda_capture_initializer",
1033 Cpp::LambdaCapture => "_lambda_capture",
1034 Cpp::FoldOperator => "_fold_operator",
1035 Cpp::BinaryFoldOperator => "_binary_fold_operator",
1036 Cpp::UnaryLeftFold => "_unary_left_fold",
1037 Cpp::UnaryRightFold => "_unary_right_fold",
1038 Cpp::BinaryFold => "_binary_fold",
1039 Cpp::FoldExpression => "fold_expression",
1040 Cpp::ParameterPackExpansion => "parameter_pack_expansion",
1041 Cpp::ParameterPackExpansion2 => "parameter_pack_expansion",
1042 Cpp::ParameterPackExpansion3 => "parameter_pack_expansion",
1043 Cpp::DestructorName => "destructor_name",
1044 Cpp::DependentName => "dependent_name",
1045 Cpp::DependentName2 => "dependent_name",
1046 Cpp::DependentName3 => "dependent_name",
1047 Cpp::ScopeResolution => "_scope_resolution",
1048 Cpp::QualifiedIdentifier => "qualified_identifier",
1049 Cpp::QualifiedIdentifier2 => "qualified_identifier",
1050 Cpp::QualifiedIdentifier3 => "qualified_identifier",
1051 Cpp::QualifiedIdentifier4 => "qualified_identifier",
1052 Cpp::AssignmentExpression2 => "assignment_expression",
1053 Cpp::OperatorName => "operator_name",
1054 Cpp::UserDefinedLiteral => "user_defined_literal",
1055 Cpp::TranslationUnitRepeat1 => "translation_unit_repeat1",
1056 Cpp::PreprocParamsRepeat1 => "preproc_params_repeat1",
1057 Cpp::PreprocIfRepeat1 => "preproc_if_repeat1",
1058 Cpp::PreprocIfInFieldDeclarationListRepeat1 => {
1059 "preproc_if_in_field_declaration_list_repeat1"
1060 }
1061 Cpp::PreprocIfInEnumeratorListRepeat1 => "preproc_if_in_enumerator_list_repeat1",
1062 Cpp::PreprocIfInEnumeratorListNoCommaRepeat1 => {
1063 "preproc_if_in_enumerator_list_no_comma_repeat1"
1064 }
1065 Cpp::PreprocArgumentListRepeat1 => "preproc_argument_list_repeat1",
1066 Cpp::DeclarationRepeat1 => "declaration_repeat1",
1067 Cpp::TypeDefinitionRepeat1 => "type_definition_repeat1",
1068 Cpp::TypeDefinitionTypeRepeat1 => "_type_definition_type_repeat1",
1069 Cpp::TypeDefinitionDeclaratorsRepeat1 => "_type_definition_declarators_repeat1",
1070 Cpp::DeclarationSpecifiersRepeat1 => "_declaration_specifiers_repeat1",
1071 Cpp::AttributeDeclarationRepeat1 => "attribute_declaration_repeat1",
1072 Cpp::AttributedDeclaratorRepeat1 => "attributed_declarator_repeat1",
1073 Cpp::PointerDeclaratorRepeat1 => "pointer_declarator_repeat1",
1074 Cpp::ArrayDeclaratorRepeat1 => "array_declarator_repeat1",
1075 Cpp::SizedTypeSpecifierRepeat1 => "sized_type_specifier_repeat1",
1076 Cpp::EnumeratorListRepeat1 => "enumerator_list_repeat1",
1077 Cpp::FieldDeclarationRepeat1 => "field_declaration_repeat1",
1078 Cpp::ParameterListRepeat1 => "parameter_list_repeat1",
1079 Cpp::CaseStatementRepeat1 => "case_statement_repeat1",
1080 Cpp::GenericExpressionRepeat1 => "generic_expression_repeat1",
1081 Cpp::GnuAsmExpressionRepeat1 => "gnu_asm_expression_repeat1",
1082 Cpp::GnuAsmOutputOperandListRepeat1 => "gnu_asm_output_operand_list_repeat1",
1083 Cpp::GnuAsmInputOperandListRepeat1 => "gnu_asm_input_operand_list_repeat1",
1084 Cpp::GnuAsmClobberListRepeat1 => "gnu_asm_clobber_list_repeat1",
1085 Cpp::GnuAsmGotoListRepeat1 => "gnu_asm_goto_list_repeat1",
1086 Cpp::ArgumentListRepeat1 => "argument_list_repeat1",
1087 Cpp::InitializerListRepeat1 => "initializer_list_repeat1",
1088 Cpp::InitializerPairRepeat1 => "initializer_pair_repeat1",
1089 Cpp::CharLiteralRepeat1 => "char_literal_repeat1",
1090 Cpp::ConcatenatedStringRepeat1 => "concatenated_string_repeat1",
1091 Cpp::StringLiteralRepeat1 => "string_literal_repeat1",
1092 Cpp::ClassDeclarationRepeat1 => "_class_declaration_repeat1",
1093 Cpp::BaseClassClauseRepeat1 => "base_class_clause_repeat1",
1094 Cpp::TemplateParameterListRepeat1 => "template_parameter_list_repeat1",
1095 Cpp::FieldInitializerListRepeat1 => "field_initializer_list_repeat1",
1096 Cpp::OperatorCastDefinitionRepeat1 => "operator_cast_definition_repeat1",
1097 Cpp::ConstructorTryStatementRepeat1 => "constructor_try_statement_repeat1",
1098 Cpp::StructuredBindingDeclaratorRepeat1 => "structured_binding_declarator_repeat1",
1099 Cpp::FunctionPostfixRepeat1 => "_function_postfix_repeat1",
1100 Cpp::ThrowSpecifierRepeat1 => "throw_specifier_repeat1",
1101 Cpp::TemplateArgumentListRepeat1 => "template_argument_list_repeat1",
1102 Cpp::SubscriptArgumentListRepeat1 => "subscript_argument_list_repeat1",
1103 Cpp::RequirementSeqRepeat1 => "requirement_seq_repeat1",
1104 Cpp::RequiresParameterListRepeat1 => "requires_parameter_list_repeat1",
1105 Cpp::LambdaCaptureSpecifierRepeat1 => "lambda_capture_specifier_repeat1",
1106 Cpp::FieldIdentifier => "field_identifier",
1107 Cpp::NamespaceIdentifier => "namespace_identifier",
1108 Cpp::SimpleRequirement => "simple_requirement",
1109 Cpp::StatementIdentifier => "statement_identifier",
1110 Cpp::TypeIdentifier => "type_identifier",
1111 Cpp::Error => "ERROR",
1112 }
1113 }
1114}
1115
1116impl From<u16> for Cpp {
1117 #[inline]
1118 fn from(x: u16) -> Self {
1119 num_traits::FromPrimitive::from_u16(x).unwrap_or(Self::Error)
1120 }
1121}
1122
1123impl PartialEq<u16> for Cpp {
1125 #[inline]
1126 fn eq(&self, x: &u16) -> bool {
1127 *self == Into::<Self>::into(*x)
1128 }
1129}
1130
1131impl PartialEq<Cpp> for u16 {
1133 #[inline]
1134 fn eq(&self, x: &Cpp) -> bool {
1135 *x == *self
1136 }
1137}