Enum lib_ruby_parser::DiagnosticMessage [−][src]
#[repr(C)] pub enum DiagnosticMessage {}Show variants
FractionAfterNumeric, NoDigitsAfterDot, UnknownTypeOfPercentString, NumericLiteralWithoutDigits, UnterminatedList, UnterminatedRegexp, UnterminatedString, UnterminatedQuotedString, InvalidUnicodeEscape, TooLargeUnicodeCodepoint, InvalidUnicodeCodepoint, MultipleCodepointAtSingleChar, InvalidEscapeCharacter, InvalidHexEscape, UnterminatedHeredoc { heredoc_id: String, }, UnterminatedHeredocId, SlashRAtMiddleOfLine, DStarInterpretedAsArgPrefix, StarInterpretedAsArgPrefix, AmpersandInterpretedAsArgPrefix, TripleDotAtEol, ParenthesesIterpretedAsArglist, AmbiguousFirstArgument { operator: u8, }, AmbiguousOperator { operator: String, interpreted_as: String, }, InvalidCharacterSyntax { suggestion: String, }, InvalidOctalDigit, TrailingCharInNumber { c: u8, }, EmbeddedDocumentMeetsEof, InvalidChar { c: u8, }, IncompleteCharacterSyntax, GvarWithoutId, InvalidGvarName { c: u8, }, IvarWithoutId, InvalidIvarName { c: u8, }, CvarWithoutId, InvalidCvarName { c: u8, }, UnknownRegexOptions { options: String, }, UnterminatedUnicodeEscape, EncodingError { error: String, }, InvalidMultibyteChar, AmbiguousTernaryOperator { condition: String, }, AmbiguousRegexp, ElseWithoutRescue, BeginNotAtTopLevel, AliasNthRef, CsendInsideMasgn, ClassOrModuleNameMustBeConstant, EndlessSetterDefinition, UnexpectedToken { token_name: String, }, ClassDefinitionInMethodBody, ModuleDefinitionInMethodBody, InvalidReturnInClassOrModuleBody, ConstArgument, IvarArgument, GvarArgument, CvarArgument, NoSuchLocalVariable { var_name: String, }, OrdinaryParamDefined, NumparamUsed, TokAtEolWithoutExpression { token_name: String, }, EndInMethod, ComparisonAfterComparison { comparison: String, }, CircularArgumentReference { arg_name: String, }, DynamicConstantAssignment, CantAssignToSelf, CantAssignToNil, CantAssignToTrue, CantAssignToFalse, CantAssignToFile, CantAssignToLine, CantAssignToEncoding, CantAssignToNumparam { numparam: String, }, CantSetVariable { var_name: String, }, BlockGivenToYield, BlockAndBlockArgGiven, SymbolLiteralWithInterpolation, ReservedForNumparam { numparam: String, }, KeyMustBeValidAsLocalVariable, DuplicateVariableName, DuplicateKeyName, SingletonLiteral, NthRefIsTooBig { nth_ref: String, }, DuplicatedArgumentName, RegexError { error: String, }, InvalidSymbol { symbol: String, }, VoidValueExpression,
Expand description
Enum of all possible diagnostic message (both warnings and errors)
Variants
Emitted for code
1.2.3
Emitted for code like
foo.2
Emitted for code like
%k[foo]
Emitted for code like
0b
Emitted for code like
%w[foo bar
Emitted for code like
/foo
Emitted for code like
"foo
Emitted for code like
%s
// ^ EOF, not \n
Emitted for code like
"\ufoo"
Emitted for code like
"\u{999999}"
Emitted for code like
"\u{d800}"
Emitted for code like
?\u{41 42}
Emitted for code like
"\M-"
Emitted for code like
"\xZZ"
Emitted for code like
<<-HERE
Show fields
Fields of UnterminatedHeredoc
heredoc_id: String
Heredoc identifier
Emitted for code like
<<-"HERE
Emitted for code like
eval("foo \r = 42")
Emitted for code like (only in $VERBOSE mode)
foo **arg
Emitted for code like (only in $VERBOSE mode)
foo *arg
Emitted for code like (only in $VERBOSE mode)
foo &arg
Emitted for code like
range = 1...
Emitted for code like (only in $VERBOSE mode)
def m (a, b, c); end
Emitted for code like (only in $VERBOSE mode)
m +foo
Show fields
Fields of AmbiguousFirstArgument
operator: u8
Operator that is ambiguous
Emitted for code like (only in $VERBOSE mode)
1 *2
Show fields
Emitted for code like
"\M- "
Show fields
Fields of InvalidCharacterSyntax
suggestion: String
Valid syntax sugestions
Emitted for code like
09
Emitted for code like
0_a
Show fields
Fields of TrailingCharInNumber
c: u8
Invalid trailing char
Emitted for code like
=begin
Emitted for code like
eval("\x01foo")
Show fields
Fields of InvalidChar
c: u8
char
It is unknown how to trigger this error. Code that triggers it in MRI can be dead.
Emitted for code like
$
Emitted for code like
$@
Show fields
Fields of InvalidGvarName
c: u8
char after $
Emitted for code like
@
Emitted for code like
@1
Show fields
Fields of InvalidIvarName
c: u8
char after @
Emitted for code like
@@
Emitted for code like
@@1
Show fields
Fields of InvalidCvarName
c: u8
char after @@
Emitted for code like
/re/foo
Show fields
Fields of UnknownRegexOptions
options: String
Concatenated unknown options
Emitted for code like
"\u{1234"
Emitted for code like
# encoding: foo
Show fields
Fields of EncodingError
error: String
Error from decoder
Emitter for code like
eval("\xFF = 42")
Emitted for code like
a ?AA : 2
Show fields
Fields of AmbiguousTernaryOperator
condition: String
Source of the condition expression
Emitted for code like
m /foo/
Emitted for code like
begin; else; end
Emitted for code like
def f; BEGIN{}; end
Emitted for code like
alias $a $1
Emitted for code like
*a&.x = 0
Emitted for code like
module foo; end
Emitted for code like
def foo=() = 42
Emitted for any code that produces invalid sequence of tokens
Show fields
Fields of UnexpectedToken
token_name: String
Name of the token
Emitted for code like
def a; class Foo; end; end
Emitted for code like
def a; module Foo; end; end
Emitted for code like
class A; return; end
Emitted for code like
def foo(Abc); end
Emitted for code like
def foo(@abc); end
Emitted for code like
def foo($abc); end
Emitted for code like
def foo(@@abc); end
Emitted for code like
case 0; in ^a; true; end
Show fields
Fields of NoSuchLocalVariable
var_name: String
Variable name
Emitted for code like
m { |a| _1 }
Emitted for code like
foo { _1; bar { _2 }; }
Emitted for code like (only in $VERBOSE mode)
if
42
end
Show fields
Fields of TokAtEolWithoutExpression
token_name: String
Name of the token
Emitted for code like
def m; END {}; end
Emitted for code like (only in $VERBOSE mode)
a < b < c
Show fields
Fields of ComparisonAfterComparison
comparison: String
Source of the first comparison
Emitted for code like
def m(foo = foo) end
Show fields
Fields of CircularArgumentReference
arg_name: String
Name of the argument
Emitted for code like
def m; FOO = 1; end
Emitted for code like
self = foo
Emitted for code like
nil = foo
Emitted for code like
true = foo
Emitted for code like
false = foo
Emitted for code like
__FILE__ = foo
Emitted for code like
__LINE__ = foo
Emitted for code like
__ENCODING__ = foo
Emitted for code like
proc {_1; _1 = nil}
Show fields
Fields of CantAssignToNumparam
numparam: String
Source of the numbered parameter
Emitted for code like
$1 = foo
Show fields
Fields of CantSetVariable
var_name: String
Source of the read-only variable that is assigned
Emitted for code like
yield(&foo)
Emitted for code like
fun(&bar) do end
Emitted for code like
case a; in "#{a}": 1; end
Emitted for code like
_1 = 1
Show fields
Fields of ReservedForNumparam
numparam: String
Numbered parameter that is treated as a local variable
Emitted for code like
case a; in a?:; end
Emitted for code like
case 0; in a, a; end
Emitted for code like
case 0; in a: 1, a: 2; end
Emitted for code like
def (1).foo; end
Emitted for code like (only in $VERBOSE mode)
$100
Show fields
Fields of NthRefIsTooBig
nth_ref: String
Source of the nth_ref that is techincally a regular global variable
Emitted for code like
def foo(aa, aa); end
Emitted for code like
/[/
Show fields
Fields of RegexError
error: String
Error from Onigurama engine
Emitted for code like
%I"x .\xc3."
Show fields
Fields of InvalidSymbol
symbol: String
Source of the symbol
Emitted for code like
a = return
Implementations
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