diff options
| author | LLLL Colonq <llll@colonq> | 2026-09-04 16:29:31 -0400 |
|---|---|---|
| committer | LLLL Colonq <llll@colonq> | 2026-09-04 16:29:31 -0400 |
| commit | 843ea34efc2c5ea10edc4d534304f8287f97fbbc (patch) | |
| tree | 65c2b676b650413a6154ffa7b319d4d0b6f9cff4 /pit/src/runtime/compile.c | |
| parent | c01f847b68a7fcd48eb0f3d456aa993a6f69ea8d (diff) | |
pit: printf
Diffstat (limited to 'pit/src/runtime/compile.c')
| -rw-r--r-- | pit/src/runtime/compile.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/pit/src/runtime/compile.c b/pit/src/runtime/compile.c index e7a4ab8..7cfc091 100644 --- a/pit/src/runtime/compile.c +++ b/pit/src/runtime/compile.c @@ -180,6 +180,8 @@ static void compile_interpret_traversal_entry(pit_runtime *rt, pit_traversal_ent } } +#include <stdio.h> + pit_value pit_compile(pit_runtime *rt, pit_value top) { /* compilation proceeds in a somewhat unintuitive manner */ /* typically, we would simply recursively traverse the tree, accumulating the output code */ @@ -290,6 +292,7 @@ end: { if (rt->compilation_stack->next > compilation_stack_reset) { /* if the compilation stack is not empty, the top is our compiled code! */ pit_compilation_entry ent; + ent.in.value = PIT_NIL; pit_vec_pop(pit_compilation_entry)(rt->compilation_stack, &ent); ret = ent.in.value; } @@ -299,6 +302,7 @@ end: { } rt->compilation_stack->next = compilation_stack_reset; rt->traversal->next = traversal_reset; + pit_fprintf(rt, stderr, "here: %v\n", ret, ret); return ret; } } |
