Skip to main content

Crate compactp_diagnostics

Crate compactp_diagnostics 

Source
Expand description

Structured diagnostics produced by the compactp parser frontend.

This crate defines Diagnostic, Severity, DiagnosticCode, and LabeledSpan — the types every parser-side error or warning flows through, and that every downstream consumer (CLI, library users, IDEs) reads.

Two renderers are provided: render_human for terminal-style rustc-like output and render_json for machine-readable JSON.

Re-exports§

pub use json::render_json;
pub use render::render_human;

Modules§

json
JSON diagnostic renderer.
render
Human-readable diagnostic rendering in rustc style.

Structs§

Diagnostic
A diagnostic message produced during parsing.
DiagnosticCode
A structured diagnostic code (e.g., E0001).
LabeledSpan
A labeled span for secondary diagnostic locations.

Enums§

Severity
Diagnostic severity level.