From 843ea34efc2c5ea10edc4d534304f8287f97fbbc Mon Sep 17 00:00:00 2001 From: LLLL Colonq Date: Fri, 4 Sep 2026 16:29:31 -0400 Subject: pit: printf --- pit/src/runtime/compile.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'pit/src/runtime/compile.c') 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 + 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; } } -- cgit v1.3.1