diff --git a/web/main.ts b/web/main.ts index e3ad97d..9a07548 100644 --- a/web/main.ts +++ b/web/main.ts @@ -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) => {