aboutsummaryrefslogtreecommitdiffstats
path: root/csc/macros-test.csc
diff options
context:
space:
mode:
authorRose Hogenson <rhogenson@posteo.net>2022-01-14 21:06:26 -0800
committerRose Hogenson <rhogenson@posteo.net>2022-01-14 21:06:26 -0800
commita968e8595b999d5c0a43c59de69bcb4f34e205c1 (patch)
tree248ee958532eaaa07ed32c58a8dc3d3709ce9afc /csc/macros-test.csc
parentRewrite match to use exceptions. (diff)
downloadchromatopelma-a968e8595b999d5c0a43c59de69bcb4f34e205c1.tar.zst
Write a first draft macro expander.
Committing it because it compiles. I have to write tests and debug it still.
Diffstat (limited to 'csc/macros-test.csc')
-rw-r--r--csc/macros-test.csc12
1 files changed, 12 insertions, 0 deletions
diff --git a/csc/macros-test.csc b/csc/macros-test.csc
new file mode 100644
index 0000000..007b881
--- /dev/null
+++ b/csc/macros-test.csc
@@ -0,0 +1,12 @@
+(import (scheme base)
+ (only (csc ir1) make-constant)
+ (only (csc testing)
+ assert-equal
+ test)
+ (csc macros))
+
+
+(test builtin-quote
+ (assert-equal
+ (make-constant '(test 1 2 3))
+ (expand '(quote (test 1 2 3)) test-environment)))