Struct lib_ruby_parser::Diagnostic [−][src]
#[repr(C)]pub struct Diagnostic { pub level: ErrorLevel, pub message: DiagnosticMessage, pub loc: Loc, }
Expand description
Diagnostic message that comes from the parser when there’s an error or warning
Fields
level: ErrorLevelLevel of the diagnostic (error or warnings)
message: DiagnosticMessageMessage of the diagnostic
loc: LocLocation of the diagnostic
Implementations
Construncts an instance of Diagnostic
Returns rendered message
Renders all data into a single String, produces an output like:
(test.rb):1:5: error: unexpected END_OF_INPUT
(test.rb):1: foo++
(test.rb):1: ^
Returns true if level of the diagnostic is Warning
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 Diagnosticimpl Send for Diagnosticimpl Sync for Diagnosticimpl Unpin for Diagnosticimpl UnwindSafe for DiagnosticBlanket Implementations
Mutably borrows from an owned value. Read more