From 613b57f40f8c69df9ebc549f00dfab33cf2db95c Mon Sep 17 00:00:00 2001 From: Theis Pieter Hollebeek Date: Thu, 12 Dec 2024 10:46:14 +0100 Subject: [PATCH] compile program --- web/main.ts | 3 +++ 1 file changed, 3 insertions(+) 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) => {