1
0
mirror of https://github.com/janet-lang/janet synced 2025-10-31 07:33:01 +00:00

initial slotsyms implementation

This commit is contained in:
Jona Ekenberg
2023-02-01 09:39:24 +01:00
parent dacbe29771
commit 88813c4f87
8 changed files with 162 additions and 1 deletions

View File

@@ -753,6 +753,10 @@ static JanetSlot janetc_while(JanetFopts opts, int32_t argn, const Janet *argv)
if (c->buffer) janet_v__cnt(c->buffer) = labelwt;
if (c->mapbuffer) janet_v__cnt(c->mapbuffer) = labelwt;
if (janet_truthy(janet_dyn("debug"))) {
janet_array_push(c->local_binds, janet_wrap_array(janet_array(0)));
}
janetc_scope(&tempscope, c, JANET_SCOPE_FUNCTION, "while-iife");
/* Recompile in the function scope */
@@ -829,6 +833,9 @@ static JanetSlot janetc_fn(JanetFopts opts, int32_t argn, const Janet *argv) {
/* Begin function */
c->scope->flags |= JANET_SCOPE_CLOSURE;
if (janet_truthy(janet_dyn("debug"))) {
janet_array_push(c->local_binds, janet_wrap_array(janet_array(0)));
}
janetc_scope(&fnscope, c, JANET_SCOPE_FUNCTION, "function");
if (argn == 0) {