Expand description
Source positions and compiler diagnostics shared by every Cove component.
ADR 0001 treats diagnostics as part of the learning interface: an error states the Cove rule it enforces, points at the source, and shows a textual correction when one is unambiguous.
Structs§
- Diagnostic
- A compiler or runtime message about a specific place in source.
- Diagnostics
- Collects diagnostics produced by one compilation.
- FileId
- Identifies one source file inside a
SourceMap. - Label
- A secondary source location that explains the primary one.
- Source
File - One loaded source file.
- Source
Map - Owns every source file the compiler has read.
- Span
- A half-open byte range
[start, end)inside a single file. - Spanned
- A value paired with the source range it came from.
Enums§
- Severity
- How seriously a diagnostic should be taken.
Functions§
- render
- Renders a diagnostic as plain text with a source excerpt.