compile program

This commit is contained in:
Theis Pieter Hollebeek 2024-12-12 10:46:14 +01:00
parent 4a0e23c193
commit 613b57f40f

View File

@ -20,6 +20,7 @@ const runtime = new Runtime(13370);
async function compileProgram(filepath: string) {
const result = await compiler.compileWithDebug(filepath);
return result;
}
async function runProgramWithDebug(program: number[]) {
@ -37,6 +38,8 @@ async function runProgramWithDebug(program: number[]) {
}
}
await compileProgram(filepath).then(runProgramWithDebug);
const router = new Router();
router.get("/api/source", (ctx) => {