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
// Code generated; DO NOT EDIT.

use num_derive::FromPrimitive;

#[derive(Clone, Debug, PartialEq, Eq, FromPrimitive)]
pub enum Kotlin {
    End = 0,
    Identifier = 1,
    AT = 2,
    File = 3,
    COLON = 4,
    LBRACK = 5,
    RBRACK = 6,
    Package = 7,
    SEMI = 8,
    Import2 = 9,
    DOT = 10,
    STAR = 11,
    As = 12,
    Class = 13,
    Fun = 14,
    Interface = 15,
    Object = 16,
    Val = 17,
    Var = 18,
    EQ = 19,
    Typealias = 20,
    Companion = 21,
    Init = 22,
    Constructor = 23,
    This = 24,
    Super = 25,
    LT = 26,
    COMMA = 27,
    GT = 28,
    LPAREN = 29,
    RPAREN = 30,
    Where = 31,
    By = 32,
    Get = 33,
    Set = 34,
    LBRACE = 35,
    RBRACE = 36,
    For = 37,
    In = 38,
    While = 39,
    Do = 40,
    Enum = 41,
    Sealed = 42,
    Annotation2 = 43,
    Data = 44,
    Inner = 45,
    Value = 46,
    Tailrec = 47,
    Operator = 48,
    Infix = 49,
    Inline = 50,
    External = 51,
    Suspend = 52,
    Const = 53,
    Public = 54,
    Private = 55,
    Protected = 56,
    Internal = 57,
    Abstract = 58,
    Final = 59,
    Open = 60,
    Override = 61,
    Lateinit = 62,
    Vararg = 63,
    Noinline = 64,
    Crossinline = 65,
    ReificationModifier = 66,
    Expect = 67,
    Actual = 68,
    Field = 69,
    Property = 70,
    Receiver = 71,
    Param = 72,
    Setparam = 73,
    Delegate = 74,
    Dynamic = 75,
    QMARK = 76,
    AMP = 77,
    DASHGT = 78,
    PLUSEQ = 79,
    DASHEQ = 80,
    STAREQ = 81,
    SLASHEQ = 82,
    PERCENTEQ = 83,
    PLUSPLUS = 84,
    DASHDASH = 85,
    PLUS = 86,
    DASH = 87,
    BANG = 88,
    BANGBANG = 89,
    SLASH = 90,
    PERCENT = 91,
    PIPEPIPE = 92,
    AMPAMP = 93,
    BANGEQ = 94,
    BANGEQEQ = 95,
    EQEQ = 96,
    EQEQEQ = 97,
    GTEQ = 98,
    LTEQ = 99,
    QMARKCOLON = 100,
    BANGin = 101,
    Is = 102,
    AsQMARK = 103,
    DOTDOT = 104,
    DOTDOTLT = 105,
    ThisAT = 106,
    SuperAT = 107,
    AT2 = 108,
    If = 109,
    Else = 110,
    When = 111,
    Try = 112,
    Catch = 113,
    Finally = 114,
    Return = 115,
    ReturnAT = 116,
    Throw = 117,
    COLONCOLON = 118,
    DQUOTE = 119,
    StringContent = 120,
    StringContent2 = 121,
    DOLLAR = 122,
    DQUOTEDQUOTEDQUOTE = 123,
    DQUOTEDQUOTEDQUOTEDQUOTE = 124,
    DOLLARLBRACE = 125,
    SQUOTE = 126,
    CharacterLiteralToken1 = 127,
    EscapeSequence = 128,
    NumberLiteral = 129,
    FloatLiteral = 130,
    Out = 131,
    Label = 132,
    Shebang = 133,
    LineComment = 134,
    Semi = 135,
    ClassMemberSemi = 136,
    BlockComment = 137,
    BANGis = 138,
    In2 = 139,
    QMARKDOT = 140,
    StringContent3 = 141,
    SourceFile = 142,
    FileAnnotation = 143,
    PackageHeader = 144,
    Import = 145,
    Declaration = 146,
    ClassDeclaration = 147,
    ObjectDeclaration = 148,
    PropertyDeclaration = 149,
    TypeAlias = 150,
    CompanionObject = 151,
    AnonymousInitializer = 152,
    SecondaryConstructor = 153,
    ConstructorDelegationCall = 154,
    TypeParameters = 155,
    TypeParameter = 156,
    PrimaryConstructor = 157,
    ClassParameters = 158,
    ClassParameter = 159,
    TypeConstraints = 160,
    TypeConstraint = 161,
    ConstructorInvocation = 162,
    FunctionDeclaration = 163,
    FunctionValueParameters = 164,
    Parameter = 165,
    DelegationSpecifiers = 166,
    DelegationSpecifier = 167,
    VariableDeclaration = 168,
    MultiVariableDeclaration = 169,
    PropertyDelegate = 170,
    ExplicitDelegation = 171,
    Getter = 172,
    Setter = 173,
    FunctionBody = 174,
    Block = 175,
    ForStatement = 176,
    WhileStatement = 177,
    DoWhileStatement = 178,
    ClassBody = 179,
    ClassMemberDeclaration = 180,
    EnumClassBody = 181,
    EnumEntry = 182,
    ValueArguments = 183,
    ValueArgument = 184,
    Statement = 185,
    Modifiers = 186,
    ClassModifier = 187,
    FunctionModifier = 188,
    PropertyModifier = 189,
    VisibilityModifier = 190,
    InheritanceModifier = 191,
    MemberModifier = 192,
    ParameterModifiers = 193,
    ParameterModifier = 194,
    PlatformModifier = 195,
    TypeModifiers = 196,
    Annotation = 197,
    UseSiteTarget = 198,
    UnescapedAnnotation = 199,
    Type = 200,
    UserType = 201,
    SimpleUserType = 202,
    NullableType = 203,
    NonNullableType = 204,
    ReceiverType = 205,
    TypeArguments = 206,
    TypeProjection = 207,
    FunctionType = 208,
    FunctionTypeParameters = 209,
    ParenthesizedType = 210,
    Assignment = 211,
    Expression = 212,
    PrimaryExpression = 213,
    UnaryExpression = 214,
    AnnotatedExpression = 215,
    LabeledExpression = 216,
    BinaryExpression = 217,
    InExpression = 218,
    IsExpression = 219,
    AsExpression = 220,
    SpreadExpression = 221,
    RangeExpression = 222,
    InfixExpression = 223,
    CallExpression = 224,
    AnnotatedLambda = 225,
    LambdaLiteral = 226,
    LambdaParameters = 227,
    LambdaParameter = 228,
    AnonymousFunction = 229,
    IndexExpression = 230,
    ThisExpression = 231,
    SuperExpression = 232,
    IfExpression = 233,
    ParenthesizedExpression = 234,
    CollectionLiteral = 235,
    WhenExpression = 236,
    WhenSubject = 237,
    WhenEntry = 238,
    WhenCondition = 239,
    RangeTest = 240,
    TypeTest = 241,
    TryExpression = 242,
    CatchBlock = 243,
    FinallyBlock = 244,
    ReturnExpression = 245,
    ThrowExpression = 246,
    CallableReference = 247,
    NavigationExpression = 248,
    ObjectLiteral = 249,
    StringLiteral = 250,
    MultilineStringLiteral = 251,
    Interpolation = 252,
    CharacterLiteral = 253,
    VarianceModifier = 254,
    TypeParameterModifiers = 255,
    QualifiedIdentifier = 256,
    ReservedIdentifier = 257,
    SourceFileRepeat1 = 258,
    SourceFileRepeat2 = 259,
    SourceFileRepeat3 = 260,
    FileAnnotationRepeat1 = 261,
    TypeParametersRepeat1 = 262,
    ClassParametersRepeat1 = 263,
    TypeConstraintsRepeat1 = 264,
    FunctionValueParametersRepeat1 = 265,
    DelegationSpecifiersRepeat1 = 266,
    DelegationSpecifierRepeat1 = 267,
    MultiVariableDeclarationRepeat1 = 268,
    ClassBodyRepeat1 = 269,
    EnumClassBodyRepeat1 = 270,
    ValueArgumentsRepeat1 = 271,
    StatementsRepeat1 = 272,
    ModifiersRepeat1 = 273,
    ParameterModifiersRepeat1 = 274,
    TypeModifiersRepeat1 = 275,
    UserTypeRepeat1 = 276,
    TypeArgumentsRepeat1 = 277,
    TypeProjectionRepeat1 = 278,
    FunctionTypeParametersRepeat1 = 279,
    LambdaParametersRepeat1 = 280,
    IndexExpressionRepeat1 = 281,
    WhenExpressionRepeat1 = 282,
    WhenEntryRepeat1 = 283,
    TryExpressionRepeat1 = 284,
    StringLiteralRepeat1 = 285,
    MultilineStringLiteralRepeat1 = 286,
    TypeParameterModifiersRepeat1 = 287,
    QualifiedIdentifierRepeat1 = 288,
    Error = 289,
}

impl From<Kotlin> for &'static str {
    #[inline(always)]
    fn from(tok: Kotlin) -> Self {
        match tok {
            Kotlin::End => "end",
            Kotlin::Identifier => "identifier",
            Kotlin::AT => "@",
            Kotlin::File => "file",
            Kotlin::COLON => ":",
            Kotlin::LBRACK => "[",
            Kotlin::RBRACK => "]",
            Kotlin::Package => "package",
            Kotlin::SEMI => ";",
            Kotlin::Import2 => "import",
            Kotlin::DOT => ".",
            Kotlin::STAR => "*",
            Kotlin::As => "as",
            Kotlin::Class => "class",
            Kotlin::Fun => "fun",
            Kotlin::Interface => "interface",
            Kotlin::Object => "object",
            Kotlin::Val => "val",
            Kotlin::Var => "var",
            Kotlin::EQ => "=",
            Kotlin::Typealias => "typealias",
            Kotlin::Companion => "companion",
            Kotlin::Init => "init",
            Kotlin::Constructor => "constructor",
            Kotlin::This => "this",
            Kotlin::Super => "super",
            Kotlin::LT => "<",
            Kotlin::COMMA => ",",
            Kotlin::GT => ">",
            Kotlin::LPAREN => "(",
            Kotlin::RPAREN => ")",
            Kotlin::Where => "where",
            Kotlin::By => "by",
            Kotlin::Get => "get",
            Kotlin::Set => "set",
            Kotlin::LBRACE => "{",
            Kotlin::RBRACE => "}",
            Kotlin::For => "for",
            Kotlin::In => "in",
            Kotlin::While => "while",
            Kotlin::Do => "do",
            Kotlin::Enum => "enum",
            Kotlin::Sealed => "sealed",
            Kotlin::Annotation2 => "annotation",
            Kotlin::Data => "data",
            Kotlin::Inner => "inner",
            Kotlin::Value => "value",
            Kotlin::Tailrec => "tailrec",
            Kotlin::Operator => "operator",
            Kotlin::Infix => "infix",
            Kotlin::Inline => "inline",
            Kotlin::External => "external",
            Kotlin::Suspend => "suspend",
            Kotlin::Const => "const",
            Kotlin::Public => "public",
            Kotlin::Private => "private",
            Kotlin::Protected => "protected",
            Kotlin::Internal => "internal",
            Kotlin::Abstract => "abstract",
            Kotlin::Final => "final",
            Kotlin::Open => "open",
            Kotlin::Override => "override",
            Kotlin::Lateinit => "lateinit",
            Kotlin::Vararg => "vararg",
            Kotlin::Noinline => "noinline",
            Kotlin::Crossinline => "crossinline",
            Kotlin::ReificationModifier => "reification_modifier",
            Kotlin::Expect => "expect",
            Kotlin::Actual => "actual",
            Kotlin::Field => "field",
            Kotlin::Property => "property",
            Kotlin::Receiver => "receiver",
            Kotlin::Param => "param",
            Kotlin::Setparam => "setparam",
            Kotlin::Delegate => "delegate",
            Kotlin::Dynamic => "dynamic",
            Kotlin::QMARK => "?",
            Kotlin::AMP => "&",
            Kotlin::DASHGT => "->",
            Kotlin::PLUSEQ => "+=",
            Kotlin::DASHEQ => "-=",
            Kotlin::STAREQ => "*=",
            Kotlin::SLASHEQ => "/=",
            Kotlin::PERCENTEQ => "%=",
            Kotlin::PLUSPLUS => "++",
            Kotlin::DASHDASH => "--",
            Kotlin::PLUS => "+",
            Kotlin::DASH => "-",
            Kotlin::BANG => "!",
            Kotlin::BANGBANG => "!!",
            Kotlin::SLASH => "/",
            Kotlin::PERCENT => "%",
            Kotlin::PIPEPIPE => "||",
            Kotlin::AMPAMP => "&&",
            Kotlin::BANGEQ => "!=",
            Kotlin::BANGEQEQ => "!==",
            Kotlin::EQEQ => "==",
            Kotlin::EQEQEQ => "===",
            Kotlin::GTEQ => ">=",
            Kotlin::LTEQ => "<=",
            Kotlin::QMARKCOLON => "?:",
            Kotlin::BANGin => "!in",
            Kotlin::Is => "is",
            Kotlin::AsQMARK => "as?",
            Kotlin::DOTDOT => "..",
            Kotlin::DOTDOTLT => "..<",
            Kotlin::ThisAT => "this@",
            Kotlin::SuperAT => "super@",
            Kotlin::AT2 => "@",
            Kotlin::If => "if",
            Kotlin::Else => "else",
            Kotlin::When => "when",
            Kotlin::Try => "try",
            Kotlin::Catch => "catch",
            Kotlin::Finally => "finally",
            Kotlin::Return => "return",
            Kotlin::ReturnAT => "return@",
            Kotlin::Throw => "throw",
            Kotlin::COLONCOLON => "::",
            Kotlin::DQUOTE => "\"",
            Kotlin::StringContent => "string_content",
            Kotlin::StringContent2 => "string_content",
            Kotlin::DOLLAR => "$",
            Kotlin::DQUOTEDQUOTEDQUOTE => "\"\"\"",
            Kotlin::DQUOTEDQUOTEDQUOTEDQUOTE => "\"\"\"\"",
            Kotlin::DOLLARLBRACE => "${",
            Kotlin::SQUOTE => "'",
            Kotlin::CharacterLiteralToken1 => "character_literal_token1",
            Kotlin::EscapeSequence => "escape_sequence",
            Kotlin::NumberLiteral => "number_literal",
            Kotlin::FloatLiteral => "float_literal",
            Kotlin::Out => "out",
            Kotlin::Label => "label",
            Kotlin::Shebang => "shebang",
            Kotlin::LineComment => "line_comment",
            Kotlin::Semi => "_semi",
            Kotlin::ClassMemberSemi => "_class_member_semi",
            Kotlin::BlockComment => "block_comment",
            Kotlin::BANGis => "!is",
            Kotlin::In2 => "in",
            Kotlin::QMARKDOT => "?.",
            Kotlin::StringContent3 => "string_content",
            Kotlin::SourceFile => "source_file",
            Kotlin::FileAnnotation => "file_annotation",
            Kotlin::PackageHeader => "package_header",
            Kotlin::Import => "import",
            Kotlin::Declaration => "declaration",
            Kotlin::ClassDeclaration => "class_declaration",
            Kotlin::ObjectDeclaration => "object_declaration",
            Kotlin::PropertyDeclaration => "property_declaration",
            Kotlin::TypeAlias => "type_alias",
            Kotlin::CompanionObject => "companion_object",
            Kotlin::AnonymousInitializer => "anonymous_initializer",
            Kotlin::SecondaryConstructor => "secondary_constructor",
            Kotlin::ConstructorDelegationCall => "constructor_delegation_call",
            Kotlin::TypeParameters => "type_parameters",
            Kotlin::TypeParameter => "type_parameter",
            Kotlin::PrimaryConstructor => "primary_constructor",
            Kotlin::ClassParameters => "class_parameters",
            Kotlin::ClassParameter => "class_parameter",
            Kotlin::TypeConstraints => "type_constraints",
            Kotlin::TypeConstraint => "type_constraint",
            Kotlin::ConstructorInvocation => "constructor_invocation",
            Kotlin::FunctionDeclaration => "function_declaration",
            Kotlin::FunctionValueParameters => "function_value_parameters",
            Kotlin::Parameter => "parameter",
            Kotlin::DelegationSpecifiers => "delegation_specifiers",
            Kotlin::DelegationSpecifier => "delegation_specifier",
            Kotlin::VariableDeclaration => "variable_declaration",
            Kotlin::MultiVariableDeclaration => "multi_variable_declaration",
            Kotlin::PropertyDelegate => "property_delegate",
            Kotlin::ExplicitDelegation => "explicit_delegation",
            Kotlin::Getter => "getter",
            Kotlin::Setter => "setter",
            Kotlin::FunctionBody => "function_body",
            Kotlin::Block => "block",
            Kotlin::ForStatement => "for_statement",
            Kotlin::WhileStatement => "while_statement",
            Kotlin::DoWhileStatement => "do_while_statement",
            Kotlin::ClassBody => "class_body",
            Kotlin::ClassMemberDeclaration => "class_member_declaration",
            Kotlin::EnumClassBody => "enum_class_body",
            Kotlin::EnumEntry => "enum_entry",
            Kotlin::ValueArguments => "value_arguments",
            Kotlin::ValueArgument => "value_argument",
            Kotlin::Statement => "statement",
            Kotlin::Modifiers => "modifiers",
            Kotlin::ClassModifier => "class_modifier",
            Kotlin::FunctionModifier => "function_modifier",
            Kotlin::PropertyModifier => "property_modifier",
            Kotlin::VisibilityModifier => "visibility_modifier",
            Kotlin::InheritanceModifier => "inheritance_modifier",
            Kotlin::MemberModifier => "member_modifier",
            Kotlin::ParameterModifiers => "parameter_modifiers",
            Kotlin::ParameterModifier => "parameter_modifier",
            Kotlin::PlatformModifier => "platform_modifier",
            Kotlin::TypeModifiers => "type_modifiers",
            Kotlin::Annotation => "annotation",
            Kotlin::UseSiteTarget => "use_site_target",
            Kotlin::UnescapedAnnotation => "_unescaped_annotation",
            Kotlin::Type => "type",
            Kotlin::UserType => "user_type",
            Kotlin::SimpleUserType => "_simple_user_type",
            Kotlin::NullableType => "nullable_type",
            Kotlin::NonNullableType => "non_nullable_type",
            Kotlin::ReceiverType => "_receiver_type",
            Kotlin::TypeArguments => "type_arguments",
            Kotlin::TypeProjection => "type_projection",
            Kotlin::FunctionType => "function_type",
            Kotlin::FunctionTypeParameters => "function_type_parameters",
            Kotlin::ParenthesizedType => "parenthesized_type",
            Kotlin::Assignment => "assignment",
            Kotlin::Expression => "expression",
            Kotlin::PrimaryExpression => "primary_expression",
            Kotlin::UnaryExpression => "unary_expression",
            Kotlin::AnnotatedExpression => "annotated_expression",
            Kotlin::LabeledExpression => "labeled_expression",
            Kotlin::BinaryExpression => "binary_expression",
            Kotlin::InExpression => "in_expression",
            Kotlin::IsExpression => "is_expression",
            Kotlin::AsExpression => "as_expression",
            Kotlin::SpreadExpression => "spread_expression",
            Kotlin::RangeExpression => "range_expression",
            Kotlin::InfixExpression => "infix_expression",
            Kotlin::CallExpression => "call_expression",
            Kotlin::AnnotatedLambda => "annotated_lambda",
            Kotlin::LambdaLiteral => "lambda_literal",
            Kotlin::LambdaParameters => "lambda_parameters",
            Kotlin::LambdaParameter => "_lambda_parameter",
            Kotlin::AnonymousFunction => "anonymous_function",
            Kotlin::IndexExpression => "index_expression",
            Kotlin::ThisExpression => "this_expression",
            Kotlin::SuperExpression => "super_expression",
            Kotlin::IfExpression => "if_expression",
            Kotlin::ParenthesizedExpression => "parenthesized_expression",
            Kotlin::CollectionLiteral => "collection_literal",
            Kotlin::WhenExpression => "when_expression",
            Kotlin::WhenSubject => "when_subject",
            Kotlin::WhenEntry => "when_entry",
            Kotlin::WhenCondition => "_when_condition",
            Kotlin::RangeTest => "range_test",
            Kotlin::TypeTest => "type_test",
            Kotlin::TryExpression => "try_expression",
            Kotlin::CatchBlock => "catch_block",
            Kotlin::FinallyBlock => "finally_block",
            Kotlin::ReturnExpression => "return_expression",
            Kotlin::ThrowExpression => "throw_expression",
            Kotlin::CallableReference => "callable_reference",
            Kotlin::NavigationExpression => "navigation_expression",
            Kotlin::ObjectLiteral => "object_literal",
            Kotlin::StringLiteral => "string_literal",
            Kotlin::MultilineStringLiteral => "multiline_string_literal",
            Kotlin::Interpolation => "interpolation",
            Kotlin::CharacterLiteral => "character_literal",
            Kotlin::VarianceModifier => "variance_modifier",
            Kotlin::TypeParameterModifiers => "type_parameter_modifiers",
            Kotlin::QualifiedIdentifier => "qualified_identifier",
            Kotlin::ReservedIdentifier => "_reserved_identifier",
            Kotlin::SourceFileRepeat1 => "source_file_repeat1",
            Kotlin::SourceFileRepeat2 => "source_file_repeat2",
            Kotlin::SourceFileRepeat3 => "source_file_repeat3",
            Kotlin::FileAnnotationRepeat1 => "file_annotation_repeat1",
            Kotlin::TypeParametersRepeat1 => "type_parameters_repeat1",
            Kotlin::ClassParametersRepeat1 => "class_parameters_repeat1",
            Kotlin::TypeConstraintsRepeat1 => "type_constraints_repeat1",
            Kotlin::FunctionValueParametersRepeat1 => "function_value_parameters_repeat1",
            Kotlin::DelegationSpecifiersRepeat1 => "delegation_specifiers_repeat1",
            Kotlin::DelegationSpecifierRepeat1 => "delegation_specifier_repeat1",
            Kotlin::MultiVariableDeclarationRepeat1 => "multi_variable_declaration_repeat1",
            Kotlin::ClassBodyRepeat1 => "class_body_repeat1",
            Kotlin::EnumClassBodyRepeat1 => "enum_class_body_repeat1",
            Kotlin::ValueArgumentsRepeat1 => "value_arguments_repeat1",
            Kotlin::StatementsRepeat1 => "_statements_repeat1",
            Kotlin::ModifiersRepeat1 => "modifiers_repeat1",
            Kotlin::ParameterModifiersRepeat1 => "parameter_modifiers_repeat1",
            Kotlin::TypeModifiersRepeat1 => "type_modifiers_repeat1",
            Kotlin::UserTypeRepeat1 => "user_type_repeat1",
            Kotlin::TypeArgumentsRepeat1 => "type_arguments_repeat1",
            Kotlin::TypeProjectionRepeat1 => "type_projection_repeat1",
            Kotlin::FunctionTypeParametersRepeat1 => "function_type_parameters_repeat1",
            Kotlin::LambdaParametersRepeat1 => "lambda_parameters_repeat1",
            Kotlin::IndexExpressionRepeat1 => "index_expression_repeat1",
            Kotlin::WhenExpressionRepeat1 => "when_expression_repeat1",
            Kotlin::WhenEntryRepeat1 => "when_entry_repeat1",
            Kotlin::TryExpressionRepeat1 => "try_expression_repeat1",
            Kotlin::StringLiteralRepeat1 => "string_literal_repeat1",
            Kotlin::MultilineStringLiteralRepeat1 => "multiline_string_literal_repeat1",
            Kotlin::TypeParameterModifiersRepeat1 => "type_parameter_modifiers_repeat1",
            Kotlin::QualifiedIdentifierRepeat1 => "qualified_identifier_repeat1",
            Kotlin::Error => "ERROR",
        }
    }
}

impl From<u16> for Kotlin {
    #[inline(always)]
    fn from(x: u16) -> Self {
        num::FromPrimitive::from_u16(x).unwrap_or(Self::Error)
    }
}

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

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