import type { SourcePoint, SourceSpan } from "./types.js"; export interface LegacyLineRange { /** One-based inclusive line containing the span start. */ lineStart: number; /** One-based inclusive line containing span content. */ lineEnd: number; } /** Byte-addressed index over one immutable snapshot of UTF-8 source. */ export declare class SourceIndex { #private; constructor(source: string | Buffer); get byteLength(): number; /** Defensive copy: callers cannot mutate indexed source after construction. */ sourceBytes(): Buffer; lineStarts(): readonly number[]; pointAt(byteOffset: number): SourcePoint; span(startByte: number, endByte: number): SourceSpan; validateSpan(span: SourceSpan): SourceSpan; snippetBytes(span: SourceSpan): Buffer; snippet(span: SourceSpan): string; /** Remap a child-parser span relative to an exact host byte slice. */ remapChildSpan(hostSlice: SourceSpan, childSpan: SourceSpan): SourceSpan; } /** Derive legacy one-based inclusive line fields from an end-exclusive span. */ export declare function deriveLegacyLineRange(span: SourceSpan): LegacyLineRange; //# sourceMappingURL=source-span.d.ts.map