Clarify that spar-push-if pushes the form, and spar-push-elt the elt.
authorChris Hanson <org/chris-hanson/cph>
Sun, 25 Mar 2018 15:31:23 +0000 (08:31 -0700)
committerChris Hanson <org/chris-hanson/cph>
Sun, 25 Mar 2018 15:31:23 +0000 (08:31 -0700)
src/runtime/mit-macros.scm
src/runtime/mit-syntax.scm
src/runtime/runtime.pkg
src/runtime/syntax-parser.scm

index aea86961680360160534515d52fe97d7534c0eba..d234327421b5d6deb255e64a469ade94a3664e83 100644 (file)
@@ -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
index c4e482799e64a1ad6fa7976b2dcebf5514aeaf42..5cf5ff8a3b49ebbdfbb72d1fc0be359cba4f7788 100644 (file)
@@ -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)
index 8d7ddefb229101536f588fa8f3120f8072b70ced..9415054a92b2bb852f7c7bb24a77772419697fcc 100644 (file)
@@ -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
index 4a3976e9642ccdfc5abcc11f456e91d2aeb008db..67e4bca1215fe0621a40a892ccde41ecaa5c46e1 100644 (file)
@@ -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)))