/** * Coordinate + severity conversion: our `Diagnostic` → LSP shapes. * * Our diagnostics use ANTLR conventions — `line` is 1-based, `column` is * 0-based, and `endColumn` (when present) is the EXCLUSIVE end column * (`stop.column + text.length`). LSP wants both line and character * 0-based, with a half-open `[start, end)` range. So: subtract 1 from * lines, pass columns through, and use `endColumn` directly as the * exclusive end. When a diagnostic has no explicit end, underline a single * character starting at its column. */ import type { Diagnostic } from '../errors/diagnostic.js'; import { type LspDiagnostic, type Range, type SeverityValue } from './types.js'; export declare function toLspRange(d: Diagnostic): Range; export declare function toLspSeverity(severity: Diagnostic['severity']): SeverityValue; /** * Map one of our diagnostics to an LSP diagnostic. The user-facing hint and * "did you mean" suggestion are folded into the message (LSP shows one * string per squiggle); the machine `code` is preserved for editors that * surface it. */ export declare function toLspDiagnostic(d: Diagnostic): LspDiagnostic; //# sourceMappingURL=convert.d.ts.map