diff --git a/collects/honu/core/private/parse2.rkt b/collects/honu/core/private/parse2.rkt index 11c862a48f..417d89a607 100644 --- a/collects/honu/core/private/parse2.rkt +++ b/collects/honu/core/private/parse2.rkt @@ -220,8 +220,14 @@ [x:atom (debug "atom ~a current ~a\n" #'x current) (if current - (values (left current) #'(head rest ...)) + (values (left current) stream) (do-parse #'(rest ...) precedence left #'x))] + [(#%braces stuff ...) + (if current + (values (left current) stream) + (let () + (define body (parse-all #'(stuff ...))) + (do-parse #'(rest ...) precedence left body)))] [(#%parens args ...) (debug "function call ~a\n" left) (values (left (with-syntax ([current current] diff --git a/collects/tests/honu/for.honu b/collects/tests/honu/for.honu new file mode 100644 index 0000000000..fba834a9a8 --- /dev/null +++ b/collects/tests/honu/for.honu @@ -0,0 +1,9 @@ +#lang honu + +for x = 1 + 5 to 10 do + printf("x is ~a\n" x) + +for x = 1 to 10 do { + var y = x + 1; + printf("x ~a y ~a\n", x, y) +}