diff options
| author | Rose Hogenson <rhogenson@posteo.net> | 2022-03-03 13:51:41 -0800 |
|---|---|---|
| committer | Rose Hogenson <rhogenson@posteo.net> | 2022-03-03 13:51:41 -0800 |
| commit | 07221d401de8d633cc58fec8c313617b0716ef1d (patch) | |
| tree | 18573067f6dd5ccec9bbfaedde79fb0e2e2fe630 /csc/macros.csc | |
| parent | 056fbf7e7dc727d020ba54e439f2b47411c58e76 (diff) | |
| download | chromatopelma-07221d401de8d633cc58fec8c313617b0716ef1d.tar.zst | |
Write the compiler frontend.
Diffstat (limited to 'csc/macros.csc')
| -rw-r--r-- | csc/macros.csc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/csc/macros.csc b/csc/macros.csc index df8bc73..e59973b 100644 --- a/csc/macros.csc +++ b/csc/macros.csc @@ -1,7 +1,8 @@ (define-library (csc macros) (export expand - test-environment) + macro-syntax-error? + builtins-environment) (import (scheme base) (only (csc assert) assert) (only (csc format) sprintf) @@ -320,8 +321,7 @@ ; expand can be thought of as a compiler from Scheme to IR1. Macros ; included in the environment can be used to extend the syntax. Returns an - ; IR1 expression and an environment which has been modified with any new - ; bindings introduced by the expression. + ; IR1 expression. (define (expand expression environment) (expand-syntax-object (wrap-syntax expression environment))) @@ -724,7 +724,7 @@ (_ (raise-syntax-error "unexpected form in case-lambda" x)))))) - (define test-environment + (define builtins-environment (make-environment (alist->substitutions (list (cons 'syntax-rules builtin-syntax-rules) |
