import type { ASTScript, ASTClass, ASTFunction, ASTField, ASTProperty, ASTStatement, ASTExpression, ASTTypeInfo, ASTVarDecl, ASTAssignment, ASTIf, ASTWhile, ASTFor, ASTForEach, ASTReturn, ASTSwitch, ASTTry, ASTLiteral, ASTBinaryOp, ASTUnaryOp, ASTCall, ASTMethodCall, ASTPropertyAccess, ASTIndexAccess, ASTConditional, ASTArrayLiteral, ASTDictionaryLiteral, ASTCast, ASTLambda, ASTNew, ASTImport, ASTEnum, ASTSignalDef } from './ScriptAST'; export interface ExportConfig { /** Target game engine/platform */ targetEngine?: 'unity' | 'godot' | 'bevy' | 'pygame' | 'love2d' | 'defold' | 'generic'; /** Engine version (e.g., '4.2' for Godot) */ engineVersion?: string; /** Indentation string */ indent: string; /** Line ending */ lineEnding: '\n' | '\r\n'; /** Whether to include debug comments */ includeDebugComments: boolean; /** Include source node IDs in comments */ includeSourceMappings: boolean; /** Base class name for generated scripts */ baseClassName?: string; /** Namespace/package for generated code */ namespace?: string; /** Additional custom options */ custom?: Record; } export declare const defaultConfig: ExportConfig; export interface ExportedFile { filename: string; content: string; /** Language/file type */ language: string; /** Optional file path for export consumption */ path?: string; } export interface ExportResult { files: ExportedFile[]; errors: ExportError[]; warnings: ExportWarning[]; stats: { classCount: number; methodCount: number; lineCount: number; exportDuration: number; }; } export interface ExportError { message: string; nodeId?: string; line?: number; column?: number; } export interface ExportWarning { message: string; nodeId?: string; suggestion?: string; } export interface TypeMapping { [key: string]: string; } export declare class CodeBuilder { private lines; private currentIndent; private indentStr; private lineEnding; constructor(config: ExportConfig); indent(): this; dedent(): this; line(text?: string): this; rawLine(text: string): this; emptyLine(): this; comment(text: string, style?: 'line' | 'block'): this; docComment(text: string, style?: 'csharp' | 'jsdoc' | 'python' | 'lua'): this; block(open: string, close: string, body: () => void): this; toString(): string; get lineCount(): number; } export declare abstract class LanguageExporter { protected config: ExportConfig; protected errors: ExportError[]; protected warnings: ExportWarning[]; /** Language name for identification */ abstract readonly languageName: string; /** File extension without dot */ abstract readonly fileExtension: string; /** Type mapping from AST types to target language */ abstract readonly typeMapping: TypeMapping; constructor(config?: Partial); export(script: ASTScript, config?: Partial): ExportResult; protected addError(message: string, nodeId?: string): void; protected addWarning(message: string, nodeId?: string, suggestion?: string): void; protected mapType(typeInfo: ASTTypeInfo): string; protected createBuilder(): CodeBuilder; protected abstract generateScript(script: ASTScript): string; protected abstract generateClass(cls: ASTClass, builder: CodeBuilder): void; protected abstract generateMethod(method: ASTFunction, builder: CodeBuilder): void; protected abstract generateField(field: ASTField, builder: CodeBuilder): void; protected abstract generateStatement(stmt: ASTStatement, builder: CodeBuilder): void; protected abstract generateExpression(expr: ASTExpression): string; protected formatArrayType(elementType: string): string; protected formatDictType(keyType: string, valueType: string): string; protected formatNullableType(baseType: string): string; protected generateImport(_imp: ASTImport, _builder: CodeBuilder): void; protected generateEnum(_en: ASTEnum, _builder: CodeBuilder): void; protected generateProperty(_prop: ASTProperty, _builder: CodeBuilder): void; protected generateSignal(_signal: ASTSignalDef, _builder: CodeBuilder): void; } export declare abstract class ImperativeLanguageExporter extends LanguageExporter { protected generateStatement(stmt: ASTStatement, builder: CodeBuilder): void; protected generateExpression(expr: ASTExpression): string; protected abstract readonly statementTerminator: string; protected abstract readonly breakKeyword: string; protected abstract readonly continueKeyword: string; protected abstract generateVarDecl(decl: ASTVarDecl, builder: CodeBuilder): void; protected abstract generateAssignment(assign: ASTAssignment, builder: CodeBuilder): void; protected abstract generateIf(stmt: ASTIf, builder: CodeBuilder): void; protected abstract generateWhile(stmt: ASTWhile, builder: CodeBuilder): void; protected abstract generateFor(stmt: ASTFor, builder: CodeBuilder): void; protected abstract generateForEach(stmt: ASTForEach, builder: CodeBuilder): void; protected abstract generateReturn(stmt: ASTReturn, builder: CodeBuilder): void; protected abstract generateSwitch(stmt: ASTSwitch, builder: CodeBuilder): void; protected abstract generateTry(stmt: ASTTry, builder: CodeBuilder): void; protected abstract generateLiteral(lit: ASTLiteral): string; protected abstract generateBinaryOp(op: ASTBinaryOp): string; protected abstract generateUnaryOp(op: ASTUnaryOp): string; protected abstract generateCall(call: ASTCall): string; protected abstract generateMethodCall(call: ASTMethodCall): string; protected abstract generatePropertyAccess(access: ASTPropertyAccess): string; protected abstract generateIndexAccess(access: ASTIndexAccess): string; protected abstract generateConditional(cond: ASTConditional): string; protected abstract generateArrayLiteral(arr: ASTArrayLiteral): string; protected abstract generateDictionaryLiteral(dict: ASTDictionaryLiteral): string; protected abstract generateCast(cast: ASTCast): string; protected abstract generateLambda(lambda: ASTLambda): string; protected abstract generateNew(n: ASTNew): string; } export declare function escapeString(str: string, quote?: '"' | "'"): string; export declare function toUpperCamelCase(str: string): string; export declare function toLowerCamelCase(str: string): string; export declare function toSnakeCase(str: string): string; export declare function toScreamingSnakeCase(str: string): string;