import type { AllFragments, ArrayFragment, ChildFragments, RecordFragment } from './fragments'; export interface CtxCompatible { results: RecordFragment[]; stack: AllFragments[]; } export declare class CtxProcessingError extends Error { readonly current: AllFragments; readonly parent?: AllFragments; constructor(current: AllFragments, parent?: AllFragments); } export declare class Ctx implements CtxCompatible { results: RecordFragment[]; stack: AllFragments[]; constructor(results?: RecordFragment[], stack?: AllFragments[]); private get safeCurrent(); private get current(); get currentRecord(): RecordFragment; get currentArray(): ArrayFragment; private popStack; private processStack; addString(value: string): Ctx; addBoolean(value: string | boolean): Ctx; startRecord(children?: ChildFragments): Ctx; endRecord(): Ctx; startRule(name: string): Ctx; endRule(): Ctx; startAttribute(name: string): Ctx; startArray(): Ctx; endArray(): Ctx; }