mirror of
https://git.sfja.dk/Mikkel/slige.git
synced 2025-01-18 13:06:30 +00:00
compile program
This commit is contained in:
parent
4a0e23c193
commit
613b57f40f
@ -20,6 +20,7 @@ const runtime = new Runtime(13370);
|
|||||||
|
|
||||||
async function compileProgram(filepath: string) {
|
async function compileProgram(filepath: string) {
|
||||||
const result = await compiler.compileWithDebug(filepath);
|
const result = await compiler.compileWithDebug(filepath);
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
async function runProgramWithDebug(program: number[]) {
|
async function runProgramWithDebug(program: number[]) {
|
||||||
@ -37,6 +38,8 @@ async function runProgramWithDebug(program: number[]) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
await compileProgram(filepath).then(runProgramWithDebug);
|
||||||
|
|
||||||
const router = new Router();
|
const router = new Router();
|
||||||
|
|
||||||
router.get("/api/source", (ctx) => {
|
router.get("/api/source", (ctx) => {
|
||||||
|
Loading…
Reference in New Issue
Block a user