,r-unspecific)
(,r-shallow-fluid-bind ,swap! ,body ,swap!)))))))
+(define-syntax :local-declare
+ (er-macro-transformer
+ (lambda (form rename compare)
+ compare
+ (syntax-check '(KEYWORD (* (IDENTIFIER * DATUM)) + FORM) form)
+ (let ((r-let (rename 'LET))
+ (r-declare (rename 'DECLARE)))
+ `(,r-let ()
+ (,r-declare ,@(cadr form))
+ ,@(cddr form))))))
+
(define (unspecific-expression)
`(,keyword:unspecific))
(lambda ()
(classify/declarations (cdr form) environment))))
-(define (classifier:local-declare form environment definition-environment)
- (syntax-check '(KEYWORD (* (IDENTIFIER * DATUM)) + FORM) form)
- (let ((body
- (classify/body (cddr form)
- environment
- definition-environment)))
- (make-expression-item
- (lambda ()
- (output/local-declare (classify/declarations (cadr form) environment)
- (compile-body-item body))))))
-
(define (classify/declarations declarations environment)
(map (lambda (declaration)
(classify/declaration declaration environment))
output/lambda
output/let
output/letrec
- output/local-declare
output/named-lambda
output/post-process-expression
output/runtime-reference
classifier:er-macro-transformer
classifier:let-syntax
classifier:letrec-syntax
- classifier:local-declare
classifier:non-hygienic-macro-transformer
classifier:rsc-macro-transformer
classifier:sc-macro-transformer
(let*-syntax :let*-syntax)
(letrec :letrec)
(letrec* :letrec*)
+ (local-declare :local-declare)
(quasiquote :quasiquote)
(receive :receive)
supported-srfi-features)
(define-classifier 'ER-MACRO-TRANSFORMER classifier:er-macro-transformer)
(define-classifier 'LET-SYNTAX classifier:let-syntax)
(define-classifier 'LETREC-SYNTAX classifier:letrec-syntax)
- (define-classifier 'LOCAL-DECLARE classifier:local-declare)
(define-classifier 'NON-HYGIENIC-MACRO-TRANSFORMER
classifier:non-hygienic-macro-transformer)
(define-classifier 'RSC-MACRO-TRANSFORMER classifier:rsc-macro-transformer)
(define (output/runtime-reference name)
(output/access-reference name system-global-environment))
-(define (output/local-declare declarations body)
- (make-declaration declarations body))
-
(define lambda-tag:unnamed '|#[unnamed-procedure]|)
(define lambda-tag:let '|#[let-procedure]|)
(define lambda-tag:fluid-let '|#[fluid-let-procedure]|)