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: ErrorLevel
Level of the diagnostic (error or warnings)
message: DiagnosticMessage
Message of the diagnostic
loc: Loc
Location 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 Diagnostic
impl Send for Diagnostic
impl Sync for Diagnostic
impl Unpin for Diagnostic
impl UnwindSafe for Diagnostic
Blanket Implementations
Mutably borrows from an owned value. Read more