aboutsummaryrefslogtreecommitdiffstats
path: root/csc/macros.csc
diff options
context:
space:
mode:
authorRose Hogenson <rhogenson@posteo.net>2022-06-25 16:14:47 -0700
committerRose Hogenson <rhogenson@posteo.net>2022-06-25 16:14:47 -0700
commit7004f8d7a381fcd2f9c63ae04d99dc67161158f4 (patch)
tree2ec67d86c99c61a16102ded94c39239446988564 /csc/macros.csc
parent84f35b4a539368fcb745118e87c4f59c629f193c (diff)
downloadchromatopelma-7004f8d7a381fcd2f9c63ae04d99dc67161158f4.tar.zst
Continue work on continuation passing style.
Diffstat (limited to 'csc/macros.csc')
-rw-r--r--csc/macros.csc11
1 files changed, 6 insertions, 5 deletions
diff --git a/csc/macros.csc b/csc/macros.csc
index dfcfa64..ff5b63a 100644
--- a/csc/macros.csc
+++ b/csc/macros.csc
@@ -27,7 +27,7 @@
lexical-ref-gensym
lexical-ref?
library-define-expression
- library-define-name
+ library-define-ref
library-define?
library-ref-name
library-ref?
@@ -681,7 +681,7 @@
(define expanded-expr (expand-syntax-object expr))
(cond
((library-define? expanded-expr)
- (let ((name (library-define-name expanded-expr))
+ (let ((name (library-ref-name (library-define-ref expanded-expr)))
(g (gensym)))
(loop (with-binding name (make-lexical-ref name g) (syntax-map cdr body))
(cons name names)
@@ -731,9 +731,10 @@
(syntax-case x
((_ symbol expression)
(make-library-define
- (identifier-name symbol)
- (expand-syntax-object expression)
- (environment-library (syntax-object-environment x))))
+ (make-library-ref
+ (identifier-name symbol)
+ (environment-library (syntax-object-environment x)))
+ (expand-syntax-object expression)))
(_ (raise-syntax-error "unexpected form in builtin-define" x))))))