Enum lib_ruby_parser::DiagnosticMessage [−][src]
pub enum DiagnosticMessage {
Show 86 variants
FractionAfterNumeric(FractionAfterNumeric),
NoDigitsAfterDot(NoDigitsAfterDot),
UnknownTypeOfPercentString(UnknownTypeOfPercentString),
NumericLiteralWithoutDigits(NumericLiteralWithoutDigits),
UnterminatedList(UnterminatedList),
UnterminatedRegexp(UnterminatedRegexp),
UnterminatedString(UnterminatedString),
UnterminatedQuotedString(UnterminatedQuotedString),
InvalidUnicodeEscape(InvalidUnicodeEscape),
TooLargeUnicodeCodepoint(TooLargeUnicodeCodepoint),
InvalidUnicodeCodepoint(InvalidUnicodeCodepoint),
MultipleCodepointAtSingleChar(MultipleCodepointAtSingleChar),
InvalidEscapeCharacter(InvalidEscapeCharacter),
InvalidHexEscape(InvalidHexEscape),
UnterminatedHeredoc(UnterminatedHeredoc),
UnterminatedHeredocId(UnterminatedHeredocId),
SlashRAtMiddleOfLine(SlashRAtMiddleOfLine),
DStarInterpretedAsArgPrefix(DStarInterpretedAsArgPrefix),
StarInterpretedAsArgPrefix(StarInterpretedAsArgPrefix),
AmpersandInterpretedAsArgPrefix(AmpersandInterpretedAsArgPrefix),
TripleDotAtEol(TripleDotAtEol),
ParenthesesIterpretedAsArglist(ParenthesesIterpretedAsArglist),
AmbiguousFirstArgument(AmbiguousFirstArgument),
AmbiguousOperator(AmbiguousOperator),
InvalidCharacterSyntax(InvalidCharacterSyntax),
InvalidOctalDigit(InvalidOctalDigit),
TrailingCharInNumber(TrailingCharInNumber),
EmbeddedDocumentMeetsEof(EmbeddedDocumentMeetsEof),
InvalidChar(InvalidChar),
IncompleteCharacterSyntax(IncompleteCharacterSyntax),
GvarWithoutId(GvarWithoutId),
InvalidGvarName(InvalidGvarName),
IvarWithoutId(IvarWithoutId),
InvalidIvarName(InvalidIvarName),
CvarWithoutId(CvarWithoutId),
InvalidCvarName(InvalidCvarName),
UnknownRegexOptions(UnknownRegexOptions),
UnterminatedUnicodeEscape(UnterminatedUnicodeEscape),
EncodingError(EncodingError),
InvalidMultibyteChar(InvalidMultibyteChar),
AmbiguousTernaryOperator(AmbiguousTernaryOperator),
AmbiguousRegexp(AmbiguousRegexp),
ElseWithoutRescue(ElseWithoutRescue),
BeginNotAtTopLevel(BeginNotAtTopLevel),
AliasNthRef(AliasNthRef),
CsendInsideMasgn(CsendInsideMasgn),
ClassOrModuleNameMustBeConstant(ClassOrModuleNameMustBeConstant),
EndlessSetterDefinition(EndlessSetterDefinition),
UnexpectedToken(UnexpectedToken),
ClassDefinitionInMethodBody(ClassDefinitionInMethodBody),
ModuleDefinitionInMethodBody(ModuleDefinitionInMethodBody),
InvalidReturnInClassOrModuleBody(InvalidReturnInClassOrModuleBody),
ConstArgument(ConstArgument),
IvarArgument(IvarArgument),
GvarArgument(GvarArgument),
CvarArgument(CvarArgument),
NoSuchLocalVariable(NoSuchLocalVariable),
OrdinaryParamDefined(OrdinaryParamDefined),
NumparamUsed(NumparamUsed),
TokAtEolWithoutExpression(TokAtEolWithoutExpression),
EndInMethod(EndInMethod),
ComparisonAfterComparison(ComparisonAfterComparison),
CircularArgumentReference(CircularArgumentReference),
DynamicConstantAssignment(DynamicConstantAssignment),
CantAssignToSelf(CantAssignToSelf),
CantAssignToNil(CantAssignToNil),
CantAssignToTrue(CantAssignToTrue),
CantAssignToFalse(CantAssignToFalse),
CantAssignToFile(CantAssignToFile),
CantAssignToLine(CantAssignToLine),
CantAssignToEncoding(CantAssignToEncoding),
CantAssignToNumparam(CantAssignToNumparam),
CantSetVariable(CantSetVariable),
BlockGivenToYield(BlockGivenToYield),
BlockAndBlockArgGiven(BlockAndBlockArgGiven),
SymbolLiteralWithInterpolation(SymbolLiteralWithInterpolation),
ReservedForNumparam(ReservedForNumparam),
KeyMustBeValidAsLocalVariable(KeyMustBeValidAsLocalVariable),
DuplicateVariableName(DuplicateVariableName),
DuplicateKeyName(DuplicateKeyName),
SingletonLiteral(SingletonLiteral),
NthRefIsTooBig(NthRefIsTooBig),
DuplicatedArgumentName(DuplicatedArgumentName),
RegexError(RegexError),
InvalidSymbol(InvalidSymbol),
VoidValueExpression(VoidValueExpression),
}Expand description
Enum of all possible diagnostic message (both warnings and errors)
Variants
Implementations
Constructs FractionAfterNumeric variant
Constructs NoDigitsAfterDot variant
Constructs UnknownTypeOfPercentString variant
Constructs NumericLiteralWithoutDigits variant
Constructs UnterminatedList variant
Constructs UnterminatedRegexp variant
Constructs UnterminatedString variant
Constructs UnterminatedQuotedString variant
Constructs InvalidUnicodeEscape variant
Constructs TooLargeUnicodeCodepoint variant
Constructs InvalidUnicodeCodepoint variant
Constructs MultipleCodepointAtSingleChar variant
Constructs InvalidEscapeCharacter variant
Constructs InvalidHexEscape variant
Constructs UnterminatedHeredoc variant
Constructs UnterminatedHeredocId variant
Constructs SlashRAtMiddleOfLine variant
Constructs DStarInterpretedAsArgPrefix variant
Constructs StarInterpretedAsArgPrefix variant
Constructs AmpersandInterpretedAsArgPrefix variant
Constructs TripleDotAtEol variant
Constructs ParenthesesIterpretedAsArglist variant
Constructs AmbiguousFirstArgument variant
Constructs AmbiguousOperator variant
Constructs InvalidCharacterSyntax variant
Constructs InvalidOctalDigit variant
Constructs TrailingCharInNumber variant
Constructs EmbeddedDocumentMeetsEof variant
Constructs InvalidChar variant
Constructs IncompleteCharacterSyntax variant
Constructs GvarWithoutId variant
Constructs InvalidGvarName variant
Constructs IvarWithoutId variant
Constructs InvalidIvarName variant
Constructs CvarWithoutId variant
Constructs InvalidCvarName variant
Constructs UnknownRegexOptions variant
Constructs UnterminatedUnicodeEscape variant
Constructs EncodingError variant
Constructs InvalidMultibyteChar variant
Constructs AmbiguousTernaryOperator variant
Constructs AmbiguousRegexp variant
Constructs ElseWithoutRescue variant
Constructs BeginNotAtTopLevel variant
Constructs AliasNthRef variant
Constructs CsendInsideMasgn variant
Constructs ClassOrModuleNameMustBeConstant variant
Constructs EndlessSetterDefinition variant
Constructs UnexpectedToken variant
Constructs ClassDefinitionInMethodBody variant
Constructs ModuleDefinitionInMethodBody variant
Constructs InvalidReturnInClassOrModuleBody variant
Constructs ConstArgument variant
Constructs IvarArgument variant
Constructs GvarArgument variant
Constructs CvarArgument variant
Constructs NoSuchLocalVariable variant
Constructs OrdinaryParamDefined variant
Constructs NumparamUsed variant
Constructs TokAtEolWithoutExpression variant
Constructs EndInMethod variant
Constructs ComparisonAfterComparison variant
Constructs CircularArgumentReference variant
Constructs DynamicConstantAssignment variant
Constructs CantAssignToSelf variant
Constructs CantAssignToNil variant
Constructs CantAssignToTrue variant
Constructs CantAssignToFalse variant
Constructs CantAssignToFile variant
Constructs CantAssignToLine variant
Constructs CantAssignToEncoding variant
Constructs CantAssignToNumparam variant
Constructs CantSetVariable variant
Constructs BlockGivenToYield variant
Constructs BlockAndBlockArgGiven variant
Constructs SymbolLiteralWithInterpolation variant
Constructs ReservedForNumparam variant
Constructs KeyMustBeValidAsLocalVariable variant
Constructs DuplicateVariableName variant
Constructs DuplicateKeyName variant
Constructs SingletonLiteral variant
Constructs NthRefIsTooBig variant
Constructs DuplicatedArgumentName variant
Constructs RegexError variant
Constructs InvalidSymbol variant
Constructs VoidValueExpression variant
Returns true if self is FractionAfterNumeric
Returns true if self is NoDigitsAfterDot
Returns true if self is UnknownTypeOfPercentString
Returns true if self is NumericLiteralWithoutDigits
Returns true if self is UnterminatedList
Returns true if self is UnterminatedRegexp
Returns true if self is UnterminatedString
Returns true if self is UnterminatedQuotedString
Returns true if self is InvalidUnicodeEscape
Returns true if self is TooLargeUnicodeCodepoint
Returns true if self is InvalidUnicodeCodepoint
Returns true if self is MultipleCodepointAtSingleChar
Returns true if self is InvalidEscapeCharacter
Returns true if self is InvalidHexEscape
Returns true if self is UnterminatedHeredoc
Returns true if self is UnterminatedHeredocId
Returns true if self is SlashRAtMiddleOfLine
Returns true if self is DStarInterpretedAsArgPrefix
Returns true if self is StarInterpretedAsArgPrefix
Returns true if self is AmpersandInterpretedAsArgPrefix
Returns true if self is TripleDotAtEol
Returns true if self is ParenthesesIterpretedAsArglist
Returns true if self is AmbiguousFirstArgument
Returns true if self is AmbiguousOperator
Returns true if self is InvalidCharacterSyntax
Returns true if self is InvalidOctalDigit
Returns true if self is TrailingCharInNumber
Returns true if self is EmbeddedDocumentMeetsEof
Returns true if self is InvalidChar
Returns true if self is IncompleteCharacterSyntax
Returns true if self is GvarWithoutId
Returns true if self is InvalidGvarName
Returns true if self is IvarWithoutId
Returns true if self is InvalidIvarName
Returns true if self is CvarWithoutId
Returns true if self is InvalidCvarName
Returns true if self is UnknownRegexOptions
Returns true if self is UnterminatedUnicodeEscape
Returns true if self is EncodingError
Returns true if self is InvalidMultibyteChar
Returns true if self is AmbiguousTernaryOperator
Returns true if self is AmbiguousRegexp
Returns true if self is ElseWithoutRescue
Returns true if self is BeginNotAtTopLevel
Returns true if self is AliasNthRef
Returns true if self is CsendInsideMasgn
Returns true if self is ClassOrModuleNameMustBeConstant
Returns true if self is EndlessSetterDefinition
Returns true if self is UnexpectedToken
Returns true if self is ClassDefinitionInMethodBody
Returns true if self is ModuleDefinitionInMethodBody
Returns true if self is InvalidReturnInClassOrModuleBody
Returns true if self is ConstArgument
Returns true if self is IvarArgument
Returns true if self is GvarArgument
Returns true if self is CvarArgument
Returns true if self is NoSuchLocalVariable
Returns true if self is OrdinaryParamDefined
Returns true if self is NumparamUsed
Returns true if self is TokAtEolWithoutExpression
Returns true if self is EndInMethod
Returns true if self is ComparisonAfterComparison
Returns true if self is CircularArgumentReference
Returns true if self is DynamicConstantAssignment
Returns true if self is CantAssignToSelf
Returns true if self is CantAssignToNil
Returns true if self is CantAssignToTrue
Returns true if self is CantAssignToFalse
Returns true if self is CantAssignToFile
Returns true if self is CantAssignToLine
Returns true if self is CantAssignToEncoding
Returns true if self is CantAssignToNumparam
Returns true if self is CantSetVariable
Returns true if self is BlockGivenToYield
Returns true if self is BlockAndBlockArgGiven
Returns true if self is SymbolLiteralWithInterpolation
Returns true if self is ReservedForNumparam
Returns true if self is KeyMustBeValidAsLocalVariable
Returns true if self is DuplicateVariableName
Returns true if self is DuplicateKeyName
Returns true if self is SingletonLiteral
Returns true if self is NthRefIsTooBig
Returns true if self is DuplicatedArgumentName
Returns true if self is RegexError
Returns true if self is InvalidSymbol
Returns true if self is VoidValueExpression
Casts self to Option<&FractionAfterNumeric>, return None if variant doesn’t match
Casts self to Option<&NoDigitsAfterDot>, return None if variant doesn’t match
Casts self to Option<&UnknownTypeOfPercentString>, return None if variant doesn’t match
Casts self to Option<&NumericLiteralWithoutDigits>, return None if variant doesn’t match
Casts self to Option<&UnterminatedList>, return None if variant doesn’t match
Casts self to Option<&UnterminatedRegexp>, return None if variant doesn’t match
Casts self to Option<&UnterminatedString>, return None if variant doesn’t match
Casts self to Option<&UnterminatedQuotedString>, return None if variant doesn’t match
Casts self to Option<&InvalidUnicodeEscape>, return None if variant doesn’t match
Casts self to Option<&TooLargeUnicodeCodepoint>, return None if variant doesn’t match
Casts self to Option<&InvalidUnicodeCodepoint>, return None if variant doesn’t match
Casts self to Option<&MultipleCodepointAtSingleChar>, return None if variant doesn’t match
Casts self to Option<&InvalidEscapeCharacter>, return None if variant doesn’t match
Casts self to Option<&InvalidHexEscape>, return None if variant doesn’t match
Casts self to Option<&UnterminatedHeredoc>, return None if variant doesn’t match
Casts self to Option<&UnterminatedHeredocId>, return None if variant doesn’t match
Casts self to Option<&SlashRAtMiddleOfLine>, return None if variant doesn’t match
Casts self to Option<&DStarInterpretedAsArgPrefix>, return None if variant doesn’t match
Casts self to Option<&StarInterpretedAsArgPrefix>, return None if variant doesn’t match
pub fn as_ampersand_interpreted_as_arg_prefix(
&self
) -> Option<&AmpersandInterpretedAsArgPrefix>
pub fn as_ampersand_interpreted_as_arg_prefix(
&self
) -> Option<&AmpersandInterpretedAsArgPrefix>
Casts self to Option<&AmpersandInterpretedAsArgPrefix>, return None if variant doesn’t match
Casts self to Option<&TripleDotAtEol>, return None if variant doesn’t match
Casts self to Option<&ParenthesesIterpretedAsArglist>, return None if variant doesn’t match
Casts self to Option<&AmbiguousFirstArgument>, return None if variant doesn’t match
Casts self to Option<&AmbiguousOperator>, return None if variant doesn’t match
Casts self to Option<&InvalidCharacterSyntax>, return None if variant doesn’t match
Casts self to Option<&InvalidOctalDigit>, return None if variant doesn’t match
Casts self to Option<&TrailingCharInNumber>, return None if variant doesn’t match
Casts self to Option<&EmbeddedDocumentMeetsEof>, return None if variant doesn’t match
Casts self to Option<&InvalidChar>, return None if variant doesn’t match
Casts self to Option<&IncompleteCharacterSyntax>, return None if variant doesn’t match
Casts self to Option<&GvarWithoutId>, return None if variant doesn’t match
Casts self to Option<&InvalidGvarName>, return None if variant doesn’t match
Casts self to Option<&IvarWithoutId>, return None if variant doesn’t match
Casts self to Option<&InvalidIvarName>, return None if variant doesn’t match
Casts self to Option<&CvarWithoutId>, return None if variant doesn’t match
Casts self to Option<&InvalidCvarName>, return None if variant doesn’t match
Casts self to Option<&UnknownRegexOptions>, return None if variant doesn’t match
Casts self to Option<&UnterminatedUnicodeEscape>, return None if variant doesn’t match
Casts self to Option<&EncodingError>, return None if variant doesn’t match
Casts self to Option<&InvalidMultibyteChar>, return None if variant doesn’t match
Casts self to Option<&AmbiguousTernaryOperator>, return None if variant doesn’t match
Casts self to Option<&AmbiguousRegexp>, return None if variant doesn’t match
Casts self to Option<&ElseWithoutRescue>, return None if variant doesn’t match
Casts self to Option<&BeginNotAtTopLevel>, return None if variant doesn’t match
Casts self to Option<&AliasNthRef>, return None if variant doesn’t match
Casts self to Option<&CsendInsideMasgn>, return None if variant doesn’t match
pub fn as_class_or_module_name_must_be_constant(
&self
) -> Option<&ClassOrModuleNameMustBeConstant>
pub fn as_class_or_module_name_must_be_constant(
&self
) -> Option<&ClassOrModuleNameMustBeConstant>
Casts self to Option<&ClassOrModuleNameMustBeConstant>, return None if variant doesn’t match
Casts self to Option<&EndlessSetterDefinition>, return None if variant doesn’t match
Casts self to Option<&UnexpectedToken>, return None if variant doesn’t match
Casts self to Option<&ClassDefinitionInMethodBody>, return None if variant doesn’t match
Casts self to Option<&ModuleDefinitionInMethodBody>, return None if variant doesn’t match
pub fn as_invalid_return_in_class_or_module_body(
&self
) -> Option<&InvalidReturnInClassOrModuleBody>
pub fn as_invalid_return_in_class_or_module_body(
&self
) -> Option<&InvalidReturnInClassOrModuleBody>
Casts self to Option<&InvalidReturnInClassOrModuleBody>, return None if variant doesn’t match
Casts self to Option<&ConstArgument>, return None if variant doesn’t match
Casts self to Option<&IvarArgument>, return None if variant doesn’t match
Casts self to Option<&GvarArgument>, return None if variant doesn’t match
Casts self to Option<&CvarArgument>, return None if variant doesn’t match
Casts self to Option<&NoSuchLocalVariable>, return None if variant doesn’t match
Casts self to Option<&OrdinaryParamDefined>, return None if variant doesn’t match
Casts self to Option<&NumparamUsed>, return None if variant doesn’t match
Casts self to Option<&TokAtEolWithoutExpression>, return None if variant doesn’t match
Casts self to Option<&EndInMethod>, return None if variant doesn’t match
Casts self to Option<&ComparisonAfterComparison>, return None if variant doesn’t match
Casts self to Option<&CircularArgumentReference>, return None if variant doesn’t match
Casts self to Option<&DynamicConstantAssignment>, return None if variant doesn’t match
Casts self to Option<&CantAssignToSelf>, return None if variant doesn’t match
Casts self to Option<&CantAssignToNil>, return None if variant doesn’t match
Casts self to Option<&CantAssignToTrue>, return None if variant doesn’t match
Casts self to Option<&CantAssignToFalse>, return None if variant doesn’t match
Casts self to Option<&CantAssignToFile>, return None if variant doesn’t match
Casts self to Option<&CantAssignToLine>, return None if variant doesn’t match
Casts self to Option<&CantAssignToEncoding>, return None if variant doesn’t match
Casts self to Option<&CantAssignToNumparam>, return None if variant doesn’t match
Casts self to Option<&CantSetVariable>, return None if variant doesn’t match
Casts self to Option<&BlockGivenToYield>, return None if variant doesn’t match
Casts self to Option<&BlockAndBlockArgGiven>, return None if variant doesn’t match
Casts self to Option<&SymbolLiteralWithInterpolation>, return None if variant doesn’t match
Casts self to Option<&ReservedForNumparam>, return None if variant doesn’t match
pub fn as_key_must_be_valid_as_local_variable(
&self
) -> Option<&KeyMustBeValidAsLocalVariable>
pub fn as_key_must_be_valid_as_local_variable(
&self
) -> Option<&KeyMustBeValidAsLocalVariable>
Casts self to Option<&KeyMustBeValidAsLocalVariable>, return None if variant doesn’t match
Casts self to Option<&DuplicateVariableName>, return None if variant doesn’t match
Casts self to Option<&DuplicateKeyName>, return None if variant doesn’t match
Casts self to Option<&SingletonLiteral>, return None if variant doesn’t match
Casts self to Option<&NthRefIsTooBig>, return None if variant doesn’t match
Casts self to Option<&DuplicatedArgumentName>, return None if variant doesn’t match
Casts self to Option<&RegexError>, return None if variant doesn’t match
Casts self to Option<&InvalidSymbol>, return None if variant doesn’t match
Casts self to Option<&VoidValueExpression>, return None if variant doesn’t match
Trait Implementations
This method tests for self and other values to be equal, and is used
by ==. Read more
This method tests for !=.
Auto Trait Implementations
impl RefUnwindSafe for DiagnosticMessage
impl Send for DiagnosticMessage
impl Sync for DiagnosticMessage
impl Unpin for DiagnosticMessage
impl UnwindSafe for DiagnosticMessage
Blanket Implementations
Mutably borrows from an owned value. Read more