/** * Represents a location in source code with line, column, and absolute offset. */ export interface SourceLocation { /** 1-based line number */ line: number; /** 1-based column number */ column: number; /** 0-based character offset from start of content */ offset: number; } /** * Represents a range in source code from start to end positions. */ export interface SourceRange { start: SourceLocation; end: SourceLocation; } /** * Error thrown when HCL parsing fails. * Contains location information for debugging. */ export declare class ParseError extends Error { /** The source file path where the error occurred */ readonly source: string; /** The location in the source where the error occurred */ readonly location: SourceLocation; /** Optional end location for range-based errors */ readonly endLocation?: SourceLocation; constructor(message: string, source: string, location: SourceLocation, endLocation?: SourceLocation); } /** * Calculates line and column numbers from a character offset. * @param content - The full source content * @param offset - The 0-based character offset * @returns The source location with line, column, and offset */ export declare function offsetToLocation(content: string, offset: number): SourceLocation; /** * Creates a SourceRange from start and end offsets. * @param content - The full source content * @param startOffset - The 0-based start offset * @param endOffset - The 0-based end offset * @returns The source range */ export declare function offsetsToRange(content: string, startOffset: number, endOffset: number): SourceRange;