import { Program } from "./nodeTypes"; import { Range } from "./types"; export declare type Parser = (source: string, options?: ParserOptions, cache?: ParseCache, module?: boolean) => Program; interface ParseErrorDetail { message: string; lineNumber: number; description: string; index: number; column: number; } export declare class ParseError extends Error { error: ParseErrorDetail; constructor(error: ParseErrorDetail); } declare type ParserOptions = { range?: boolean; comment?: boolean; attachComment?: boolean; loc?: boolean; }; export declare const parse: Parser; export declare let defaultSource: (source: string) => (range: Range) => string; export declare type ParseCache = ReturnType; export declare function createCache(): { get(source: string): Program; set(source: string, value: Program): Program; }; export {};