big-code-analysis 1.1.0

Tool to compute and export code metrics
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
// See `src/languages/mod.rs` for the rationale behind the per-file
// pedantic carve-outs below.
#![allow(clippy::match_same_arms, clippy::too_many_lines)]

// Code generated; DO NOT EDIT.

use num_derive::FromPrimitive;

#[derive(Clone, Debug, PartialEq, Eq, FromPrimitive)]
pub enum Elixir {
    End = 0,
    TerminatorToken1 = 1,
    SEMI = 2,
    LPAREN = 3,
    RPAREN = 4,
    IdentifierToken1 = 5,
    DOTDOTDOT = 6,
    Alias = 7,
    Integer = 8,
    Float = 9,
    Char = 10,
    True = 11,
    False = 12,
    Nil2 = 13,
    Atom = 14,
    DQUOTE = 15,
    SQUOTE = 16,
    SQUOTESQUOTESQUOTE = 17,
    DQUOTEDQUOTEDQUOTE = 18,
    LBRACE = 19,
    RBRACE = 20,
    LBRACK = 21,
    RBRACK = 22,
    LT = 23,
    GT = 24,
    PIPE = 25,
    SLASH = 26,
    HASHLBRACE = 27,
    EscapeSequence = 28,
    TILDE = 29,
    SigilName = 30,
    SigilName2 = 31,
    SigilModifiers = 32,
    COMMA = 33,
    Keyword = 34,
    QuotedKeywordToken1 = 35,
    LTLT = 36,
    GTGT = 37,
    PERCENT = 38,
    DOTDOT = 39,
    AMP = 40,
    PLUS = 41,
    DASH = 42,
    BANG = 43,
    CARET = 44,
    TILDETILDETILDE = 45,
    Not = 46,
    AT = 47,
    LTDASH = 48,
    BSLASHBSLASH = 49,
    When = 50,
    COLONCOLON = 51,
    EQGT = 52,
    EQ = 53,
    PIPEPIPE = 54,
    PIPEPIPEPIPE = 55,
    Or = 56,
    AMPAMP = 57,
    AMPAMPAMP = 58,
    And = 59,
    EQEQ = 60,
    BANGEQ = 61,
    EQTILDE = 62,
    EQEQEQ = 63,
    BANGEQEQ = 64,
    LTEQ = 65,
    GTEQ = 66,
    PIPEGT = 67,
    LTLTLT = 68,
    GTGTGT = 69,
    LTLTTILDE = 70,
    TILDEGTGT = 71,
    LTTILDE = 72,
    TILDEGT = 73,
    LTTILDEGT = 74,
    LTPIPEGT = 75,
    In = 76,
    CARETCARETCARET = 77,
    SLASHSLASH = 78,
    PLUSPLUS = 79,
    DASHDASH = 80,
    PLUSPLUSPLUS = 81,
    DASHDASHDASH = 82,
    LTGT = 83,
    STAR = 84,
    STARSTAR = 85,
    DASHGT = 86,
    DOT = 87,
    After = 88,
    Catch = 89,
    Do = 90,
    Else = 91,
    End2 = 92,
    Fn = 93,
    Rescue = 94,
    LPAREN2 = 95,
    LBRACK2 = 96,
    Comment = 97,
    QuotedContent = 98,
    QuotedContent2 = 99,
    QuotedContent3 = 100,
    QuotedContent4 = 101,
    QuotedContent5 = 102,
    QuotedContent6 = 103,
    QuotedContent7 = 104,
    QuotedContent8 = 105,
    QuotedContent9 = 106,
    QuotedContent10 = 107,
    QuotedContent11 = 108,
    QuotedContent12 = 109,
    QuotedContent13 = 110,
    QuotedContent14 = 111,
    QuotedContent15 = 112,
    QuotedContent16 = 113,
    QuotedContent17 = 114,
    QuotedContent18 = 115,
    QuotedContent19 = 116,
    QuotedContent20 = 117,
    NewlineBeforeDo = 118,
    NewlineBeforeBinaryOperator = 119,
    NewlineBeforeComment = 120,
    BeforeUnaryOp = 121,
    Notin = 122,
    COLON = 123,
    Source = 124,
    Terminator = 125,
    Expression = 126,
    Block = 127,
    Identifier = 128,
    Boolean = 129,
    Nil = 130,
    Atom2 = 131,
    QuotedAtom = 132,
    QuotedIDouble = 133,
    QuotedDouble = 134,
    QuotedISingle = 135,
    QuotedSingle = 136,
    QuotedIHeredocSingle = 137,
    QuotedHeredocSingle = 138,
    QuotedIHeredocDouble = 139,
    QuotedHeredocDouble = 140,
    QuotedIParenthesis = 141,
    QuotedParenthesis = 142,
    QuotedICurly = 143,
    QuotedCurly = 144,
    QuotedISquare = 145,
    QuotedSquare = 146,
    QuotedIAngle = 147,
    QuotedAngle = 148,
    QuotedIBar = 149,
    QuotedBar = 150,
    QuotedISlash = 151,
    QuotedSlash = 152,
    String = 153,
    Charlist = 154,
    Interpolation = 155,
    Sigil = 156,
    Keywords = 157,
    Keywords2 = 158,
    Pair = 159,
    Keyword2 = 160,
    QuotedKeyword = 161,
    List = 162,
    Tuple = 163,
    Bitstring = 164,
    Map = 165,
    Struct = 166,
    ItemsWithTrailingSeparator = 167,
    NullaryOperator = 168,
    UnaryOperator = 169,
    CaptureExpression = 170,
    BinaryOperator = 171,
    OperatorIdentifier = 172,
    Dot = 173,
    Call = 174,
    CallWithoutParentheses = 175,
    CallWithParentheses = 176,
    LocalCallWithoutParentheses = 177,
    LocalCallWithParentheses = 178,
    LocalCallJustDoBlock = 179,
    RemoteCallWithoutParentheses = 180,
    RemoteCallWithParentheses = 181,
    Dot2 = 182,
    AnonymousCall = 183,
    Dot3 = 184,
    DoubleCall = 185,
    Arguments = 186,
    Arguments2 = 187,
    CallArgumentsWithTrailingSeparator = 188,
    Arguments3 = 189,
    DoBlock = 190,
    AfterBlock = 191,
    RescueBlock = 192,
    CatchBlock = 193,
    ElseBlock = 194,
    AccessCall = 195,
    StabClause = 196,
    StabClauseLeft = 197,
    Arguments4 = 198,
    Arguments5 = 199,
    BinaryOperator2 = 200,
    BinaryOperator3 = 201,
    Body = 202,
    AnonymousFunction = 203,
    SourceRepeat1 = 204,
    TerminatorRepeat1 = 205,
    BlockRepeat1 = 206,
    BlockRepeat2 = 207,
    QuotedIDoubleRepeat1 = 208,
    QuotedDoubleRepeat1 = 209,
    QuotedISingleRepeat1 = 210,
    QuotedSingleRepeat1 = 211,
    QuotedIHeredocSingleRepeat1 = 212,
    QuotedHeredocSingleRepeat1 = 213,
    QuotedIHeredocDoubleRepeat1 = 214,
    QuotedHeredocDoubleRepeat1 = 215,
    QuotedIParenthesisRepeat1 = 216,
    QuotedParenthesisRepeat1 = 217,
    QuotedICurlyRepeat1 = 218,
    QuotedCurlyRepeat1 = 219,
    QuotedISquareRepeat1 = 220,
    QuotedSquareRepeat1 = 221,
    QuotedIAngleRepeat1 = 222,
    QuotedAngleRepeat1 = 223,
    QuotedIBarRepeat1 = 224,
    QuotedBarRepeat1 = 225,
    QuotedISlashRepeat1 = 226,
    QuotedSlashRepeat1 = 227,
    KeywordsRepeat1 = 228,
    ItemsWithTrailingSeparatorRepeat1 = 229,
    DoBlockRepeat1 = 230,
    StabClauseArgumentsWithParenthesesRepeat1 = 231,
    StabClauseArgumentsWithoutParenthesesRepeat1 = 232,
    AnonymousFunctionRepeat1 = 233,
    MapContent = 234,
    Error = 235,
}

impl From<Elixir> for &'static str {
    #[inline]
    fn from(tok: Elixir) -> Self {
        match tok {
            Elixir::End => "end",
            Elixir::TerminatorToken1 => "_terminator_token1",
            Elixir::SEMI => ";",
            Elixir::LPAREN => "(",
            Elixir::RPAREN => ")",
            Elixir::IdentifierToken1 => "identifier_token1",
            Elixir::DOTDOTDOT => "...",
            Elixir::Alias => "alias",
            Elixir::Integer => "integer",
            Elixir::Float => "float",
            Elixir::Char => "char",
            Elixir::True => "true",
            Elixir::False => "false",
            Elixir::Nil2 => "nil",
            Elixir::Atom => "atom",
            Elixir::DQUOTE => "\"",
            Elixir::SQUOTE => "'",
            Elixir::SQUOTESQUOTESQUOTE => "'''",
            Elixir::DQUOTEDQUOTEDQUOTE => "\"\"\"",
            Elixir::LBRACE => "{",
            Elixir::RBRACE => "}",
            Elixir::LBRACK => "[",
            Elixir::RBRACK => "]",
            Elixir::LT => "<",
            Elixir::GT => ">",
            Elixir::PIPE => "|",
            Elixir::SLASH => "/",
            Elixir::HASHLBRACE => "#{",
            Elixir::EscapeSequence => "escape_sequence",
            Elixir::TILDE => "~",
            Elixir::SigilName => "sigil_name",
            Elixir::SigilName2 => "sigil_name",
            Elixir::SigilModifiers => "sigil_modifiers",
            Elixir::COMMA => ",",
            Elixir::Keyword => "keyword",
            Elixir::QuotedKeywordToken1 => "quoted_keyword_token1",
            Elixir::LTLT => "<<",
            Elixir::GTGT => ">>",
            Elixir::PERCENT => "%",
            Elixir::DOTDOT => "..",
            Elixir::AMP => "&",
            Elixir::PLUS => "+",
            Elixir::DASH => "-",
            Elixir::BANG => "!",
            Elixir::CARET => "^",
            Elixir::TILDETILDETILDE => "~~~",
            Elixir::Not => "not",
            Elixir::AT => "@",
            Elixir::LTDASH => "<-",
            Elixir::BSLASHBSLASH => "\\\\",
            Elixir::When => "when",
            Elixir::COLONCOLON => "::",
            Elixir::EQGT => "=>",
            Elixir::EQ => "=",
            Elixir::PIPEPIPE => "||",
            Elixir::PIPEPIPEPIPE => "|||",
            Elixir::Or => "or",
            Elixir::AMPAMP => "&&",
            Elixir::AMPAMPAMP => "&&&",
            Elixir::And => "and",
            Elixir::EQEQ => "==",
            Elixir::BANGEQ => "!=",
            Elixir::EQTILDE => "=~",
            Elixir::EQEQEQ => "===",
            Elixir::BANGEQEQ => "!==",
            Elixir::LTEQ => "<=",
            Elixir::GTEQ => ">=",
            Elixir::PIPEGT => "|>",
            Elixir::LTLTLT => "<<<",
            Elixir::GTGTGT => ">>>",
            Elixir::LTLTTILDE => "<<~",
            Elixir::TILDEGTGT => "~>>",
            Elixir::LTTILDE => "<~",
            Elixir::TILDEGT => "~>",
            Elixir::LTTILDEGT => "<~>",
            Elixir::LTPIPEGT => "<|>",
            Elixir::In => "in",
            Elixir::CARETCARETCARET => "^^^",
            Elixir::SLASHSLASH => "//",
            Elixir::PLUSPLUS => "++",
            Elixir::DASHDASH => "--",
            Elixir::PLUSPLUSPLUS => "+++",
            Elixir::DASHDASHDASH => "---",
            Elixir::LTGT => "<>",
            Elixir::STAR => "*",
            Elixir::STARSTAR => "**",
            Elixir::DASHGT => "->",
            Elixir::DOT => ".",
            Elixir::After => "after",
            Elixir::Catch => "catch",
            Elixir::Do => "do",
            Elixir::Else => "else",
            Elixir::End2 => "end",
            Elixir::Fn => "fn",
            Elixir::Rescue => "rescue",
            Elixir::LPAREN2 => "(",
            Elixir::LBRACK2 => "[",
            Elixir::Comment => "comment",
            Elixir::QuotedContent => "quoted_content",
            Elixir::QuotedContent2 => "quoted_content",
            Elixir::QuotedContent3 => "quoted_content",
            Elixir::QuotedContent4 => "quoted_content",
            Elixir::QuotedContent5 => "quoted_content",
            Elixir::QuotedContent6 => "quoted_content",
            Elixir::QuotedContent7 => "quoted_content",
            Elixir::QuotedContent8 => "quoted_content",
            Elixir::QuotedContent9 => "quoted_content",
            Elixir::QuotedContent10 => "quoted_content",
            Elixir::QuotedContent11 => "quoted_content",
            Elixir::QuotedContent12 => "quoted_content",
            Elixir::QuotedContent13 => "quoted_content",
            Elixir::QuotedContent14 => "quoted_content",
            Elixir::QuotedContent15 => "quoted_content",
            Elixir::QuotedContent16 => "quoted_content",
            Elixir::QuotedContent17 => "quoted_content",
            Elixir::QuotedContent18 => "quoted_content",
            Elixir::QuotedContent19 => "quoted_content",
            Elixir::QuotedContent20 => "quoted_content",
            Elixir::NewlineBeforeDo => "_newline_before_do",
            Elixir::NewlineBeforeBinaryOperator => "_newline_before_binary_operator",
            Elixir::NewlineBeforeComment => "_newline_before_comment",
            Elixir::BeforeUnaryOp => "_before_unary_op",
            Elixir::Notin => "not in",
            Elixir::COLON => ":",
            Elixir::Source => "source",
            Elixir::Terminator => "_terminator",
            Elixir::Expression => "_expression",
            Elixir::Block => "block",
            Elixir::Identifier => "identifier",
            Elixir::Boolean => "boolean",
            Elixir::Nil => "nil",
            Elixir::Atom2 => "_atom",
            Elixir::QuotedAtom => "quoted_atom",
            Elixir::QuotedIDouble => "_quoted_i_double",
            Elixir::QuotedDouble => "_quoted_double",
            Elixir::QuotedISingle => "_quoted_i_single",
            Elixir::QuotedSingle => "_quoted_single",
            Elixir::QuotedIHeredocSingle => "_quoted_i_heredoc_single",
            Elixir::QuotedHeredocSingle => "_quoted_heredoc_single",
            Elixir::QuotedIHeredocDouble => "_quoted_i_heredoc_double",
            Elixir::QuotedHeredocDouble => "_quoted_heredoc_double",
            Elixir::QuotedIParenthesis => "_quoted_i_parenthesis",
            Elixir::QuotedParenthesis => "_quoted_parenthesis",
            Elixir::QuotedICurly => "_quoted_i_curly",
            Elixir::QuotedCurly => "_quoted_curly",
            Elixir::QuotedISquare => "_quoted_i_square",
            Elixir::QuotedSquare => "_quoted_square",
            Elixir::QuotedIAngle => "_quoted_i_angle",
            Elixir::QuotedAngle => "_quoted_angle",
            Elixir::QuotedIBar => "_quoted_i_bar",
            Elixir::QuotedBar => "_quoted_bar",
            Elixir::QuotedISlash => "_quoted_i_slash",
            Elixir::QuotedSlash => "_quoted_slash",
            Elixir::String => "string",
            Elixir::Charlist => "charlist",
            Elixir::Interpolation => "interpolation",
            Elixir::Sigil => "sigil",
            Elixir::Keywords => "keywords",
            Elixir::Keywords2 => "keywords",
            Elixir::Pair => "pair",
            Elixir::Keyword2 => "_keyword",
            Elixir::QuotedKeyword => "quoted_keyword",
            Elixir::List => "list",
            Elixir::Tuple => "tuple",
            Elixir::Bitstring => "bitstring",
            Elixir::Map => "map",
            Elixir::Struct => "struct",
            Elixir::ItemsWithTrailingSeparator => "_items_with_trailing_separator",
            Elixir::NullaryOperator => "_nullary_operator",
            Elixir::UnaryOperator => "unary_operator",
            Elixir::CaptureExpression => "_capture_expression",
            Elixir::BinaryOperator => "binary_operator",
            Elixir::OperatorIdentifier => "operator_identifier",
            Elixir::Dot => "dot",
            Elixir::Call => "call",
            Elixir::CallWithoutParentheses => "_call_without_parentheses",
            Elixir::CallWithParentheses => "_call_with_parentheses",
            Elixir::LocalCallWithoutParentheses => "_local_call_without_parentheses",
            Elixir::LocalCallWithParentheses => "_local_call_with_parentheses",
            Elixir::LocalCallJustDoBlock => "_local_call_just_do_block",
            Elixir::RemoteCallWithoutParentheses => "_remote_call_without_parentheses",
            Elixir::RemoteCallWithParentheses => "_remote_call_with_parentheses",
            Elixir::Dot2 => "dot",
            Elixir::AnonymousCall => "_anonymous_call",
            Elixir::Dot3 => "dot",
            Elixir::DoubleCall => "_double_call",
            Elixir::Arguments => "arguments",
            Elixir::Arguments2 => "arguments",
            Elixir::CallArgumentsWithTrailingSeparator => "_call_arguments_with_trailing_separator",
            Elixir::Arguments3 => "arguments",
            Elixir::DoBlock => "do_block",
            Elixir::AfterBlock => "after_block",
            Elixir::RescueBlock => "rescue_block",
            Elixir::CatchBlock => "catch_block",
            Elixir::ElseBlock => "else_block",
            Elixir::AccessCall => "access_call",
            Elixir::StabClause => "stab_clause",
            Elixir::StabClauseLeft => "_stab_clause_left",
            Elixir::Arguments4 => "arguments",
            Elixir::Arguments5 => "arguments",
            Elixir::BinaryOperator2 => "binary_operator",
            Elixir::BinaryOperator3 => "binary_operator",
            Elixir::Body => "body",
            Elixir::AnonymousFunction => "anonymous_function",
            Elixir::SourceRepeat1 => "source_repeat1",
            Elixir::TerminatorRepeat1 => "_terminator_repeat1",
            Elixir::BlockRepeat1 => "block_repeat1",
            Elixir::BlockRepeat2 => "block_repeat2",
            Elixir::QuotedIDoubleRepeat1 => "_quoted_i_double_repeat1",
            Elixir::QuotedDoubleRepeat1 => "_quoted_double_repeat1",
            Elixir::QuotedISingleRepeat1 => "_quoted_i_single_repeat1",
            Elixir::QuotedSingleRepeat1 => "_quoted_single_repeat1",
            Elixir::QuotedIHeredocSingleRepeat1 => "_quoted_i_heredoc_single_repeat1",
            Elixir::QuotedHeredocSingleRepeat1 => "_quoted_heredoc_single_repeat1",
            Elixir::QuotedIHeredocDoubleRepeat1 => "_quoted_i_heredoc_double_repeat1",
            Elixir::QuotedHeredocDoubleRepeat1 => "_quoted_heredoc_double_repeat1",
            Elixir::QuotedIParenthesisRepeat1 => "_quoted_i_parenthesis_repeat1",
            Elixir::QuotedParenthesisRepeat1 => "_quoted_parenthesis_repeat1",
            Elixir::QuotedICurlyRepeat1 => "_quoted_i_curly_repeat1",
            Elixir::QuotedCurlyRepeat1 => "_quoted_curly_repeat1",
            Elixir::QuotedISquareRepeat1 => "_quoted_i_square_repeat1",
            Elixir::QuotedSquareRepeat1 => "_quoted_square_repeat1",
            Elixir::QuotedIAngleRepeat1 => "_quoted_i_angle_repeat1",
            Elixir::QuotedAngleRepeat1 => "_quoted_angle_repeat1",
            Elixir::QuotedIBarRepeat1 => "_quoted_i_bar_repeat1",
            Elixir::QuotedBarRepeat1 => "_quoted_bar_repeat1",
            Elixir::QuotedISlashRepeat1 => "_quoted_i_slash_repeat1",
            Elixir::QuotedSlashRepeat1 => "_quoted_slash_repeat1",
            Elixir::KeywordsRepeat1 => "keywords_repeat1",
            Elixir::ItemsWithTrailingSeparatorRepeat1 => "_items_with_trailing_separator_repeat1",
            Elixir::DoBlockRepeat1 => "do_block_repeat1",
            Elixir::StabClauseArgumentsWithParenthesesRepeat1 => {
                "_stab_clause_arguments_with_parentheses_repeat1"
            }
            Elixir::StabClauseArgumentsWithoutParenthesesRepeat1 => {
                "_stab_clause_arguments_without_parentheses_repeat1"
            }
            Elixir::AnonymousFunctionRepeat1 => "anonymous_function_repeat1",
            Elixir::MapContent => "map_content",
            Elixir::Error => "ERROR",
        }
    }
}

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

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

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