Skip to content

Commit

Permalink
fixed missing rib and added test case
Browse files Browse the repository at this point in the history
  • Loading branch information
azizghuloum committed Nov 24, 2024
1 parent 3701c08 commit 44fe55e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/expander.ts
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ function expand_concise_body(step: {
}): never {
const loc = step.loc;
const k: (gs: goodies) => never = (gs: goodies) => {
const new_unit = extend_unit(step.unit, step.rib_id, gs.rib);
const new_unit = extend_unit(gs.unit, step.rib_id, gs.rib);
return postexpand_body({ ...gs, unit: new_unit, k: step.k });
};
return loc.t.type === "list" && loc.t.tag === "statement_block"
Expand Down
5 changes: 5 additions & 0 deletions tests/macro-generating-macro-1.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
using_syntax_rules(
[capture,
capture(expr, id, body),
using_syntax_rules([id, id, expr]).rewrite(body)],
).rewrite((x) => capture(x, t, (x) => x + t))
3 changes: 3 additions & 0 deletions tests/macro-generating-macro-1.ts.expanded
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
(x_5) => (x_11) => x_11 + x_5;
================================
DONE

0 comments on commit 44fe55e

Please sign in to comment.