add capture-syntactic-environment. close #96

This commit is contained in:
Yuichi Nishiwaki 2014-07-19 11:23:14 +09:00
parent ccd457544d
commit e715ca10ea
1 changed files with 5 additions and 0 deletions

View File

@ -96,6 +96,10 @@
(define (close-syntax form env)
(make-syntactic-closure env '() form))
(define-syntax capture-syntactic-environment
(lambda (form use-env mac-env)
(list (cadr form) (list (make-identifier 'quote mac-env) mac-env))))
(define (sc-macro-transformer f)
(lambda (expr use-env mac-env)
(make-syntactic-closure mac-env '() (f expr use-env))))
@ -180,6 +184,7 @@
(export make-syntactic-closure
close-syntax
capture-syntactic-environment
sc-macro-transformer
rsc-macro-transformer
er-macro-transformer