AeThex-OS/packages/aethex-cli/lib/compiler/Compiler.d.ts

50 lines
No EOL
1.2 KiB
TypeScript

/**
* AeThex Compiler - Main Compiler Class
* Orchestrates lexing, parsing, and code generation
*/
export type CompileTarget = 'javascript' | 'roblox' | 'uefn' | 'unity';
export interface CompileOptions {
target?: CompileTarget;
sourceFile?: string;
}
export interface CompileError {
type: 'SyntaxError' | 'SemanticError' | 'CompilationError';
message: string;
line?: number;
column?: number;
file?: string;
}
export interface CompileResult {
success: boolean;
code?: string;
errors: CompileError[];
warnings: CompileError[];
}
export declare class AeThexCompiler {
private target;
private sourceFile;
private errors;
private warnings;
constructor(options?: CompileOptions);
/**
* Compile AeThex source code to target language
*/
compile(sourceCode: string): CompileResult;
/**
* Basic semantic analysis
*/
private semanticAnalysis;
/**
* Generate code for target platform
*/
private generateCode;
/**
* Get target file extension
*/
static getExtension(target: CompileTarget): string;
/**
* Format errors for display
*/
static formatErrors(result: CompileResult): string;
}
//# sourceMappingURL=Compiler.d.ts.map