diff options
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 { |
