From 394757c770ec871bdaf9d532940a575606ae3318 Mon Sep 17 00:00:00 2001 From: LLLL Colonq Date: Thu, 24 Sep 2026 16:40:51 -0400 Subject: pit: Add comments --- pit/src/runtime/macroexpand.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'pit/src/runtime/macroexpand.c') diff --git a/pit/src/runtime/macroexpand.c b/pit/src/runtime/macroexpand.c index 9a557dd..042a972 100644 --- a/pit/src/runtime/macroexpand.c +++ b/pit/src/runtime/macroexpand.c @@ -1,5 +1,6 @@ #include +/* perform a single round of macro expansion */ pit_value pit_macroexpand_1(pit_runtime *rt, pit_value top) { i64 expr_stack_reset = rt->expr_stack->next; i64 result_stack_reset = rt->result_stack->next; @@ -95,6 +96,8 @@ end: { } } +/* repeatedly macroexpand_1 until we arrive at a fixpoint */ +/* (hopefully this expands all macros :] ) */ pit_value pit_macroexpand(pit_runtime *rt, pit_value prev) { pit_value next = prev; do { -- cgit v1.3.1