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
// This file is autogenerated by codegen/rust/messages/native/predicates.rs

use super::DiagnosticMessage;

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