1
0
mirror of https://github.com/janet-lang/janet synced 2025-11-18 00:05:13 +00:00

Update peg to allow functions over captures. Update C API

to make janet function calls easier and faster from C (still
needs an object pool for fibers, though). Fix bug in scan-number
and add many more peg tests.
This commit is contained in:
Calvin Rose
2019-01-12 17:31:15 -05:00
parent 83f4a11bf3
commit 798c88b4c8
10 changed files with 201 additions and 75 deletions

View File

@@ -99,7 +99,7 @@ int janet_dobytes(JanetTable *env, const uint8_t *bytes, int32_t len, const char
JanetCompileResult cres = janet_compile(form, env, where);
if (cres.status == JANET_COMPILE_OK) {
JanetFunction *f = janet_thunk(cres.funcdef);
JanetFiber *fiber = janet_fiber(f, 64);
JanetFiber *fiber = janet_fiber(f, 64, 0, NULL);
JanetSignal status = janet_continue(fiber, janet_wrap_nil(), &ret);
if (status != JANET_SIGNAL_OK) {
janet_stacktrace(fiber, "runtime", ret);