import { ParserFunction } from "./ParserFunction"; import { Collection } from "@telegram.ts/collection"; import type { CommandData, CustomJSFunction } from "../AoiTyping"; declare const SymbolDescription: unique symbol; type SuccessCompiler = CommandData<{ functions: ParserFunction[]; }>; interface ErrorCompiler { func: string; line: number; errorCode?: string; [SymbolDescription]: string; } declare class Compiler { code: string; readonly searchFailed?: boolean; readonly reverseFunctions?: boolean; readonly availableFunctions: Collection; readonly functionCounts: Collection; constructor(parameters: { code: string; searchFailed?: boolean; reverseFunctions?: boolean; availableFunctions: Collection; }); processFunctionNames(): void; compile(): SuccessCompiler | ErrorCompiler; extractIfBlocks(structures: SuccessCompiler["functions"]): SuccessCompiler["functions"] | ErrorCompiler; extractTryCatchBlocks(structures: SuccessCompiler["functions"]): SuccessCompiler["functions"] | ErrorCompiler; extractFields(name: string, segmentCode: string): ErrorCompiler | string; makeError(func: string, description: string): ErrorCompiler; replaceLast(str: string, search: string, replacement: string): string; } export { Compiler, SymbolDescription, SuccessCompiler, ErrorCompiler };