import { LogProperties } from "./log"; import { Filesystem } from "./filesystem"; import { SqrlParserState } from "../compile/SqrlParserState"; import { AstLocation, SlotAst } from "./ast"; import { Ast } from "../ast/Ast"; import { SqrlConstantSlot } from "../slot/SqrlSlot"; import { EntityId } from "./entity"; export declare function buildSqrlError(node: Ast, format: string, ...args: any[]): SqrlAstError; export declare function sqrlInvariant(node: Ast, condition: any, format: string, ...args: Array): void; export declare class ConstantSlot { _wrapped: SqrlConstantSlot; constructor(_wrapped: SqrlConstantSlot); getValue(): any; setValue(newValue: any): void; } export declare class CompileState { _wrapped: SqrlParserState; constructor(_wrapped: SqrlParserState); getFilesystem(): Filesystem; setGlobal(sourceAst: Ast, valueAst: Ast, name?: string): SlotAst; setConstantSlot(sourceAst: Ast, name: string, initialValue: any): ConstantSlot; addHashedEntity(sourceAst: Ast, entityType: string, props: { [key: string]: any; }): { entityId: EntityId; entityAst: SlotAst; }; combineGlobalWhere(where: Ast): { combinedAst: Ast; whereAst: Ast; whereFeatures: string[]; whereTruth: string; }; addStatement(name: string, slotAst: SlotAst): void; trace(props: LogProperties, format: string, ...param: any[]): any; debug(props: LogProperties, format: string, ...param: any[]): any; info(props: LogProperties, format: string, ...param: any[]): any; warn(props: LogProperties, format: string, ...param: any[]): any; error(props: LogProperties, format: string, ...param: any[]): any; fatal(props: LogProperties, format: string, ...param: any[]): any; } export interface SqrlParseErrorOptions { location?: AstLocation; source?: string; files?: { [filename: string]: string; }; } export interface SqrlErrorOutputOptions { codedError: boolean; source?: boolean; stacktrace?: boolean; } export declare abstract class SqrlCompileError extends Error { abstract toSqrlErrorOutput(options: SqrlErrorOutputOptions): string; abstract update(options: SqrlParseErrorOptions): any; toString(): string; } export declare class SqrlLocationError extends SqrlCompileError { private location; constructor(message: string, location: AstLocation); toSqrlErrorOutput(options: SqrlErrorOutputOptions): string; update(options: SqrlParseErrorOptions): void; } export declare class SqrlAstError extends SqrlCompileError { location: AstLocation | null; source: string | null; constructor(message: string, location?: AstLocation | null, source?: string | null); toSqrlErrorOutput(options: SqrlErrorOutputOptions): string; update(options: SqrlParseErrorOptions): void; }