Module error
Expand description
Compiler diagnostics.
Every error has a category (a dotted namespace string like
bynk.parse.expected_token), a primary span, a primary message, and
optionally some secondary labels and notes. Rendering goes through
[ariadne] for source-pointing colour output.
Structs§
- Compile
Error - A compile error.
- Suggestion
- A structured fix for the error it is attached to (v0.26, ADR 0054).
Enums§
- Applicability
- Whether a
Suggestioncan be applied without review (mirrors rustc; gates a future CLI--fixand the LSP’s one-click apply). - Severity
- Severity classification for a
CompileError. Mirrors LSP severity levels so the LSP server can map diagnostics to the protocol without reinterpreting error categories. Lives in the syntax leaf besideCompileError(it classifies one): shared by the IDE diagnose path (bynk-ide) and theshort/jsonrenderers, without either depending on the other.
Functions§
- partition_
by_ severity - Split diagnostics into
(errors, warnings)by severity (ADR 0117). The build fails iff theerrorshalf is non-empty; thewarningshalf surfaces but does not gate compilation. Relative order within each half is preserved.