Expand description
Diagnostic protocols and renderers used by Oxc.
This crate defines the Diagnostic and SourceCode protocols together
with graphical and JSON renderers. It intentionally does not provide an
application error container: callers own diagnostics directly or through
boxed trait objects and choose a renderer explicitly.
Structs§
- Graphical
Report Handler - Graphical
Theme - Theme used by
GraphicalReportHandler. - JSON
Report Handler - Renders diagnostics as machine-readable JSON.
- Labeled
Span - A labeled
SourceSpan. - Named
Source - Utility struct for when you have a regular
SourceCodetype that doesn’t implementname. For exampleString. Or if you want to override thenamereturned by theSourceCode. - Source
Span - Span within a
SourceCode
Enums§
- Severity
Diagnosticseverity. Renderers use this to change the way diagnostics are displayed. Defaults toSeverity::Error.
Traits§
- Diagnostic
- Adds rich metadata to your Error that can be used by Rich metadata that renderers use to produce human-friendly error messages.
- Source
Code - Contiguous source text used by diagnostic renderers.