From c7125c87f352760240b434f7f67cc746a66a7881 Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Sun, 25 Mar 2018 08:31:23 -0700 Subject: [PATCH] Clarify that spar-push-if pushes the form, and spar-push-elt the elt. --- src/runtime/mit-macros.scm | 6 +++--- src/runtime/mit-syntax.scm | 2 +- src/runtime/runtime.pkg | 2 +- src/runtime/syntax-parser.scm | 12 ++++++------ 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/runtime/mit-macros.scm b/src/runtime/mit-macros.scm index aea869616..d23432742 100644 --- a/src/runtime/mit-macros.scm +++ b/src/runtime/mit-macros.scm @@ -212,7 +212,7 @@ USA. `((spar ,(spar-elt (spar-push-elt-if identifier? spar-arg:form) - (spar-push-if mit-lambda-list? spar-arg:form))) + (spar-push-form-if mit-lambda-list? spar-arg:form))) (list (+ any))) (lambda (name bvl body-forms) (scons-define name @@ -220,8 +220,8 @@ USA. (scons-rule `((spar ,(spar-elt - (spar-push-elt spar-arg:form) - (spar-push-if mit-lambda-list? spar-arg:form))) + (spar-push-elt) + (spar-push-form-if mit-lambda-list? spar-arg:form))) (list (+ any))) (lambda (nested bvl body-forms) (scons-define nested diff --git a/src/runtime/mit-syntax.scm b/src/runtime/mit-syntax.scm index c4e482799..5cf5ff8a3 100644 --- a/src/runtime/mit-syntax.scm +++ b/src/runtime/mit-syntax.scm @@ -220,7 +220,7 @@ USA. (spar-elt) (spar-elt (spar-push-elt-if identifier? spar-arg:form) - (spar-push-if mit-lambda-list? spar-arg:form)) + (spar-push-form-if mit-lambda-list? spar-arg:form)) spar-push-body)))) (define (assemble-lambda-item name bvl body senv) diff --git a/src/runtime/runtime.pkg b/src/runtime/runtime.pkg index 8d7ddefb2..9415054a9 100644 --- a/src/runtime/runtime.pkg +++ b/src/runtime/runtime.pkg @@ -4580,7 +4580,7 @@ USA. spar-push-body spar-push-elt spar-push-elt-if - spar-push-if + spar-push-form-if spar-push-value spar-repeat spar-seq diff --git a/src/runtime/syntax-parser.scm b/src/runtime/syntax-parser.scm index 4a3976e96..67e4bca12 100644 --- a/src/runtime/syntax-parser.scm +++ b/src/runtime/syntax-parser.scm @@ -193,9 +193,9 @@ USA. (%output-push-all output (%subst-args input senv output args)) failure))) -(define (spar-push-if predicate . args) +(define (spar-push-form-if predicate . args) (spar-seq (apply spar-match predicate args) - (apply spar-push args))) + (spar-push spar-arg:form))) (define (spar-push-value procedure . args) (lambda (input senv output success failure) @@ -357,11 +357,11 @@ USA. (define (spar-match-elt predicate . args) (spar-elt (apply spar-match predicate args))) -(define (spar-push-elt . args) - (spar-elt (apply spar-push args))) +(define (spar-push-elt) + (spar-elt (spar-push spar-arg:form))) (define (spar-push-elt-if predicate . args) - (spar-elt (apply spar-push-if predicate args))) + (spar-elt (apply spar-push-form-if predicate args))) (define (spar-match-null) (spar-match null? spar-arg:form)) @@ -477,7 +477,7 @@ USA. (cdr form)) (else (bad-pattern pattern))))))) (rules (''ignore (:elt)) - (''any (:push-elt (:form))) + (''any (:push-elt)) (''id (:push-elt-if (:id?) (:form))) (''symbol (:push-elt-if (:symbol?) (:form))) (procedure? (:push-elt-if pattern (:form))) -- 2.25.1