Expand description
Compiler diagnostic types for the Fiducia language.
Provides Diagnostic (a single error or warning with source context)
and Diagnostics (a collection that implements Error for use with
anyhow). Renders rustc-style diagnostics via
annotate-snippets.
A pass collects both severities into one Vec<Diagnostic> as it walks;
at the end it drains the warnings with Diagnostics::warnings for the
caller to print, then decides Ok/Err on the errors with
Diagnostics::finish.
Structs§
- Diagnostic
- A compiler diagnostic with source context for rich rendering.
- Diagnostics
- A collection of compiler diagnostics.
Enums§
- Severity
- Whether a diagnostic fails its pass.
Functions§
- format_
errors - Format parse-stage errors with a filename attached to each.