[honu] need at least one iterator in a for loop

This commit is contained in:
Jon Rafkind 2012-07-26 13:37:35 -06:00
parent 62042beb50
commit e4401fd450
2 changed files with 5 additions and 3 deletions

View File

@ -425,9 +425,11 @@
(lambda (code)
(syntax-parse code #:literal-sets (cruft)
#:literals (honu-in)
[(_ (~seq iterator:id honu-in stuff:honu-expression (~optional honu-comma)) ...
[(_ (~seq iterator:id honu-in stuff:honu-expression)
(~seq honu-comma iterator*:id honu-in stuff*:honu-expression) ...
honu-do body:honu-expression . rest)
(values (racket-syntax (for ([iterator stuff.result] ...)
(values (racket-syntax (for ([iterator stuff.result]
[iterator* stuff*.result] ...)
body.result))
#'rest
#t)])))

View File

@ -296,7 +296,7 @@
(if current
(values (left current) stream)
(begin
(debug "Honu macro at phase ~a: ~a\n" (syntax-local-phase-level) head)
(debug "Honu macro at phase ~a: ~a ~a\n" (syntax-local-phase-level) head (syntax-local-value head))
(let-values ([(parsed unparsed terminate?)
((syntax-local-value head)
(with-syntax ([head head]