diff options
| author | LLLL Colonq <llll@colonq> | 2026-09-24 16:40:51 -0400 |
|---|---|---|
| committer | LLLL Colonq <llll@colonq> | 2026-09-24 16:41:00 -0400 |
| commit | 394757c770ec871bdaf9d532940a575606ae3318 (patch) | |
| tree | 4064f3f0653bb66e0509c519d8f8c2082b73435f /pit/src/runtime/macroexpand.c | |
| parent | d7f85e314f40548c6840d987a3f4b556f2b7b7ff (diff) | |
pit: Add comments
Diffstat (limited to 'pit/src/runtime/macroexpand.c')
| -rw-r--r-- | pit/src/runtime/macroexpand.c | 3 |
1 files changed, 3 insertions, 0 deletions
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 <lcq/pit/runtime/macroexpand.h> +/* 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 { |
