From: Chris Hanson Date: Sat, 10 Feb 2018 04:53:13 +0000 (-0800) Subject: Another small round of renaming. X-Git-Tag: mit-scheme-pucked-x11-0.3.1~7^2~262 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=1745633979376f1827008cceda5b32f62e7a8ea0;p=mit-scheme.git Another small round of renaming. --- diff --git a/src/runtime/mit-syntax.scm b/src/runtime/mit-syntax.scm index 0668f992a..87c19b46a 100644 --- a/src/runtime/mit-syntax.scm +++ b/src/runtime/mit-syntax.scm @@ -277,22 +277,20 @@ USA. (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 diff --git a/src/runtime/runtime.pkg b/src/runtime/runtime.pkg index 3adfca4c5..23bec3c20 100644 --- a/src/runtime/runtime.pkg +++ b/src/runtime/runtime.pkg @@ -4525,7 +4525,7 @@ USA. (files "syntax-declaration") (parent (runtime syntax)) (export (runtime syntax) - map-declaration-identifiers)) + map-decl-ids)) (define-package (runtime syntax transforms) (files "syntax-transforms") diff --git a/src/runtime/syntax-declaration.scm b/src/runtime/syntax-declaration.scm index 80b0cb343..42ea88d76 100644 --- a/src/runtime/syntax-declaration.scm +++ b/src/runtime/syntax-declaration.scm @@ -39,7 +39,7 @@ USA. 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 diff --git a/src/runtime/syntax-rename.scm b/src/runtime/syntax-rename.scm index a0b988c10..f4f8d26b3 100644 --- a/src/runtime/syntax-rename.scm +++ b/src/runtime/syntax-rename.scm @@ -339,7 +339,7 @@ USA. (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))))) @@ -347,7 +347,7 @@ USA. (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)))))