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.
- Line
Index - 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.