Commit 35e4a18
committed
Support env argument in macroexpand-1 and store ctx during macro invocation
macroexpand-1 now accepts an optional env map as first argument (like
cljs.analyzer/macroexpand-1). Locals in the env shadow macro names,
matching CLJS behavior.
During macro invocation, the current analysis context is now stored
via ctx-store, so that macroexpand-1 called from within macro bodies
sees the correct bindings. This enables riddley's macroexpand-all to
discover outer locals in bb, similar to how it reads Compiler/LOCAL_ENV
on JVM.1 parent 10298f2 commit 35e4a18
File tree
4 files changed
+27
-7
lines changed- src/sci/impl
- test/sci
4 files changed
+27
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
| 20 | + | |
19 | 21 | | |
20 | 22 | | |
21 | 23 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
26 | 27 | | |
27 | 28 | | |
28 | 29 | | |
| |||
1625 | 1626 | | |
1626 | 1627 | | |
1627 | 1628 | | |
1628 | | - | |
| 1629 | + | |
| 1630 | + | |
1629 | 1631 | | |
1630 | 1632 | | |
1631 | 1633 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
790 | 790 | | |
791 | 791 | | |
792 | 792 | | |
793 | | - | |
794 | | - | |
795 | | - | |
796 | | - | |
797 | | - | |
| 793 | + | |
| 794 | + | |
| 795 | + | |
| 796 | + | |
| 797 | + | |
| 798 | + | |
| 799 | + | |
| 800 | + | |
| 801 | + | |
| 802 | + | |
| 803 | + | |
| 804 | + | |
| 805 | + | |
| 806 | + | |
| 807 | + | |
798 | 808 | | |
799 | 809 | | |
800 | 810 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1121 | 1121 | | |
1122 | 1122 | | |
1123 | 1123 | | |
1124 | | - | |
| 1124 | + | |
| 1125 | + | |
| 1126 | + | |
| 1127 | + | |
| 1128 | + | |
| 1129 | + | |
| 1130 | + | |
1125 | 1131 | | |
1126 | 1132 | | |
1127 | 1133 | | |
| |||
0 commit comments