import { MACHINE_OBJECT } from './typings/contractTypes'; /** * SmartC Compiler class. * * SmartC can compile C code or Assembly code for signum blockchain. Choose desired language with * argument options. Method `compile()` will compile entire code. If something wrong occurs, it will throw error. * Get the compiled instructions with methods `getAssemblyCode` or `getMachineCode` * * Example: Simple compilation test * ```ts * try { * const startUpTest = new SmartC({ * language: 'C', * sourceCode: '#pragma maxAuxVars 1\nlong a, b, c; a=b/~c;' * }) * startUpTest.compile() * const assemblyText = startUpTest.getAssemblyCode() * const machineObject = startUpTest.getMachineCode() * // Do something * } catch (e) { * return "Compilation error: " + e.message * } *``` * @module SmartC */ export declare class SmartC { private readonly language; private readonly sourceCode; private preAssemblyCode?; private MachineCode?; private Program; constructor(Options: { language: 'C' | 'Assembly'; sourceCode: string; }); /** * Triggers compilation process * @throws {Error} if compilation is not sucessfull */ compile(): this; /** * @returns Sucessfull compiled assembly code * @throws {Error} if compilation was not done */ getAssemblyCode(): string; /** * @returns Sucessfull compiled machine code * @throws {Error} if compilation was not done */ getMachineCode(): MACHINE_OBJECT; /** * Ask for current compiler version * @returns compiler version string */ getCompilerVersion(): string; }