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 { .. })
}
}