From 07221d401de8d633cc58fec8c313617b0716ef1d Mon Sep 17 00:00:00 2001 From: Rose Hogenson Date: Thu, 3 Mar 2022 13:51:41 -0800 Subject: Write the compiler frontend. --- csc/macros.csc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'csc/macros.csc') 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) -- cgit v1.3.1