Fixed error reporting of missing :for clause
This commit is contained in:
parent
a38170a25b
commit
6f0c6e636f
1 changed files with 3 additions and 4 deletions
7
goof.scm
7
goof.scm
|
@ -147,7 +147,7 @@
|
|||
((eq? 'acc type) (valid-acc-clauses))))
|
||||
(define (pred x) (free-identifier=? x binding))
|
||||
(find pred searchee))
|
||||
(syntax-case stx (:acc)
|
||||
(syntax-case stx (:acc :for)
|
||||
((_ accumulator :acc one two original-syntax . rest)
|
||||
(if (clause-defined? 'acc #'accumulator)
|
||||
#'(accumulator :acc one two original-syntax . rest)
|
||||
|
@ -155,9 +155,9 @@
|
|||
"Unknown accumulator in loop: "
|
||||
#'original-syntax
|
||||
#'accumulator)))
|
||||
((_ iterator one two original-syntax . rest)
|
||||
((_ iterator :for one two original-syntax . rest)
|
||||
(if (clause-defined? 'for #'iterator)
|
||||
#'(iterator one two original-syntax . rest)
|
||||
#'(iterator :for one two original-syntax . rest)
|
||||
(syntax-violation (syntax->datum #'iterator)
|
||||
"Unknown iterator in loop: "
|
||||
#'original-syntax
|
||||
|
@ -219,7 +219,6 @@
|
|||
. body))))
|
||||
|
||||
|
||||
|
||||
(define-syntax loop/list/parallel
|
||||
(syntax-rules ()
|
||||
((n (clauses ...) body ...)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue