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