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
use super::DiagnosticMessage;
impl DiagnosticMessage {
pub fn is_fraction_after_numeric(&self) -> bool {
matches!(self, Self::FractionAfterNumeric { .. })
}
pub fn is_no_digits_after_dot(&self) -> bool {
matches!(self, Self::NoDigitsAfterDot { .. })
}
pub fn is_unknown_type_of_percent_string(&self) -> bool {
matches!(self, Self::UnknownTypeOfPercentString { .. })
}
pub fn is_numeric_literal_without_digits(&self) -> bool {
matches!(self, Self::NumericLiteralWithoutDigits { .. })
}
pub fn is_unterminated_list(&self) -> bool {
matches!(self, Self::UnterminatedList { .. })
}
pub fn is_unterminated_regexp(&self) -> bool {
matches!(self, Self::UnterminatedRegexp { .. })
}
pub fn is_unterminated_string(&self) -> bool {
matches!(self, Self::UnterminatedString { .. })
}
pub fn is_unterminated_quoted_string(&self) -> bool {
matches!(self, Self::UnterminatedQuotedString { .. })
}
pub fn is_invalid_unicode_escape(&self) -> bool {
matches!(self, Self::InvalidUnicodeEscape { .. })
}
pub fn is_too_large_unicode_codepoint(&self) -> bool {
matches!(self, Self::TooLargeUnicodeCodepoint { .. })
}
pub fn is_invalid_unicode_codepoint(&self) -> bool {
matches!(self, Self::InvalidUnicodeCodepoint { .. })
}
pub fn is_multiple_codepoint_at_single_char(&self) -> bool {
matches!(self, Self::MultipleCodepointAtSingleChar { .. })
}
pub fn is_invalid_escape_character(&self) -> bool {
matches!(self, Self::InvalidEscapeCharacter { .. })
}
pub fn is_invalid_hex_escape(&self) -> bool {
matches!(self, Self::InvalidHexEscape { .. })
}
pub fn is_unterminated_heredoc(&self) -> bool {
matches!(self, Self::UnterminatedHeredoc { .. })
}
pub fn is_unterminated_heredoc_id(&self) -> bool {
matches!(self, Self::UnterminatedHeredocId { .. })
}
pub fn is_slash_r_at_middle_of_line(&self) -> bool {
matches!(self, Self::SlashRAtMiddleOfLine { .. })
}
pub fn is_d_star_interpreted_as_arg_prefix(&self) -> bool {
matches!(self, Self::DStarInterpretedAsArgPrefix { .. })
}
pub fn is_star_interpreted_as_arg_prefix(&self) -> bool {
matches!(self, Self::StarInterpretedAsArgPrefix { .. })
}
pub fn is_ampersand_interpreted_as_arg_prefix(&self) -> bool {
matches!(self, Self::AmpersandInterpretedAsArgPrefix { .. })
}
pub fn is_triple_dot_at_eol(&self) -> bool {
matches!(self, Self::TripleDotAtEol { .. })
}
pub fn is_parentheses_iterpreted_as_arglist(&self) -> bool {
matches!(self, Self::ParenthesesIterpretedAsArglist { .. })
}
pub fn is_ambiguous_first_argument(&self) -> bool {
matches!(self, Self::AmbiguousFirstArgument { .. })
}
pub fn is_ambiguous_operator(&self) -> bool {
matches!(self, Self::AmbiguousOperator { .. })
}
pub fn is_invalid_character_syntax(&self) -> bool {
matches!(self, Self::InvalidCharacterSyntax { .. })
}
pub fn is_invalid_octal_digit(&self) -> bool {
matches!(self, Self::InvalidOctalDigit { .. })
}
pub fn is_trailing_char_in_number(&self) -> bool {
matches!(self, Self::TrailingCharInNumber { .. })
}
pub fn is_embedded_document_meets_eof(&self) -> bool {
matches!(self, Self::EmbeddedDocumentMeetsEof { .. })
}
pub fn is_invalid_char(&self) -> bool {
matches!(self, Self::InvalidChar { .. })
}
pub fn is_incomplete_character_syntax(&self) -> bool {
matches!(self, Self::IncompleteCharacterSyntax { .. })
}
pub fn is_gvar_without_id(&self) -> bool {
matches!(self, Self::GvarWithoutId { .. })
}
pub fn is_invalid_gvar_name(&self) -> bool {
matches!(self, Self::InvalidGvarName { .. })
}
pub fn is_ivar_without_id(&self) -> bool {
matches!(self, Self::IvarWithoutId { .. })
}
pub fn is_invalid_ivar_name(&self) -> bool {
matches!(self, Self::InvalidIvarName { .. })
}
pub fn is_cvar_without_id(&self) -> bool {
matches!(self, Self::CvarWithoutId { .. })
}
pub fn is_invalid_cvar_name(&self) -> bool {
matches!(self, Self::InvalidCvarName { .. })
}
pub fn is_unknown_regex_options(&self) -> bool {
matches!(self, Self::UnknownRegexOptions { .. })
}
pub fn is_unterminated_unicode_escape(&self) -> bool {
matches!(self, Self::UnterminatedUnicodeEscape { .. })
}
pub fn is_encoding_error(&self) -> bool {
matches!(self, Self::EncodingError { .. })
}
pub fn is_invalid_multibyte_char(&self) -> bool {
matches!(self, Self::InvalidMultibyteChar { .. })
}
pub fn is_ambiguous_ternary_operator(&self) -> bool {
matches!(self, Self::AmbiguousTernaryOperator { .. })
}
pub fn is_ambiguous_regexp(&self) -> bool {
matches!(self, Self::AmbiguousRegexp { .. })
}
pub fn is_else_without_rescue(&self) -> bool {
matches!(self, Self::ElseWithoutRescue { .. })
}
pub fn is_begin_not_at_top_level(&self) -> bool {
matches!(self, Self::BeginNotAtTopLevel { .. })
}
pub fn is_alias_nth_ref(&self) -> bool {
matches!(self, Self::AliasNthRef { .. })
}
pub fn is_csend_inside_masgn(&self) -> bool {
matches!(self, Self::CsendInsideMasgn { .. })
}
pub fn is_class_or_module_name_must_be_constant(&self) -> bool {
matches!(self, Self::ClassOrModuleNameMustBeConstant { .. })
}
pub fn is_endless_setter_definition(&self) -> bool {
matches!(self, Self::EndlessSetterDefinition { .. })
}
pub fn is_unexpected_token(&self) -> bool {
matches!(self, Self::UnexpectedToken { .. })
}
pub fn is_class_definition_in_method_body(&self) -> bool {
matches!(self, Self::ClassDefinitionInMethodBody { .. })
}
pub fn is_module_definition_in_method_body(&self) -> bool {
matches!(self, Self::ModuleDefinitionInMethodBody { .. })
}
pub fn is_invalid_return_in_class_or_module_body(&self) -> bool {
matches!(self, Self::InvalidReturnInClassOrModuleBody { .. })
}
pub fn is_const_argument(&self) -> bool {
matches!(self, Self::ConstArgument { .. })
}
pub fn is_ivar_argument(&self) -> bool {
matches!(self, Self::IvarArgument { .. })
}
pub fn is_gvar_argument(&self) -> bool {
matches!(self, Self::GvarArgument { .. })
}
pub fn is_cvar_argument(&self) -> bool {
matches!(self, Self::CvarArgument { .. })
}
pub fn is_no_such_local_variable(&self) -> bool {
matches!(self, Self::NoSuchLocalVariable { .. })
}
pub fn is_ordinary_param_defined(&self) -> bool {
matches!(self, Self::OrdinaryParamDefined { .. })
}
pub fn is_numparam_used(&self) -> bool {
matches!(self, Self::NumparamUsed { .. })
}
pub fn is_tok_at_eol_without_expression(&self) -> bool {
matches!(self, Self::TokAtEolWithoutExpression { .. })
}
pub fn is_end_in_method(&self) -> bool {
matches!(self, Self::EndInMethod { .. })
}
pub fn is_comparison_after_comparison(&self) -> bool {
matches!(self, Self::ComparisonAfterComparison { .. })
}
pub fn is_circular_argument_reference(&self) -> bool {
matches!(self, Self::CircularArgumentReference { .. })
}
pub fn is_dynamic_constant_assignment(&self) -> bool {
matches!(self, Self::DynamicConstantAssignment { .. })
}
pub fn is_cant_assign_to_self(&self) -> bool {
matches!(self, Self::CantAssignToSelf { .. })
}
pub fn is_cant_assign_to_nil(&self) -> bool {
matches!(self, Self::CantAssignToNil { .. })
}
pub fn is_cant_assign_to_true(&self) -> bool {
matches!(self, Self::CantAssignToTrue { .. })
}
pub fn is_cant_assign_to_false(&self) -> bool {
matches!(self, Self::CantAssignToFalse { .. })
}
pub fn is_cant_assign_to_file(&self) -> bool {
matches!(self, Self::CantAssignToFile { .. })
}
pub fn is_cant_assign_to_line(&self) -> bool {
matches!(self, Self::CantAssignToLine { .. })
}
pub fn is_cant_assign_to_encoding(&self) -> bool {
matches!(self, Self::CantAssignToEncoding { .. })
}
pub fn is_cant_assign_to_numparam(&self) -> bool {
matches!(self, Self::CantAssignToNumparam { .. })
}
pub fn is_cant_set_variable(&self) -> bool {
matches!(self, Self::CantSetVariable { .. })
}
pub fn is_block_given_to_yield(&self) -> bool {
matches!(self, Self::BlockGivenToYield { .. })
}
pub fn is_block_and_block_arg_given(&self) -> bool {
matches!(self, Self::BlockAndBlockArgGiven { .. })
}
pub fn is_symbol_literal_with_interpolation(&self) -> bool {
matches!(self, Self::SymbolLiteralWithInterpolation { .. })
}
pub fn is_reserved_for_numparam(&self) -> bool {
matches!(self, Self::ReservedForNumparam { .. })
}
pub fn is_key_must_be_valid_as_local_variable(&self) -> bool {
matches!(self, Self::KeyMustBeValidAsLocalVariable { .. })
}
pub fn is_duplicate_variable_name(&self) -> bool {
matches!(self, Self::DuplicateVariableName { .. })
}
pub fn is_duplicate_key_name(&self) -> bool {
matches!(self, Self::DuplicateKeyName { .. })
}
pub fn is_singleton_literal(&self) -> bool {
matches!(self, Self::SingletonLiteral { .. })
}
pub fn is_nth_ref_is_too_big(&self) -> bool {
matches!(self, Self::NthRefIsTooBig { .. })
}
pub fn is_duplicated_argument_name(&self) -> bool {
matches!(self, Self::DuplicatedArgumentName { .. })
}
pub fn is_regex_error(&self) -> bool {
matches!(self, Self::RegexError { .. })
}
pub fn is_invalid_symbol(&self) -> bool {
matches!(self, Self::InvalidSymbol { .. })
}
pub fn is_void_value_expression(&self) -> bool {
matches!(self, Self::VoidValueExpression { .. })
}
}