File size: 365 Bytes
3ce1a40 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | /**
* The full kernel pipeline: source -> AST -> IR -> wasm bytes.
*/
import { parse } from './parser.js';
import { lower } from '../ir/lowering.js';
import { emitModule } from '../../wasm/modules/codegen.js';
export function compile(source) {
const ast = parse(source);
const ir = lower(ast);
const bytes = emitModule(ir);
return { ast, ir, bytes };
}
|