rust-code-analysis-code-split 0.0.26-cs.0

Fork of mozilla/rust-code-analysis bumped to tree-sitter 0.26 for use by code-split. Computes complexity metrics (cyclomatic, cognitive, Halstead, MI, LOC).
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
// Code generated; DO NOT EDIT.

use num_derive::FromPrimitive;

#[derive(Clone, Debug, PartialEq, Eq, FromPrimitive)]
pub enum Cpp {
    End = 0,
    Identifier = 1,
    HASHinclude = 2,
    PreprocIncludeToken2 = 3,
    HASHdefine = 4,
    LPAREN = 5,
    DOTDOTDOT = 6,
    COMMA = 7,
    RPAREN = 8,
    HASHif = 9,
    LF = 10,
    HASHendif = 11,
    HASHifdef = 12,
    HASHifndef = 13,
    HASHelse = 14,
    HASHelif = 15,
    HASHelifdef = 16,
    HASHelifndef = 17,
    PreprocArg = 18,
    PreprocDirective = 19,
    LPAREN2 = 20,
    Defined = 21,
    BANG = 22,
    TILDE = 23,
    DASH = 24,
    PLUS = 25,
    STAR = 26,
    SLASH = 27,
    PERCENT = 28,
    PIPEPIPE = 29,
    AMPAMP = 30,
    PIPE = 31,
    CARET = 32,
    AMP = 33,
    EQEQ = 34,
    BANGEQ = 35,
    GT = 36,
    GTEQ = 37,
    LTEQ = 38,
    LT = 39,
    LTLT = 40,
    GTGT = 41,
    SEMI = 42,
    Extension = 43,
    Typedef = 44,
    Virtual = 45,
    Extern = 46,
    Attribute2 = 47,
    Attribute3 = 48,
    COLONCOLON = 49,
    LBRACKLBRACK = 50,
    RBRACKRBRACK = 51,
    Declspec = 52,
    Based = 53,
    Cdecl = 54,
    Clrcall = 55,
    Stdcall = 56,
    Fastcall = 57,
    Thiscall = 58,
    Vectorcall = 59,
    MsRestrictModifier = 60,
    MsUnsignedPtrModifier = 61,
    MsSignedPtrModifier = 62,
    Unaligned = 63,
    Unaligned2 = 64,
    LBRACE = 65,
    RBRACE = 66,
    Signed = 67,
    Unsigned = 68,
    Long = 69,
    Short = 70,
    LBRACK = 71,
    Static = 72,
    RBRACK = 73,
    EQ = 74,
    Register = 75,
    Inline = 76,
    Inline2 = 77,
    Inline3 = 78,
    Forceinline = 79,
    ThreadLocal = 80,
    Thread = 81,
    Const = 82,
    Constexpr = 83,
    Volatile = 84,
    Restrict = 85,
    Restrict2 = 86,
    Atomic = 87,
    Noreturn = 88,
    Noreturn2 = 89,
    Nonnull = 90,
    Mutable = 91,
    Constinit = 92,
    Consteval = 93,
    Alignas = 94,
    Alignas2 = 95,
    PrimitiveType = 96,
    Enum = 97,
    Class = 98,
    Struct = 99,
    Union = 100,
    COLON = 101,
    If = 102,
    Else = 103,
    Switch = 104,
    Case = 105,
    Default = 106,
    While = 107,
    Do = 108,
    For = 109,
    Return = 110,
    Break = 111,
    Continue = 112,
    Goto = 113,
    Try = 114,
    Except = 115,
    Finally = 116,
    Leave = 117,
    QMARK = 118,
    STAREQ = 119,
    SLASHEQ = 120,
    PERCENTEQ = 121,
    PLUSEQ = 122,
    DASHEQ = 123,
    LTLTEQ = 124,
    GTGTEQ = 125,
    AMPEQ = 126,
    CARETEQ = 127,
    PIPEEQ = 128,
    AndEq = 129,
    OrEq = 130,
    XorEq = 131,
    Not = 132,
    Compl = 133,
    LTEQGT = 134,
    Or = 135,
    And = 136,
    Bitor = 137,
    Xor = 138,
    Bitand = 139,
    NotEq = 140,
    DASHDASH = 141,
    PLUSPLUS = 142,
    Sizeof = 143,
    Alignof = 144,
    Alignof2 = 145,
    Alignof3 = 146,
    Alignof4 = 147,
    Alignof5 = 148,
    Offsetof = 149,
    Generic = 150,
    Asm = 151,
    Asm2 = 152,
    Asm3 = 153,
    Volatile2 = 154,
    DOT = 155,
    DOTSTAR = 156,
    DASHGT = 157,
    NumberLiteral = 158,
    LSQUOTE = 159,
    USQUOTE = 160,
    USQUOTE2 = 161,
    U8SQUOTE = 162,
    SQUOTE = 163,
    Character = 164,
    LDQUOTE = 165,
    UDQUOTE = 166,
    UDQUOTE2 = 167,
    U8DQUOTE = 168,
    DQUOTE = 169,
    StringContent = 170,
    EscapeSequence = 171,
    SystemLibString = 172,
    True = 173,
    False = 174,
    NULL = 175,
    Nullptr = 176,
    Comment = 177,
    Auto = 178,
    Decltype3 = 179,
    Final = 180,
    Override = 181,
    Explicit = 182,
    Typename = 183,
    Template = 184,
    GT2 = 185,
    Operator = 186,
    Try2 = 187,
    Delete = 188,
    PureVirtualClauseToken1 = 189,
    Friend = 190,
    Public = 191,
    Private = 192,
    Protected = 193,
    Noexcept2 = 194,
    Throw = 195,
    Namespace = 196,
    Using = 197,
    StaticAssert = 198,
    Concept = 199,
    CoReturn = 200,
    CoYield = 201,
    Catch = 202,
    RDQUOTE = 203,
    LRDQUOTE = 204,
    URDQUOTE = 205,
    URDQUOTE2 = 206,
    U8RDQUOTE = 207,
    CoAwait = 208,
    New = 209,
    Requires = 210,
    DASHGTSTAR = 211,
    LPARENRPAREN = 212,
    LBRACKRBRACK = 213,
    DQUOTEDQUOTE = 214,
    This = 215,
    LiteralSuffix = 216,
    AloneMacro = 217,
    AloneMacroCallToken1 = 218,
    CACHETRYINSPECT = 219,
    CACHETRYUNWRAP = 220,
    FORWARD = 221,
    FORWARDSETATTRIBUTE = 222,
    IDBTRYINSPECT = 223,
    IDBTRYUNWRAP = 224,
    LSTRYINSPECT = 225,
    LSTRYUNWRAP = 226,
    SDBTRYINSPECT = 227,
    SDBTRYUNWRAP = 228,
    PSGET = 229,
    PSGETANDSET = 230,
    PSGETLOCKLESS = 231,
    QMTRYINSPECT = 232,
    QMNOTEONLYTRYUNWRAP = 233,
    QMTRYUNWRAP = 234,
    QMWARNONLYTRYUNWRAP = 235,
    MacroStatement = 236,
    MOZALLOCATOR = 237,
    MOZALLOWTEMPORARY = 238,
    MOZALWAYSINLINE = 239,
    MOZALWAYSINLINEEVENDEBUG = 240,
    MOZASANBLACKLIST = 241,
    MOZCANRUNSCRIPT = 242,
    MOZCANRUNSCRIPTBOUNDARY = 243,
    MOZCANRUNSCRIPTFORDEFINITION = 244,
    MOZCOLD = 245,
    MOZFALLTHROUGH = 246,
    MOZFORMATPRINTF = 247,
    MOZHAVEANALYZERNORETURN = 248,
    MOZHAVEASANBLACKLIST = 249,
    MOZHAVENEVERINLINE = 250,
    MOZHAVENORETURN = 251,
    MOZHAVENORETURNPTR = 252,
    MOZHAVENOSANITIZEATTR = 253,
    MOZHAVESIGNEDOVERFLOWSANITIZEATTR = 254,
    MOZHAVEUNSIGNEDOVERFLOWSANITIZEATTR = 255,
    MOZHEAPALLOCATOR = 256,
    MOZHEAPCLASS = 257,
    MOZIMPLICIT = 258,
    MOZINHERITTYPEANNOTATIONSFROMTEMPLATEARGS = 259,
    MOZINITOUTSIDECTOR = 260,
    MOZISCLASSINIT = 261,
    MOZISREFPTR = 262,
    MOZISSMARTPTRTOREFCOUNTED = 263,
    MOZMAYBEUNUSED = 264,
    MOZMAYCALLAFTERMUSTRETURN = 265,
    MOZMUSTOVERRIDE = 266,
    MOZMUSTRETURNFROMCALLERIFTHISISARG = 267,
    MOZMUSTUSE = 268,
    MOZMUSTUSETYPE = 269,
    MOZNEEDSMEMMOVABLEMEMBERS = 270,
    MOZNEEDSMEMMOVABLETYPE = 271,
    MOZNEEDSNOVTABLETYPE = 272,
    MOZNEVERINLINE = 273,
    MOZNEVERINLINEDEBUG = 274,
    MOZNONHEAPCLASS = 275,
    MOZNONNULL = 276,
    MOZNONNULLRETURN = 277,
    MOZNONAUTOABLE = 278,
    MOZNONMEMMOVABLE = 279,
    MOZNONOWNINGREF = 280,
    MOZNONPARAM = 281,
    MOZNONTEMPORARYCLASS = 282,
    MOZNORETURN = 283,
    MOZNORETURNPTR = 284,
    MOZNOADDREFRELEASEONRETURN = 285,
    MOZNOARITHMETICEXPRINARGUMENT = 286,
    MOZNODANGLINGONTEMPORARIES = 287,
    MOZNOSANITIZESIGNEDOVERFLOW = 288,
    MOZNOSANITIZEUNSIGNEDOVERFLOW = 289,
    MOZONLYUSEDTOAVOIDSTATICCONSTRUCTORS = 290,
    MOZOWNINGREF = 291,
    MOZPOPDISABLENONTRIVIALUNIONWARNINGS = 292,
    MOZPRETENDNORETURNFORSTATICANALYSIS = 293,
    MOZPUSHDISABLENONTRIVIALUNIONWARNINGS = 294,
    MOZRAII = 295,
    MOZREQUIREDBASEMETHOD = 296,
    MOZSTACKCLASS = 297,
    MOZSTATICCLASS = 298,
    MOZSTATICLOCALCLASS = 299,
    MOZTEMPORARYCLASS = 300,
    MOZTRIVIALCTORDTOR = 301,
    MOZTSANBLACKLIST = 302,
    MOZUNSAFEREF = 303,
    MOZXPCOMABI = 304,
    JSPUBLICAPI = 305,
    RawStringDelimiter = 306,
    RawStringContent = 307,
    TranslationUnit = 308,
    TopLevelItem = 309,
    BlockItem = 310,
    PreprocInclude = 311,
    PreprocDef = 312,
    PreprocFunctionDef = 313,
    PreprocParams = 314,
    PreprocCall = 315,
    PreprocIf = 316,
    PreprocIfdef = 317,
    PreprocElse = 318,
    PreprocElif = 319,
    PreprocElifdef = 320,
    PreprocIf2 = 321,
    PreprocIfdef2 = 322,
    PreprocElse2 = 323,
    PreprocElif2 = 324,
    PreprocElifdef2 = 325,
    PreprocIf3 = 326,
    PreprocIfdef3 = 327,
    PreprocElse3 = 328,
    PreprocElif3 = 329,
    PreprocElifdef3 = 330,
    PreprocIf4 = 331,
    PreprocIfdef4 = 332,
    PreprocElse4 = 333,
    PreprocElif4 = 334,
    PreprocElifdef4 = 335,
    PreprocExpression = 336,
    ParenthesizedExpression = 337,
    PreprocDefined = 338,
    UnaryExpression = 339,
    CallExpression = 340,
    ArgumentList = 341,
    BinaryExpression = 342,
    FunctionDefinition = 343,
    Declaration = 344,
    TypeDefinition = 345,
    TypeDefinitionType = 346,
    TypeDefinitionDeclarators = 347,
    DeclarationModifiers = 348,
    DeclarationSpecifiers = 349,
    LinkageSpecification = 350,
    AttributeSpecifier = 351,
    Attribute = 352,
    AttributeDeclaration = 353,
    MsDeclspecModifier = 354,
    MsBasedModifier = 355,
    MsCallModifier = 356,
    MsUnalignedPtrModifier = 357,
    MsPointerModifier = 358,
    DeclarationList = 359,
    Declarator = 360,
    FieldDeclarator = 361,
    TypeDeclarator = 362,
    AbstractDeclarator = 363,
    ParenthesizedDeclarator = 364,
    ParenthesizedDeclarator2 = 365,
    ParenthesizedDeclarator3 = 366,
    AbstractParenthesizedDeclarator = 367,
    AttributedDeclarator = 368,
    AttributedDeclarator2 = 369,
    AttributedDeclarator3 = 370,
    PointerDeclarator = 371,
    PointerDeclarator2 = 372,
    PointerTypeDeclarator = 373,
    AbstractPointerDeclarator = 374,
    FunctionDeclarator = 375,
    FunctionDeclarator2 = 376,
    FunctionDeclarator3 = 377,
    AbstractFunctionDeclarator = 378,
    ArrayDeclarator = 379,
    ArrayDeclarator2 = 380,
    ArrayDeclarator3 = 381,
    AbstractArrayDeclarator = 382,
    InitDeclarator = 383,
    CompoundStatement = 384,
    StorageClassSpecifier = 385,
    TypeQualifier = 386,
    AlignasQualifier = 387,
    TypeSpecifier = 388,
    SizedTypeSpecifier = 389,
    EnumSpecifier = 390,
    EnumeratorList = 391,
    StructSpecifier = 392,
    UnionSpecifier = 393,
    FieldDeclarationList = 394,
    FieldDeclarationListItem = 395,
    FieldDeclaration = 396,
    BitfieldClause = 397,
    Enumerator = 398,
    ParameterList = 399,
    ParameterDeclaration = 400,
    AttributedStatement = 401,
    Statement = 402,
    TopLevelStatement = 403,
    LabeledStatement = 404,
    ExpressionStatement = 405,
    ExpressionStatement2 = 406,
    IfStatement = 407,
    ElseClause = 408,
    SwitchStatement = 409,
    CaseStatement = 410,
    WhileStatement = 411,
    DoStatement = 412,
    ForStatement = 413,
    ForStatementBody = 414,
    ReturnStatement = 415,
    BreakStatement = 416,
    ContinueStatement = 417,
    GotoStatement = 418,
    SehTryStatement = 419,
    SehExceptClause = 420,
    SehFinallyClause = 421,
    SehLeaveStatement = 422,
    Expression = 423,
    String = 424,
    CommaExpression = 425,
    ConditionalExpression = 426,
    AssignmentExpression = 427,
    PointerExpression = 428,
    UnaryExpression2 = 429,
    BinaryExpression2 = 430,
    UpdateExpression = 431,
    CastExpression = 432,
    TypeDescriptor = 433,
    SizeofExpression = 434,
    AlignofExpression = 435,
    OffsetofExpression = 436,
    GenericExpression = 437,
    SubscriptExpression = 438,
    CallExpression2 = 439,
    GnuAsmExpression = 440,
    GnuAsmQualifier = 441,
    GnuAsmOutputOperandList = 442,
    GnuAsmOutputOperand = 443,
    GnuAsmInputOperandList = 444,
    GnuAsmInputOperand = 445,
    GnuAsmClobberList = 446,
    GnuAsmGotoList = 447,
    ExtensionExpression = 448,
    ArgumentList2 = 449,
    FieldExpression = 450,
    CompoundLiteralExpression = 451,
    ParenthesizedExpression2 = 452,
    InitializerList = 453,
    InitializerPair = 454,
    SubscriptDesignator = 455,
    SubscriptRangeDesignator = 456,
    FieldDesignator = 457,
    CharLiteral = 458,
    ConcatenatedString = 459,
    StringLiteral = 460,
    Null = 461,
    EmptyDeclaration = 462,
    PlaceholderTypeSpecifier = 463,
    Decltype = 464,
    Decltype2 = 465,
    ClassDeclaration = 466,
    ClassDeclarationItem = 467,
    ClassSpecifier = 468,
    ClassName = 469,
    VirtualSpecifier = 470,
    ExplicitFunctionSpecifier = 471,
    BaseClassClause = 472,
    EnumBaseClause = 473,
    DependentType = 474,
    TemplateDeclaration = 475,
    TemplateInstantiation = 476,
    TemplateParameterList = 477,
    TypeParameterDeclaration = 478,
    VariadicTypeParameterDeclaration = 479,
    OptionalTypeParameterDeclaration = 480,
    TemplateTemplateParameterDeclaration = 481,
    OptionalParameterDeclaration = 482,
    VariadicParameterDeclaration = 483,
    VariadicDeclarator = 484,
    ReferenceDeclarator = 485,
    OperatorCast = 486,
    FieldInitializerList = 487,
    FieldInitializer = 488,
    FunctionDefinition2 = 489,
    ConstructorSpecifiers = 490,
    FunctionDefinition3 = 491,
    Declaration2 = 492,
    TryStatement = 493,
    FunctionDefinition4 = 494,
    Declaration3 = 495,
    DefaultMethodClause = 496,
    DeleteMethodClause = 497,
    PureVirtualClause = 498,
    FriendDeclaration = 499,
    AccessSpecifier = 500,
    ReferenceDeclarator2 = 501,
    ReferenceDeclarator3 = 502,
    ReferenceDeclarator4 = 503,
    AbstractReferenceDeclarator = 504,
    StructuredBindingDeclarator = 505,
    RefQualifier = 506,
    FunctionDeclaratorSeq = 507,
    FunctionAttributesStart = 508,
    FunctionExceptionSpecification = 509,
    FunctionAttributesEnd = 510,
    FunctionPostfix = 511,
    TrailingReturnType = 512,
    Noexcept = 513,
    ThrowSpecifier = 514,
    TemplateType = 515,
    TemplateMethod = 516,
    TemplateFunction = 517,
    TemplateArgumentList = 518,
    NamespaceDefinition = 519,
    NamespaceAliasDefinition = 520,
    NamespaceSpecifier = 521,
    NestedNamespaceSpecifier = 522,
    UsingDeclaration = 523,
    AliasDeclaration = 524,
    StaticAssertDeclaration = 525,
    ConceptDefinition = 526,
    ForRangeLoop = 527,
    ForRangeLoopBody = 528,
    InitStatement = 529,
    ConditionClause = 530,
    Declaration4 = 531,
    CoReturnStatement = 532,
    CoYieldStatement = 533,
    ThrowStatement = 534,
    TryStatement2 = 535,
    CatchClause = 536,
    RawStringLiteral = 537,
    SubscriptArgumentList = 538,
    CoAwaitExpression = 539,
    NewExpression = 540,
    NewDeclarator = 541,
    DeleteExpression = 542,
    TypeRequirement = 543,
    CompoundRequirement = 544,
    Requirement = 545,
    RequirementSeq = 546,
    ConstraintConjunction = 547,
    ConstraintDisjunction = 548,
    RequirementClauseConstraint = 549,
    RequiresClause = 550,
    ParameterList2 = 551,
    RequiresExpression = 552,
    LambdaExpression = 553,
    LambdaCaptureSpecifier = 554,
    LambdaDefaultCapture = 555,
    LambdaCaptureIdentifier = 556,
    LambdaCaptureInitializer = 557,
    LambdaCapture = 558,
    FoldOperator = 559,
    BinaryFoldOperator = 560,
    UnaryLeftFold = 561,
    UnaryRightFold = 562,
    BinaryFold = 563,
    FoldExpression = 564,
    ParameterPackExpansion = 565,
    ParameterPackExpansion2 = 566,
    ParameterPackExpansion3 = 567,
    DestructorName = 568,
    DependentName = 569,
    DependentName2 = 570,
    DependentName3 = 571,
    ScopeResolution = 572,
    QualifiedIdentifier = 573,
    QualifiedIdentifier2 = 574,
    QualifiedIdentifier3 = 575,
    QualifiedIdentifier4 = 576,
    AssignmentExpression2 = 577,
    OperatorName = 578,
    UserDefinedLiteral = 579,
    AloneMacroCall = 580,
    CallMacroWithDeclFirstArg = 581,
    MacroAnnotation = 582,
    TranslationUnitRepeat1 = 583,
    PreprocParamsRepeat1 = 584,
    PreprocIfRepeat1 = 585,
    PreprocIfInFieldDeclarationListRepeat1 = 586,
    PreprocIfInEnumeratorListRepeat1 = 587,
    PreprocIfInEnumeratorListNoCommaRepeat1 = 588,
    PreprocArgumentListRepeat1 = 589,
    DeclarationRepeat1 = 590,
    TypeDefinitionRepeat1 = 591,
    TypeDefinitionTypeRepeat1 = 592,
    TypeDefinitionDeclaratorsRepeat1 = 593,
    DeclarationSpecifiersRepeat1 = 594,
    AttributeDeclarationRepeat1 = 595,
    AttributedDeclaratorRepeat1 = 596,
    PointerDeclaratorRepeat1 = 597,
    ArrayDeclaratorRepeat1 = 598,
    SizedTypeSpecifierRepeat1 = 599,
    EnumeratorListRepeat1 = 600,
    FieldDeclarationRepeat1 = 601,
    ParameterListRepeat1 = 602,
    CaseStatementRepeat1 = 603,
    GenericExpressionRepeat1 = 604,
    GnuAsmExpressionRepeat1 = 605,
    GnuAsmOutputOperandListRepeat1 = 606,
    GnuAsmInputOperandListRepeat1 = 607,
    GnuAsmClobberListRepeat1 = 608,
    GnuAsmGotoListRepeat1 = 609,
    ArgumentListRepeat1 = 610,
    InitializerListRepeat1 = 611,
    InitializerPairRepeat1 = 612,
    CharLiteralRepeat1 = 613,
    ConcatenatedStringRepeat1 = 614,
    StringLiteralRepeat1 = 615,
    ClassDeclarationRepeat1 = 616,
    ClassSpecifierRepeat1 = 617,
    BaseClassClauseRepeat1 = 618,
    TemplateParameterListRepeat1 = 619,
    FieldInitializerListRepeat1 = 620,
    OperatorCastDefinitionRepeat1 = 621,
    ConstructorTryStatementRepeat1 = 622,
    StructuredBindingDeclaratorRepeat1 = 623,
    FunctionPostfixRepeat1 = 624,
    ThrowSpecifierRepeat1 = 625,
    TemplateArgumentListRepeat1 = 626,
    SubscriptArgumentListRepeat1 = 627,
    RequirementSeqRepeat1 = 628,
    RequiresParameterListRepeat1 = 629,
    LambdaCaptureSpecifierRepeat1 = 630,
    AloneMacroCallRepeat1 = 631,
    CallMacroWithDeclFirstArgRepeat1 = 632,
    FieldIdentifier = 633,
    NamespaceIdentifier = 634,
    SimpleRequirement = 635,
    StatementIdentifier = 636,
    TypeIdentifier = 637,
    Error = 638,
}

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::PreprocIncludeToken2 => "preproc_include_token2",
            Cpp::HASHdefine => "#define",
            Cpp::LPAREN => "(",
            Cpp::DOTDOTDOT => "...",
            Cpp::COMMA => ",",
            Cpp::RPAREN => ")",
            Cpp::HASHif => "#if",
            Cpp::LF => "\n",
            Cpp::HASHendif => "#endif",
            Cpp::HASHifdef => "#ifdef",
            Cpp::HASHifndef => "#ifndef",
            Cpp::HASHelse => "#else",
            Cpp::HASHelif => "#elif",
            Cpp::HASHelifdef => "#elifdef",
            Cpp::HASHelifndef => "#elifndef",
            Cpp::PreprocArg => "preproc_arg",
            Cpp::PreprocDirective => "preproc_directive",
            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::Extension => "__extension__",
            Cpp::Typedef => "typedef",
            Cpp::Virtual => "virtual",
            Cpp::Extern => "extern",
            Cpp::Attribute2 => "__attribute__",
            Cpp::Attribute3 => "__attribute",
            Cpp::COLONCOLON => "::",
            Cpp::LBRACKLBRACK => "[[",
            Cpp::RBRACKRBRACK => "]]",
            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::Signed => "signed",
            Cpp::Unsigned => "unsigned",
            Cpp::Long => "long",
            Cpp::Short => "short",
            Cpp::LBRACK => "[",
            Cpp::Static => "static",
            Cpp::RBRACK => "]",
            Cpp::EQ => "=",
            Cpp::Register => "register",
            Cpp::Inline => "inline",
            Cpp::Inline2 => "__inline",
            Cpp::Inline3 => "__inline__",
            Cpp::Forceinline => "__forceinline",
            Cpp::ThreadLocal => "thread_local",
            Cpp::Thread => "__thread",
            Cpp::Const => "const",
            Cpp::Constexpr => "constexpr",
            Cpp::Volatile => "volatile",
            Cpp::Restrict => "restrict",
            Cpp::Restrict2 => "__restrict__",
            Cpp::Atomic => "_Atomic",
            Cpp::Noreturn => "_Noreturn",
            Cpp::Noreturn2 => "noreturn",
            Cpp::Nonnull => "_Nonnull",
            Cpp::Mutable => "mutable",
            Cpp::Constinit => "constinit",
            Cpp::Consteval => "consteval",
            Cpp::Alignas => "alignas",
            Cpp::Alignas2 => "_Alignas",
            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::Try => "__try",
            Cpp::Except => "__except",
            Cpp::Finally => "__finally",
            Cpp::Leave => "__leave",
            Cpp::QMARK => "?",
            Cpp::STAREQ => "*=",
            Cpp::SLASHEQ => "/=",
            Cpp::PERCENTEQ => "%=",
            Cpp::PLUSEQ => "+=",
            Cpp::DASHEQ => "-=",
            Cpp::LTLTEQ => "<<=",
            Cpp::GTGTEQ => ">>=",
            Cpp::AMPEQ => "&=",
            Cpp::CARETEQ => "^=",
            Cpp::PIPEEQ => "|=",
            Cpp::AndEq => "and_eq",
            Cpp::OrEq => "or_eq",
            Cpp::XorEq => "xor_eq",
            Cpp::Not => "not",
            Cpp::Compl => "compl",
            Cpp::LTEQGT => "<=>",
            Cpp::Or => "or",
            Cpp::And => "and",
            Cpp::Bitor => "bitor",
            Cpp::Xor => "xor",
            Cpp::Bitand => "bitand",
            Cpp::NotEq => "not_eq",
            Cpp::DASHDASH => "--",
            Cpp::PLUSPLUS => "++",
            Cpp::Sizeof => "sizeof",
            Cpp::Alignof => "__alignof__",
            Cpp::Alignof2 => "__alignof",
            Cpp::Alignof3 => "_alignof",
            Cpp::Alignof4 => "alignof",
            Cpp::Alignof5 => "_Alignof",
            Cpp::Offsetof => "offsetof",
            Cpp::Generic => "_Generic",
            Cpp::Asm => "asm",
            Cpp::Asm2 => "__asm__",
            Cpp::Asm3 => "__asm",
            Cpp::Volatile2 => "__volatile__",
            Cpp::DOT => ".",
            Cpp::DOTSTAR => ".*",
            Cpp::DASHGT => "->",
            Cpp::NumberLiteral => "number_literal",
            Cpp::LSQUOTE => "L'",
            Cpp::USQUOTE => "u'",
            Cpp::USQUOTE2 => "U'",
            Cpp::U8SQUOTE => "u8'",
            Cpp::SQUOTE => "'",
            Cpp::Character => "character",
            Cpp::LDQUOTE => "L\"",
            Cpp::UDQUOTE => "u\"",
            Cpp::UDQUOTE2 => "U\"",
            Cpp::U8DQUOTE => "u8\"",
            Cpp::DQUOTE => "\"",
            Cpp::StringContent => "string_content",
            Cpp::EscapeSequence => "escape_sequence",
            Cpp::SystemLibString => "system_lib_string",
            Cpp::True => "true",
            Cpp::False => "false",
            Cpp::NULL => "NULL",
            Cpp::Nullptr => "nullptr",
            Cpp::Comment => "comment",
            Cpp::Auto => "auto",
            Cpp::Decltype3 => "decltype",
            Cpp::Final => "final",
            Cpp::Override => "override",
            Cpp::Explicit => "explicit",
            Cpp::Typename => "typename",
            Cpp::Template => "template",
            Cpp::GT2 => ">",
            Cpp::Operator => "operator",
            Cpp::Try2 => "try",
            Cpp::Delete => "delete",
            Cpp::PureVirtualClauseToken1 => "pure_virtual_clause_token1",
            Cpp::Friend => "friend",
            Cpp::Public => "public",
            Cpp::Private => "private",
            Cpp::Protected => "protected",
            Cpp::Noexcept2 => "noexcept",
            Cpp::Throw => "throw",
            Cpp::Namespace => "namespace",
            Cpp::Using => "using",
            Cpp::StaticAssert => "static_assert",
            Cpp::Concept => "concept",
            Cpp::CoReturn => "co_return",
            Cpp::CoYield => "co_yield",
            Cpp::Catch => "catch",
            Cpp::RDQUOTE => "R\"",
            Cpp::LRDQUOTE => "LR\"",
            Cpp::URDQUOTE => "uR\"",
            Cpp::URDQUOTE2 => "UR\"",
            Cpp::U8RDQUOTE => "u8R\"",
            Cpp::CoAwait => "co_await",
            Cpp::New => "new",
            Cpp::Requires => "requires",
            Cpp::DASHGTSTAR => "->*",
            Cpp::LPARENRPAREN => "()",
            Cpp::LBRACKRBRACK => "[]",
            Cpp::DQUOTEDQUOTE => "\"\"",
            Cpp::This => "this",
            Cpp::LiteralSuffix => "literal_suffix",
            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::MacroStatement => "macro_statement",
            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::RawStringDelimiter => "raw_string_delimiter",
            Cpp::RawStringContent => "raw_string_content",
            Cpp::TranslationUnit => "translation_unit",
            Cpp::TopLevelItem => "_top_level_item",
            Cpp::BlockItem => "_block_item",
            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::PreprocElifdef => "preproc_elifdef",
            Cpp::PreprocIf2 => "preproc_if",
            Cpp::PreprocIfdef2 => "preproc_ifdef",
            Cpp::PreprocElse2 => "preproc_else",
            Cpp::PreprocElif2 => "preproc_elif",
            Cpp::PreprocElifdef2 => "preproc_elifdef",
            Cpp::PreprocIf3 => "preproc_if",
            Cpp::PreprocIfdef3 => "preproc_ifdef",
            Cpp::PreprocElse3 => "preproc_else",
            Cpp::PreprocElif3 => "preproc_elif",
            Cpp::PreprocElifdef3 => "preproc_elifdef",
            Cpp::PreprocIf4 => "preproc_if",
            Cpp::PreprocIfdef4 => "preproc_ifdef",
            Cpp::PreprocElse4 => "preproc_else",
            Cpp::PreprocElif4 => "preproc_elif",
            Cpp::PreprocElifdef4 => "preproc_elifdef",
            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::TypeDefinitionType => "_type_definition_type",
            Cpp::TypeDefinitionDeclarators => "_type_definition_declarators",
            Cpp::DeclarationModifiers => "_declaration_modifiers",
            Cpp::DeclarationSpecifiers => "_declaration_specifiers",
            Cpp::LinkageSpecification => "linkage_specification",
            Cpp::AttributeSpecifier => "attribute_specifier",
            Cpp::Attribute => "attribute",
            Cpp::AttributeDeclaration => "attribute_declaration",
            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::AttributedDeclarator => "attributed_declarator",
            Cpp::AttributedDeclarator2 => "attributed_declarator",
            Cpp::AttributedDeclarator3 => "attributed_declarator",
            Cpp::PointerDeclarator => "pointer_declarator",
            Cpp::PointerDeclarator2 => "pointer_declarator",
            Cpp::PointerTypeDeclarator => "pointer_type_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::AlignasQualifier => "alignas_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::AttributedStatement => "attributed_statement",
            Cpp::Statement => "statement",
            Cpp::TopLevelStatement => "_top_level_statement",
            Cpp::LabeledStatement => "labeled_statement",
            Cpp::ExpressionStatement => "expression_statement",
            Cpp::ExpressionStatement2 => "expression_statement",
            Cpp::IfStatement => "if_statement",
            Cpp::ElseClause => "else_clause",
            Cpp::SwitchStatement => "switch_statement",
            Cpp::CaseStatement => "case_statement",
            Cpp::WhileStatement => "while_statement",
            Cpp::DoStatement => "do_statement",
            Cpp::ForStatement => "for_statement",
            Cpp::ForStatementBody => "_for_statement_body",
            Cpp::ReturnStatement => "return_statement",
            Cpp::BreakStatement => "break_statement",
            Cpp::ContinueStatement => "continue_statement",
            Cpp::GotoStatement => "goto_statement",
            Cpp::SehTryStatement => "seh_try_statement",
            Cpp::SehExceptClause => "seh_except_clause",
            Cpp::SehFinallyClause => "seh_finally_clause",
            Cpp::SehLeaveStatement => "seh_leave_statement",
            Cpp::Expression => "expression",
            Cpp::String => "_string",
            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::AlignofExpression => "alignof_expression",
            Cpp::OffsetofExpression => "offsetof_expression",
            Cpp::GenericExpression => "generic_expression",
            Cpp::SubscriptExpression => "subscript_expression",
            Cpp::CallExpression2 => "call_expression",
            Cpp::GnuAsmExpression => "gnu_asm_expression",
            Cpp::GnuAsmQualifier => "gnu_asm_qualifier",
            Cpp::GnuAsmOutputOperandList => "gnu_asm_output_operand_list",
            Cpp::GnuAsmOutputOperand => "gnu_asm_output_operand",
            Cpp::GnuAsmInputOperandList => "gnu_asm_input_operand_list",
            Cpp::GnuAsmInputOperand => "gnu_asm_input_operand",
            Cpp::GnuAsmClobberList => "gnu_asm_clobber_list",
            Cpp::GnuAsmGotoList => "gnu_asm_goto_list",
            Cpp::ExtensionExpression => "extension_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::SubscriptRangeDesignator => "subscript_range_designator",
            Cpp::FieldDesignator => "field_designator",
            Cpp::CharLiteral => "char_literal",
            Cpp::ConcatenatedString => "concatenated_string",
            Cpp::StringLiteral => "string_literal",
            Cpp::Null => "null",
            Cpp::EmptyDeclaration => "_empty_declaration",
            Cpp::PlaceholderTypeSpecifier => "placeholder_type_specifier",
            Cpp::Decltype => "decltype",
            Cpp::Decltype2 => "decltype",
            Cpp::ClassDeclaration => "_class_declaration",
            Cpp::ClassDeclarationItem => "_class_declaration_item",
            Cpp::ClassSpecifier => "class_specifier",
            Cpp::ClassName => "_class_name",
            Cpp::VirtualSpecifier => "virtual_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::TryStatement => "try_statement",
            Cpp::FunctionDefinition4 => "function_definition",
            Cpp::Declaration3 => "declaration",
            Cpp::DefaultMethodClause => "default_method_clause",
            Cpp::DeleteMethodClause => "delete_method_clause",
            Cpp::PureVirtualClause => "pure_virtual_clause",
            Cpp::FriendDeclaration => "friend_declaration",
            Cpp::AccessSpecifier => "access_specifier",
            Cpp::ReferenceDeclarator2 => "reference_declarator",
            Cpp::ReferenceDeclarator3 => "reference_declarator",
            Cpp::ReferenceDeclarator4 => "reference_declarator",
            Cpp::AbstractReferenceDeclarator => "abstract_reference_declarator",
            Cpp::StructuredBindingDeclarator => "structured_binding_declarator",
            Cpp::RefQualifier => "ref_qualifier",
            Cpp::FunctionDeclaratorSeq => "_function_declarator_seq",
            Cpp::FunctionAttributesStart => "_function_attributes_start",
            Cpp::FunctionExceptionSpecification => "_function_exception_specification",
            Cpp::FunctionAttributesEnd => "_function_attributes_end",
            Cpp::FunctionPostfix => "_function_postfix",
            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::NamespaceAliasDefinition => "namespace_alias_definition",
            Cpp::NamespaceSpecifier => "_namespace_specifier",
            Cpp::NestedNamespaceSpecifier => "nested_namespace_specifier",
            Cpp::UsingDeclaration => "using_declaration",
            Cpp::AliasDeclaration => "alias_declaration",
            Cpp::StaticAssertDeclaration => "static_assert_declaration",
            Cpp::ConceptDefinition => "concept_definition",
            Cpp::ForRangeLoop => "for_range_loop",
            Cpp::ForRangeLoopBody => "_for_range_loop_body",
            Cpp::InitStatement => "init_statement",
            Cpp::ConditionClause => "condition_clause",
            Cpp::Declaration4 => "declaration",
            Cpp::CoReturnStatement => "co_return_statement",
            Cpp::CoYieldStatement => "co_yield_statement",
            Cpp::ThrowStatement => "throw_statement",
            Cpp::TryStatement2 => "try_statement",
            Cpp::CatchClause => "catch_clause",
            Cpp::RawStringLiteral => "raw_string_literal",
            Cpp::SubscriptArgumentList => "subscript_argument_list",
            Cpp::CoAwaitExpression => "co_await_expression",
            Cpp::NewExpression => "new_expression",
            Cpp::NewDeclarator => "new_declarator",
            Cpp::DeleteExpression => "delete_expression",
            Cpp::TypeRequirement => "type_requirement",
            Cpp::CompoundRequirement => "compound_requirement",
            Cpp::Requirement => "_requirement",
            Cpp::RequirementSeq => "requirement_seq",
            Cpp::ConstraintConjunction => "constraint_conjunction",
            Cpp::ConstraintDisjunction => "constraint_disjunction",
            Cpp::RequirementClauseConstraint => "_requirement_clause_constraint",
            Cpp::RequiresClause => "requires_clause",
            Cpp::ParameterList2 => "parameter_list",
            Cpp::RequiresExpression => "requires_expression",
            Cpp::LambdaExpression => "lambda_expression",
            Cpp::LambdaCaptureSpecifier => "lambda_capture_specifier",
            Cpp::LambdaDefaultCapture => "lambda_default_capture",
            Cpp::LambdaCaptureIdentifier => "_lambda_capture_identifier",
            Cpp::LambdaCaptureInitializer => "lambda_capture_initializer",
            Cpp::LambdaCapture => "_lambda_capture",
            Cpp::FoldOperator => "_fold_operator",
            Cpp::BinaryFoldOperator => "_binary_fold_operator",
            Cpp::UnaryLeftFold => "_unary_left_fold",
            Cpp::UnaryRightFold => "_unary_right_fold",
            Cpp::BinaryFold => "_binary_fold",
            Cpp::FoldExpression => "fold_expression",
            Cpp::ParameterPackExpansion => "parameter_pack_expansion",
            Cpp::ParameterPackExpansion2 => "parameter_pack_expansion",
            Cpp::ParameterPackExpansion3 => "parameter_pack_expansion",
            Cpp::DestructorName => "destructor_name",
            Cpp::DependentName => "dependent_name",
            Cpp::DependentName2 => "dependent_name",
            Cpp::DependentName3 => "dependent_name",
            Cpp::ScopeResolution => "_scope_resolution",
            Cpp::QualifiedIdentifier => "qualified_identifier",
            Cpp::QualifiedIdentifier2 => "qualified_identifier",
            Cpp::QualifiedIdentifier3 => "qualified_identifier",
            Cpp::QualifiedIdentifier4 => "qualified_identifier",
            Cpp::AssignmentExpression2 => "assignment_expression",
            Cpp::OperatorName => "operator_name",
            Cpp::UserDefinedLiteral => "user_defined_literal",
            Cpp::AloneMacroCall => "alone_macro_call",
            Cpp::CallMacroWithDeclFirstArg => "_call_macro_with_decl_first_arg",
            Cpp::MacroAnnotation => "macro_annotation",
            Cpp::TranslationUnitRepeat1 => "translation_unit_repeat1",
            Cpp::PreprocParamsRepeat1 => "preproc_params_repeat1",
            Cpp::PreprocIfRepeat1 => "preproc_if_repeat1",
            Cpp::PreprocIfInFieldDeclarationListRepeat1 => {
                "preproc_if_in_field_declaration_list_repeat1"
            }
            Cpp::PreprocIfInEnumeratorListRepeat1 => "preproc_if_in_enumerator_list_repeat1",
            Cpp::PreprocIfInEnumeratorListNoCommaRepeat1 => {
                "preproc_if_in_enumerator_list_no_comma_repeat1"
            }
            Cpp::PreprocArgumentListRepeat1 => "preproc_argument_list_repeat1",
            Cpp::DeclarationRepeat1 => "declaration_repeat1",
            Cpp::TypeDefinitionRepeat1 => "type_definition_repeat1",
            Cpp::TypeDefinitionTypeRepeat1 => "_type_definition_type_repeat1",
            Cpp::TypeDefinitionDeclaratorsRepeat1 => "_type_definition_declarators_repeat1",
            Cpp::DeclarationSpecifiersRepeat1 => "_declaration_specifiers_repeat1",
            Cpp::AttributeDeclarationRepeat1 => "attribute_declaration_repeat1",
            Cpp::AttributedDeclaratorRepeat1 => "attributed_declarator_repeat1",
            Cpp::PointerDeclaratorRepeat1 => "pointer_declarator_repeat1",
            Cpp::ArrayDeclaratorRepeat1 => "array_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::GenericExpressionRepeat1 => "generic_expression_repeat1",
            Cpp::GnuAsmExpressionRepeat1 => "gnu_asm_expression_repeat1",
            Cpp::GnuAsmOutputOperandListRepeat1 => "gnu_asm_output_operand_list_repeat1",
            Cpp::GnuAsmInputOperandListRepeat1 => "gnu_asm_input_operand_list_repeat1",
            Cpp::GnuAsmClobberListRepeat1 => "gnu_asm_clobber_list_repeat1",
            Cpp::GnuAsmGotoListRepeat1 => "gnu_asm_goto_list_repeat1",
            Cpp::ArgumentListRepeat1 => "argument_list_repeat1",
            Cpp::InitializerListRepeat1 => "initializer_list_repeat1",
            Cpp::InitializerPairRepeat1 => "initializer_pair_repeat1",
            Cpp::CharLiteralRepeat1 => "char_literal_repeat1",
            Cpp::ConcatenatedStringRepeat1 => "concatenated_string_repeat1",
            Cpp::StringLiteralRepeat1 => "string_literal_repeat1",
            Cpp::ClassDeclarationRepeat1 => "_class_declaration_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::OperatorCastDefinitionRepeat1 => "operator_cast_definition_repeat1",
            Cpp::ConstructorTryStatementRepeat1 => "constructor_try_statement_repeat1",
            Cpp::StructuredBindingDeclaratorRepeat1 => "structured_binding_declarator_repeat1",
            Cpp::FunctionPostfixRepeat1 => "_function_postfix_repeat1",
            Cpp::ThrowSpecifierRepeat1 => "throw_specifier_repeat1",
            Cpp::TemplateArgumentListRepeat1 => "template_argument_list_repeat1",
            Cpp::SubscriptArgumentListRepeat1 => "subscript_argument_list_repeat1",
            Cpp::RequirementSeqRepeat1 => "requirement_seq_repeat1",
            Cpp::RequiresParameterListRepeat1 => "requires_parameter_list_repeat1",
            Cpp::LambdaCaptureSpecifierRepeat1 => "lambda_capture_specifier_repeat1",
            Cpp::AloneMacroCallRepeat1 => "alone_macro_call_repeat1",
            Cpp::CallMacroWithDeclFirstArgRepeat1 => "_call_macro_with_decl_first_arg_repeat1",
            Cpp::FieldIdentifier => "field_identifier",
            Cpp::NamespaceIdentifier => "namespace_identifier",
            Cpp::SimpleRequirement => "simple_requirement",
            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)
    }
}

// Cpp == u16
impl PartialEq<u16> for Cpp {
    #[inline(always)]
    fn eq(&self, x: &u16) -> bool {
        *self == Into::<Self>::into(*x)
    }
}

// u16 == Cpp
impl PartialEq<Cpp> for u16 {
    #[inline(always)]
    fn eq(&self, x: &Cpp) -> bool {
        *x == *self
    }
}