From e4401fd450b867b38c8348e7894821b987805409 Mon Sep 17 00:00:00 2001 From: Jon Rafkind Date: Thu, 26 Jul 2012 13:37:35 -0600 Subject: [PATCH] [honu] need at least one iterator in a for loop --- collects/honu/core/private/honu2.rkt | 6 ++++-- collects/honu/core/private/parse2.rkt | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/collects/honu/core/private/honu2.rkt b/collects/honu/core/private/honu2.rkt index 27d3a71fff..4e427d846f 100644 --- a/collects/honu/core/private/honu2.rkt +++ b/collects/honu/core/private/honu2.rkt @@ -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)]))) diff --git a/collects/honu/core/private/parse2.rkt b/collects/honu/core/private/parse2.rkt index 686b7f25af..ef0185890c 100644 --- a/collects/honu/core/private/parse2.rkt +++ b/collects/honu/core/private/parse2.rkt @@ -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]