(syntax-check '(_ * (identifier * datum)) form)
(decl-item
(lambda ()
- (classify/declarations (cdr form) senv))))
-
-(define (classify/declarations declarations senv)
- (map (lambda (declaration)
- (classify/declaration declaration senv))
- declarations))
-
-(define (classify/declaration declaration senv)
- (map-declaration-identifiers (lambda (identifier)
- (var-item-id
- (classify/variable-reference identifier
- senv)))
- declaration))
-
-(define (classify/variable-reference identifier senv)
- (let ((item (classify-form identifier senv)))
+ (classify-decls (cdr form) senv))))
+
+(define (classify-decls decls senv)
+ (map (lambda (decl)
+ (classify-decl decl senv))
+ decls))
+
+(define (classify-decl decl senv)
+ (map-decl-ids (lambda (id)
+ (classify-id id senv))
+ decl))
+
+(define (classify-id id senv)
+ (let ((item (classify-form id senv)))
(if (not (var-item? item))
- (syntax-error "Variable required in this context:" identifier))
- item))
\ No newline at end of file
+ (syntax-error "Variable required in this context:" id))
+ (var-item-id item)))
\ No newline at end of file
(files "syntax-declaration")
(parent (runtime syntax))
(export (runtime syntax)
- map-declaration-identifiers))
+ map-decl-ids))
(define-package (runtime syntax transforms)
(files "syntax-transforms")
known-declarations))
unspecific))))
-(define (map-declaration-identifiers procedure declaration)
+(define (map-decl-ids procedure declaration)
(if (not (pair? declaration))
(error "Ill-formed declaration:" declaration))
(let* ((declaration
(make-scode-open-block
(map substitution (scode-open-block-names expression))
(map (lambda (declaration)
- (map-declaration-identifiers substitution declaration))
+ (map-decl-ids substitution declaration))
(scode-open-block-declarations expression))
(alpha-substitute substitution (scode-open-block-actions expression)))))
(lambda (substitution expression)
(make-scode-declaration
(map (lambda (declaration)
- (map-declaration-identifiers substitution declaration))
+ (map-decl-ids substitution declaration))
(scode-declaration-text expression))
(alpha-substitute substitution
(scode-declaration-expression expression)))))