Skip to main content

Module error

Module error 

Source
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§

CompileError
A compile error.
Suggestion
A structured fix for the error it is attached to (v0.26, ADR 0054).

Enums§

Applicability
Whether a Suggestion can be applied without review (mirrors rustc; gates a future CLI --fix and 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 beside CompileError (it classifies one): shared by the IDE diagnose path (bynk-ide) and the short/json renderers, without either depending on the other.

Functions§

partition_by_severity
Split diagnostics into (errors, warnings) by severity (ADR 0117). The build fails iff the errors half is non-empty; the warnings half surfaces but does not gate compilation. Relative order within each half is preserved.