import { type ErrorSourceSpan } from "../error/shape.js";
export type ParseDiagnostic = {
    kind: "ParseError";
    filename: string;
    line: number;
    column: number;
    excerpt: string;
    caret: string;
    message: string;
};
export declare class ParseError extends Error implements ParseDiagnostic {
    readonly filename: string;
    readonly kind = "ParseError";
    readonly line: number;
    readonly column: number;
    readonly excerpt: string;
    readonly caret: string;
    readonly span: ErrorSourceSpan;
    constructor(filename: string, message: string, line: number, column: number, excerpt: string, caret: string, span: ErrorSourceSpan);
}
export declare function formatParseError(source: string, filename: string, error: Error): ParseError;
