lib-ruby-parser 3.0.11

Ruby parser
Documentation
// This file is auto-generated 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 { .. })
    }
}