lib-ruby-parser 4.0.3.0-arm64-darwin

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,828 @@
1
+ # This file is autogenerated by codegen/messages.rb.liquid
2
+
3
+ # Root module
4
+ module LibRubyParser
5
+ # Module with all known DiagnosticMessage sub-types
6
+ module Messages
7
+ # Emitted for code
8
+ #
9
+ # ```text
10
+ # 1.2.3
11
+ # ```
12
+ class FractionAfterNumeric < DiagnosticMessage
13
+ end
14
+
15
+ # Emitted for code like
16
+ #
17
+ # ```text
18
+ # foo.2
19
+ # ```
20
+ class NoDigitsAfterDot < DiagnosticMessage
21
+ end
22
+
23
+ # Emitted for code like
24
+ #
25
+ # ```text
26
+ # %k[foo]
27
+ # ```
28
+ class UnknownTypeOfPercentString < DiagnosticMessage
29
+ end
30
+
31
+ # Emitted for code like
32
+ #
33
+ # ```text
34
+ # 0b
35
+ # ```
36
+ class NumericLiteralWithoutDigits < DiagnosticMessage
37
+ end
38
+
39
+ # Emitted for code like
40
+ #
41
+ # ```text
42
+ # %w[foo bar
43
+ # ```
44
+ class UnterminatedList < DiagnosticMessage
45
+ end
46
+
47
+ # Emitted for code like
48
+ #
49
+ # ```text
50
+ # /foo
51
+ # ```
52
+ class UnterminatedRegexp < DiagnosticMessage
53
+ end
54
+
55
+ # Emitted for code like
56
+ #
57
+ # ```text
58
+ # "foo
59
+ # ```
60
+ class UnterminatedString < DiagnosticMessage
61
+ end
62
+
63
+ # Emitted for code like
64
+ #
65
+ # ```text
66
+ # %s
67
+ # // ^ EOF, not "
68
+ #
69
+ # ```
70
+ class UnterminatedQuotedString < DiagnosticMessage
71
+ end
72
+
73
+ # Emitted for code like
74
+ #
75
+ # ```text
76
+ # "\ufoo"
77
+ # ```
78
+ class InvalidUnicodeEscape < DiagnosticMessage
79
+ end
80
+
81
+ # Emitted for code like
82
+ #
83
+ # ```text
84
+ # "\u{999999}"
85
+ # ```
86
+ class TooLargeUnicodeCodepoint < DiagnosticMessage
87
+ end
88
+
89
+ # Emitted for code like
90
+ #
91
+ # ```text
92
+ # "\u{d800}"
93
+ # ```
94
+ class InvalidUnicodeCodepoint < DiagnosticMessage
95
+ end
96
+
97
+ # Emitted for code like
98
+ #
99
+ # ```text
100
+ # ?\u{41 42}
101
+ # ```
102
+ class MultipleCodepointAtSingleChar < DiagnosticMessage
103
+ end
104
+
105
+ # Emitted for code like
106
+ #
107
+ # ```text
108
+ # "\M-"
109
+ # ```
110
+ class InvalidEscapeCharacter < DiagnosticMessage
111
+ end
112
+
113
+ # Emitted for code like
114
+ #
115
+ # ```text
116
+ # "\xZZ"
117
+ # ```
118
+ class InvalidHexEscape < DiagnosticMessage
119
+ end
120
+
121
+ # Emitted for code like
122
+ #
123
+ # ```text
124
+ # <<-HERE
125
+ # ```
126
+ class UnterminatedHeredoc < DiagnosticMessage
127
+ # Heredoc identifier
128
+ #
129
+ # @return [String]
130
+ attr_reader :heredoc_id
131
+ end
132
+
133
+ # Emitted for code like
134
+ #
135
+ # ```text
136
+ # <<-"HERE
137
+ # ```
138
+ class UnterminatedHeredocId < DiagnosticMessage
139
+ end
140
+
141
+ # Emitted for code like
142
+ #
143
+ # ```text
144
+ # eval("foo \r = 42")
145
+ # ```
146
+ class SlashRAtMiddleOfLine < DiagnosticMessage
147
+ end
148
+
149
+ # Emitted for code like (only in $VERBOSE mode)
150
+ #
151
+ # ```text
152
+ # foo **arg
153
+ # ```
154
+ class DStarInterpretedAsArgPrefix < DiagnosticMessage
155
+ end
156
+
157
+ # Emitted for code like (only in $VERBOSE mode)
158
+ #
159
+ # ```text
160
+ # foo *arg
161
+ # ```
162
+ class StarInterpretedAsArgPrefix < DiagnosticMessage
163
+ end
164
+
165
+ # Emitted for code like (only in $VERBOSE mode)
166
+ #
167
+ # ```text
168
+ # foo &arg
169
+ # ```
170
+ class AmpersandInterpretedAsArgPrefix < DiagnosticMessage
171
+ end
172
+
173
+ # Emitted for code like
174
+ #
175
+ # ```text
176
+ # range = 1...
177
+ # ```
178
+ class TripleDotAtEol < DiagnosticMessage
179
+ end
180
+
181
+ # Emitted for code like (only in $VERBOSE mode)
182
+ #
183
+ # ```text
184
+ # def m (a, b, c); end
185
+ # ```
186
+ class ParenthesesIterpretedAsArglist < DiagnosticMessage
187
+ end
188
+
189
+ # Emitted for code like (only in $VERBOSE mode)
190
+ #
191
+ # ```text
192
+ # m +foo
193
+ # ```
194
+ class AmbiguousFirstArgument < DiagnosticMessage
195
+ # Operator that is ambiguous
196
+ #
197
+ # @return [Integer]
198
+ attr_reader :operator
199
+ end
200
+
201
+ # Emitted for code like (only in $VERBOSE mode)
202
+ #
203
+ # ```text
204
+ # 1 *2
205
+ # ```
206
+ class AmbiguousOperator < DiagnosticMessage
207
+ # Operator that is ambiguous
208
+ #
209
+ # @return [String]
210
+ attr_reader :operator
211
+ # Interpretation of this operator
212
+ #
213
+ # @return [String]
214
+ attr_reader :interpreted_as
215
+ end
216
+
217
+ # Emitted for code like
218
+ #
219
+ # ```text
220
+ # "\M- "
221
+ # ```
222
+ class InvalidCharacterSyntax < DiagnosticMessage
223
+ # Valid syntax sugestions
224
+ #
225
+ # @return [String]
226
+ attr_reader :suggestion
227
+ end
228
+
229
+ # Emitted for code like
230
+ #
231
+ # ```text
232
+ # 09
233
+ # ```
234
+ class InvalidOctalDigit < DiagnosticMessage
235
+ end
236
+
237
+ # Emitted for code like
238
+ #
239
+ # ```text
240
+ # 0_a
241
+ # ```
242
+ class TrailingCharInNumber < DiagnosticMessage
243
+ # Invalid trailing char
244
+ #
245
+ # @return [Integer]
246
+ attr_reader :c
247
+ end
248
+
249
+ # Emitted for code like
250
+ #
251
+ # ```text
252
+ # =begin
253
+ # ```
254
+ class EmbeddedDocumentMeetsEof < DiagnosticMessage
255
+ end
256
+
257
+ # Emitted for code like
258
+ #
259
+ # ```text
260
+ # eval("\x01foo")
261
+ # ```
262
+ class InvalidChar < DiagnosticMessage
263
+ # char
264
+ #
265
+ # @return [Integer]
266
+ attr_reader :c
267
+ end
268
+
269
+ # It is unknown how to trigger this error.
270
+ # Code that triggers it in MRI can be dead.
271
+ class IncompleteCharacterSyntax < DiagnosticMessage
272
+ end
273
+
274
+ # Emitted for code like
275
+ #
276
+ # ```text
277
+ # $
278
+ # ```
279
+ class GvarWithoutId < DiagnosticMessage
280
+ end
281
+
282
+ # Emitted for code like
283
+ #
284
+ # ```text
285
+ # $@
286
+ # ```
287
+ class InvalidGvarName < DiagnosticMessage
288
+ # char after `$`
289
+ #
290
+ # @return [Integer]
291
+ attr_reader :c
292
+ end
293
+
294
+ # Emitted for code like
295
+ #
296
+ # ```text
297
+ # @
298
+ # ```
299
+ class IvarWithoutId < DiagnosticMessage
300
+ end
301
+
302
+ # Emitted for code like
303
+ #
304
+ # ```text
305
+ # @1
306
+ # ```
307
+ class InvalidIvarName < DiagnosticMessage
308
+ # char after `@`
309
+ #
310
+ # @return [Integer]
311
+ attr_reader :c
312
+ end
313
+
314
+ # Emitted for code like
315
+ #
316
+ # ```text
317
+ # @@
318
+ # ```
319
+ class CvarWithoutId < DiagnosticMessage
320
+ end
321
+
322
+ # Emitted for code like
323
+ #
324
+ # ```text
325
+ # @@1
326
+ # ```
327
+ class InvalidCvarName < DiagnosticMessage
328
+ # char after `@@`
329
+ #
330
+ # @return [Integer]
331
+ attr_reader :c
332
+ end
333
+
334
+ # Emitted for code like
335
+ #
336
+ # ```text
337
+ # /re/foo
338
+ # ```
339
+ class UnknownRegexOptions < DiagnosticMessage
340
+ # Concatenated unknown options
341
+ #
342
+ # @return [String]
343
+ attr_reader :options
344
+ end
345
+
346
+ # Emitted for code like
347
+ #
348
+ # ```text
349
+ # "\u{1234"
350
+ # ```
351
+ class UnterminatedUnicodeEscape < DiagnosticMessage
352
+ end
353
+
354
+ # Emitted for code like
355
+ #
356
+ # ```text
357
+ # # encoding: foo
358
+ # ```
359
+ class EncodingError < DiagnosticMessage
360
+ # Error from decoder
361
+ #
362
+ # @return [String]
363
+ attr_reader :error
364
+ end
365
+
366
+ # Emitter for code like
367
+ #
368
+ # ```text
369
+ # eval("\xFF = 42")
370
+ # ```
371
+ class InvalidMultibyteChar < DiagnosticMessage
372
+ end
373
+
374
+ # Emitted for code like
375
+ #
376
+ # ```text
377
+ # a ?AA : 2
378
+ # ```
379
+ class AmbiguousTernaryOperator < DiagnosticMessage
380
+ # Source of the condition expression
381
+ #
382
+ # @return [String]
383
+ attr_reader :condition
384
+ end
385
+
386
+ # Emitted for code like
387
+ #
388
+ # ```text
389
+ # m /foo/
390
+ # ```
391
+ class AmbiguousRegexp < DiagnosticMessage
392
+ end
393
+
394
+ # Emitted for code like
395
+ #
396
+ # ```text
397
+ # begin; else; end
398
+ # ```
399
+ class ElseWithoutRescue < DiagnosticMessage
400
+ end
401
+
402
+ # Emitted for code like
403
+ #
404
+ # ```text
405
+ # def f; BEGIN{}; end
406
+ # ```
407
+ class BeginNotAtTopLevel < DiagnosticMessage
408
+ end
409
+
410
+ # Emitted for code like
411
+ #
412
+ # ```text
413
+ # alias $a $1
414
+ # ```
415
+ class AliasNthRef < DiagnosticMessage
416
+ end
417
+
418
+ # Emitted for code like
419
+ #
420
+ # ```text
421
+ # *a&.x = 0
422
+ # ```
423
+ class CsendInsideMasgn < DiagnosticMessage
424
+ end
425
+
426
+ # Emitted for code like
427
+ #
428
+ # ```text
429
+ # module foo; end
430
+ # ```
431
+ class ClassOrModuleNameMustBeConstant < DiagnosticMessage
432
+ end
433
+
434
+ # Emitted for code like
435
+ #
436
+ # ```text
437
+ # def foo=() = 42
438
+ # ```
439
+ class EndlessSetterDefinition < DiagnosticMessage
440
+ end
441
+
442
+ # Emitted for any code that produces invalid sequence of tokens
443
+ class UnexpectedToken < DiagnosticMessage
444
+ # Name of the token
445
+ #
446
+ # @return [String]
447
+ attr_reader :token_name
448
+ end
449
+
450
+ # Emitted for code like
451
+ #
452
+ # ```text
453
+ # def a; class Foo; end; end
454
+ # ```
455
+ class ClassDefinitionInMethodBody < DiagnosticMessage
456
+ end
457
+
458
+ # Emitted for code like
459
+ #
460
+ # ```text
461
+ # def a; module Foo; end; end
462
+ # ```
463
+ class ModuleDefinitionInMethodBody < DiagnosticMessage
464
+ end
465
+
466
+ # Emitted for code like
467
+ #
468
+ # ```text
469
+ # class A; return; end
470
+ # ```
471
+ class InvalidReturnInClassOrModuleBody < DiagnosticMessage
472
+ end
473
+
474
+ # Emitted for code like
475
+ #
476
+ # ```text
477
+ # def foo(Abc); end
478
+ # ```
479
+ class ConstArgument < DiagnosticMessage
480
+ end
481
+
482
+ # Emitted for code like
483
+ #
484
+ # ```text
485
+ # def foo(@abc); end
486
+ # ```
487
+ class IvarArgument < DiagnosticMessage
488
+ end
489
+
490
+ # Emitted for code like
491
+ #
492
+ # ```text
493
+ # def foo($abc); end
494
+ # ```
495
+ class GvarArgument < DiagnosticMessage
496
+ end
497
+
498
+ # Emitted for code like
499
+ #
500
+ # ```text
501
+ # def foo(@@abc); end
502
+ # ```
503
+ class CvarArgument < DiagnosticMessage
504
+ end
505
+
506
+ # Emitted for code like
507
+ #
508
+ # ```text
509
+ # case 0; in ^a; true; end
510
+ # ```
511
+ class NoSuchLocalVariable < DiagnosticMessage
512
+ # Variable name
513
+ #
514
+ # @return [String]
515
+ attr_reader :var_name
516
+ end
517
+
518
+ # Emitted for code like
519
+ #
520
+ # ```text
521
+ # m { |a| _1 }
522
+ # ```
523
+ class OrdinaryParamDefined < DiagnosticMessage
524
+ end
525
+
526
+ # Emitted for code like
527
+ #
528
+ # ```text
529
+ # foo { _1; bar { _2 }; }
530
+ # ```
531
+ class NumparamUsed < DiagnosticMessage
532
+ end
533
+
534
+ # Emitted for code like (only in $VERBOSE mode)
535
+ #
536
+ # ```text
537
+ # if
538
+ # 42
539
+ # end
540
+ # ```
541
+ class TokAtEolWithoutExpression < DiagnosticMessage
542
+ # Name of the token
543
+ #
544
+ # @return [String]
545
+ attr_reader :token_name
546
+ end
547
+
548
+ # Emitted for code like
549
+ #
550
+ # ```text
551
+ # { foo?: }
552
+ # # or
553
+ # { foo!: }
554
+ # ```
555
+ class InvalidIdToGet < DiagnosticMessage
556
+ # Identifier
557
+ #
558
+ # @return [String]
559
+ attr_reader :identifier
560
+ end
561
+
562
+ # Emitted for code like
563
+ #
564
+ # ```text
565
+ # def foo *rest, ...
566
+ # end
567
+ # ```
568
+ class ForwardArgAfterRestarg < DiagnosticMessage
569
+ end
570
+
571
+ # Emitted for code like
572
+ #
573
+ # ```text
574
+ # def foo(); bar(&); end
575
+ # ```
576
+ class NoAnonymousBlockarg < DiagnosticMessage
577
+ end
578
+
579
+ # Emitted for code like
580
+ #
581
+ # ```text
582
+ # def m; END {}; end
583
+ # ```
584
+ class EndInMethod < DiagnosticMessage
585
+ end
586
+
587
+ # Emitted for code like (only in $VERBOSE mode)
588
+ #
589
+ # ```text
590
+ # a < b < c
591
+ # ```
592
+ class ComparisonAfterComparison < DiagnosticMessage
593
+ # Source of the first comparison
594
+ #
595
+ # @return [String]
596
+ attr_reader :comparison
597
+ end
598
+
599
+ # Emitted for code like
600
+ #
601
+ # ```text
602
+ # { 42 => value, 42 => another_value }
603
+ # ```
604
+ class DuplicateHashKey < DiagnosticMessage
605
+ end
606
+
607
+ # Emitted for code like
608
+ #
609
+ # ```text
610
+ # def m(foo = foo) end
611
+ # ```
612
+ class CircularArgumentReference < DiagnosticMessage
613
+ # Name of the argument
614
+ #
615
+ # @return [String]
616
+ attr_reader :arg_name
617
+ end
618
+
619
+ # Emitted for code like
620
+ #
621
+ # ```text
622
+ # def m; FOO = 1; end
623
+ # ```
624
+ class DynamicConstantAssignment < DiagnosticMessage
625
+ end
626
+
627
+ # Emitted for code like
628
+ #
629
+ # ```text
630
+ # self = foo
631
+ # ```
632
+ class CantAssignToSelf < DiagnosticMessage
633
+ end
634
+
635
+ # Emitted for code like
636
+ #
637
+ # ```text
638
+ # nil = foo
639
+ # ```
640
+ class CantAssignToNil < DiagnosticMessage
641
+ end
642
+
643
+ # Emitted for code like
644
+ #
645
+ # ```text
646
+ # true = foo
647
+ # ```
648
+ class CantAssignToTrue < DiagnosticMessage
649
+ end
650
+
651
+ # Emitted for code like
652
+ #
653
+ # ```text
654
+ # false = foo
655
+ # ```
656
+ class CantAssignToFalse < DiagnosticMessage
657
+ end
658
+
659
+ # Emitted for code like
660
+ #
661
+ # ```text
662
+ # __FILE__ = foo
663
+ # ```
664
+ class CantAssignToFile < DiagnosticMessage
665
+ end
666
+
667
+ # Emitted for code like
668
+ #
669
+ # ```text
670
+ # __LINE__ = foo
671
+ # ```
672
+ class CantAssignToLine < DiagnosticMessage
673
+ end
674
+
675
+ # Emitted for code like
676
+ #
677
+ # ```text
678
+ # __ENCODING__ = foo
679
+ # ```
680
+ class CantAssignToEncoding < DiagnosticMessage
681
+ end
682
+
683
+ # Emitted for code like
684
+ #
685
+ # ```text
686
+ # proc {_1; _1 = nil}
687
+ # ```
688
+ class CantAssignToNumparam < DiagnosticMessage
689
+ # Source of the numbered parameter
690
+ #
691
+ # @return [String]
692
+ attr_reader :numparam
693
+ end
694
+
695
+ # Emitted for code like
696
+ #
697
+ # ```text
698
+ # $1 = foo
699
+ # ```
700
+ class CantSetVariable < DiagnosticMessage
701
+ # Source of the read-only variable that is assigned
702
+ #
703
+ # @return [String]
704
+ attr_reader :var_name
705
+ end
706
+
707
+ # Emitted for code like
708
+ #
709
+ # ```text
710
+ # yield(&foo)
711
+ # ```
712
+ class BlockGivenToYield < DiagnosticMessage
713
+ end
714
+
715
+ # Emitted for code like
716
+ #
717
+ # ```text
718
+ # fun(&bar) do end
719
+ # ```
720
+ class BlockAndBlockArgGiven < DiagnosticMessage
721
+ end
722
+
723
+ # Emitted for code like
724
+ #
725
+ # ```text
726
+ # case a; in "#{a}": 1; end
727
+ # ```
728
+ class SymbolLiteralWithInterpolation < DiagnosticMessage
729
+ end
730
+
731
+ # Emitted for code like
732
+ #
733
+ # ```text
734
+ # _1 = 1
735
+ # ```
736
+ class ReservedForNumparam < DiagnosticMessage
737
+ # Numbered parameter that is treated as a local variable
738
+ #
739
+ # @return [String]
740
+ attr_reader :numparam
741
+ end
742
+
743
+ # Emitted for code like
744
+ #
745
+ # ```text
746
+ # case a; in a?:; end
747
+ # ```
748
+ class KeyMustBeValidAsLocalVariable < DiagnosticMessage
749
+ end
750
+
751
+ # Emitted for code like
752
+ #
753
+ # ```text
754
+ # case 0; in a, a; end
755
+ # ```
756
+ class DuplicateVariableName < DiagnosticMessage
757
+ end
758
+
759
+ # Emitted for code like
760
+ #
761
+ # ```text
762
+ # case 0; in a: 1, a: 2; end
763
+ # ```
764
+ class DuplicateKeyName < DiagnosticMessage
765
+ end
766
+
767
+ # Emitted for code like
768
+ #
769
+ # ```text
770
+ # def (1).foo; end
771
+ # ```
772
+ class SingletonLiteral < DiagnosticMessage
773
+ end
774
+
775
+ # Emitted for code like (only in $VERBOSE mode)
776
+ #
777
+ # ```text
778
+ # $100
779
+ # ```
780
+ class NthRefIsTooBig < DiagnosticMessage
781
+ # Source of the nth_ref that is techincally a regular global variable
782
+ #
783
+ # @return [String]
784
+ attr_reader :nth_ref
785
+ end
786
+
787
+ # Emitted for code like
788
+ #
789
+ # ```text
790
+ # def foo(aa, aa); end
791
+ # ```
792
+ class DuplicatedArgumentName < DiagnosticMessage
793
+ end
794
+
795
+ # Emitted for code like
796
+ #
797
+ # ```text
798
+ # /[/
799
+ # ```
800
+ class RegexError < DiagnosticMessage
801
+ # Error from Onigurama engine
802
+ #
803
+ # @return [String]
804
+ attr_reader :error
805
+ end
806
+
807
+ # Emitted for code like
808
+ #
809
+ # ```text
810
+ # %I"x .\xc3."
811
+ # ```
812
+ class InvalidSymbol < DiagnosticMessage
813
+ # Source of the symbol
814
+ #
815
+ # @return [String]
816
+ attr_reader :symbol
817
+ end
818
+
819
+ # Emitted for code like
820
+ #
821
+ # ```text
822
+ # a = return
823
+ # ```
824
+ class VoidValueExpression < DiagnosticMessage
825
+ end
826
+
827
+ end
828
+ end