import { Program } from '../program.zena'; /** * Interface that all code generation backends must implement. * TOutput represents the artifact type (e.g. String for WAT, ByteBuffer/ByteArray for WASM). */ export interface CodeGenerator { /** The backend type name, e.g. "wat" or "wasm" */ backendName(): String; /** * Generates code for the given semantically checked program snapshot. */ generate(program: Program): TOutput; }