lib-ruby-parser 0.0.1.beta1-x86_64-linux

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