Skip to main content

Module format

Module format 

Source
Expand description

Structured diagnostic formatting for CLI output.

Provides format_diagnostic() which renders a crate::error::ParseError together with the relevant source line and a caret underline pointing at the error location.

Functionsยง

compute_line_starts
Precompute line start offsets for O(1) source line lookup.
format_diagnostic
Format a parse error with source-context display for CLI output.
format_diagnostics
Computes line starts once and reuses for multiple errors.