import { Parser, type ParserOptions } from './parser/Parser.mts'; import { RegExpParser } from './parser/RegExpParser.mts'; import { type GCMarker } from './host-defined/engine.mts'; import { SourceTextModuleRecord, SyntheticModuleRecord, type LoadedModuleRequestRecord, type ModuleRecordHostDefined } from './modules.mts'; import { ObjectValue, Value } from './value.mts'; import { type PlainCompletion } from './completion.mts'; import { kInternal } from './utils/internal.mts'; import type { ParseNode } from './parser/ParseNode.mts'; import type { Realm } from '#self'; export { Parser, RegExpParser }; export declare function wrappedParse(init: ParserOptions, f: (parser: Parser) => T): T | ObjectValue[]; export declare class ScriptRecord { readonly Realm: Realm; readonly ECMAScriptCode: ParseNode.Script; readonly LoadedModules: LoadedModuleRequestRecord[]; readonly HostDefined: ParseScriptHostDefined; mark(m: GCMarker): void; constructor(record: Omit); } export interface ParseScriptHostDefined { readonly specifier?: string | undefined; readonly [kInternal]?: { json?: boolean; /** only used in inspector.compileScript */ allowAllPrivateNames?: boolean; /** only used in inspector.compileScript */ allowAwait?: boolean; }; scriptId?: string; readonly doNotTrackScriptId?: boolean; } export declare function ParseScript(sourceText: string, realm: Realm, hostDefined?: ParseScriptHostDefined): ScriptRecord | ObjectValue[]; export declare function ParseModule(sourceText: string, realm: Realm, hostDefined?: ModuleRecordHostDefined): ObjectValue[] | SourceTextModuleRecord; /** https://tc39.es/ecma262/#sec-parsejsonmodule */ export declare function ParseJSONModule(sourceText: Value): PlainCompletion; /** https://tc39.es/ecma262/#sec-parsepattern */ export declare function ParsePattern(patternText: string, u: boolean, v: boolean): Value[] | ParseNode.RegExp.Pattern; //# sourceMappingURL=parse.d.mts.map