Skip to main content

Crate zpl_toolchain_diagnostics

Crate zpl_toolchain_diagnostics 

Source
Expand description

Diagnostics for the ZPL toolchain.

Provides Diagnostic, Severity, Span, and LineIndex types used to report errors, warnings, and informational messages from the parser and validator. Diagnostic codes are defined in the codes module.

Modules§

codes
Diagnostic ID constants auto-generated from the spec. Diagnostic ID constants.
policy
Policy constants derived from spec/diagnostics.jsonc.

Structs§

Diagnostic
A diagnostic message produced by the parser or validator.
LineIndex
Maps byte offsets in a source string to line and column positions.
Span
Byte span in the source input.

Enums§

Severity
Severity level for a diagnostic message.

Functions§

explain
Returns the human-readable explanation for a diagnostic code, if known.
message_template_for
Returns an optional message template for a diagnostic code + template variant.
severity_for_code
Returns the default severity for a diagnostic code.