Namespace DialogueDown.Diagnostics
Classes
- LocatedDiagnostic
The public, located view of one diagnostic: its Code, Severity, Category, the fully rendered Message, the one-based Start and End positions, and the half-open character range
[StartOffset, EndOffset)the diagnostic points at. Line/column suit human display and editor (LSP) ranges; the offsets let a tool index the source directly — a rendered underline or an editor selection. Consumers — the CLI errata renderer today, the LSP and web overlays later — depend on this stable projection rather than the compiler's internal diagnostic, whose types are free to evolve. Built by projecting a DialogueDown.Diagnostics.Diagnostic through a DialogueDown.Diagnostics.LineMap: the message is composed once (invariant culture) and the offsets are resolved to line/column, so every consumer shares identical text and locations.
- LocatedDiagnostic.EqualityComparer
An equality comparer for the enclosing type that uses the generated equality semantics.
- LocatedEdit
One text replacement in a LocatedFix: the half-open source range
[StartOffset, EndOffset)it replaces and the NewText written in its place. An insertion is an empty range, which places the text before the range's start.
- LocatedFix
A suggested repair in the located view: a writer-facing Title and the Edits that apply it. Offsets are absolute, so a tool can index the source directly; the editor projection converts them to a client-relative shape.
Structs
- LinePosition
A one-based position in the source text: a Line and a Column, counted in UTF-16 code units. It formats as
line,column— the shape a tool prefixes with the file to read asfile(line,column), matching the configuration loader's locations.
Enums
- DiagnosticCategory
The kind of rule a DialogueDown.Diagnostics.DiagnosticDescriptor belongs to. Each category owns a range of
DLG####codes — Syntax isDLG1xxx, Semantic isDLG2xxx, Style isDLG3xxx— so a code's range names its category, and a descriptor checks that the two agree. Part of the public diagnostic view (LocatedDiagnostic), so its members carry explicit, stable values.
- DiagnosticSeverity
How serious a DialogueDown.Diagnostics.Diagnostic is, ordered so Error is the worst: a producer or the result can ask "did anything fail?" by comparing against Error, or "what is the worst?" by taking the maximum. Part of the public diagnostic view (LocatedDiagnostic), so its members carry explicit, stable values.