From 0ec0658ada3ede25cd4acfb1c54dbca854091867 Mon Sep 17 00:00:00 2001 From: dzaima Date: Fri, 8 Apr 2022 17:25:31 +0300 Subject: [PATCH] oh right bqn_exec is a thing --- src/main.c | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/src/main.c b/src/main.c index 272bff1e..df534224 100644 --- a/src/main.c +++ b/src/main.c @@ -224,23 +224,12 @@ void cbqn_runLine(char* ln, i64 len) { popCatch(); } -#if WASM +#ifndef WASM void cbqn_evalSrc(char* src, i64 len) { - Body* body = m_nnsDesc(); - B ns = m_nns(body); - Scope* sc = ptr_inc(c(NS, ns)->sc); - ptr_dec(v(ns)); - B code = fromUTF8(src, len); - Block* block = bqn_compSc(code, inc(replPath), emptySVec(), sc, true); + B res = bqn_exec(code, bi_N, bi_N); - ptr_dec(sc->body); - sc->body = ptr_inc(block->bodies[0]); - B res = execBlockInline(block, sc); - ptr_dec(block); - ptr_dec(sc); B resFmt = bqn_fmt(res); - printRaw(resFmt); dec(resFmt); putchar('\n'); }