fixed felix's bug

svn: r12495
This commit is contained in:
John Clements 2008-11-18 18:26:31 +00:00
parent d085b21a90
commit 9e7a4e9e1d

View File

@ -54,7 +54,10 @@
;; distinguish a top-level begin from one that's the result of some evaluation. ;; distinguish a top-level begin from one that's the result of some evaluation.
;; I think for the moment that it will solve our problem simply to remove the ;; I think for the moment that it will solve our problem simply to remove the
;; special case for begin at the top level. JBC, 2006-10-09 ;; special case for begin at the top level. JBC, 2006-10-09
;; ... aaaand, yep, there's a bug. The input is not fully-expanded syntax, and
;; therefore _can_ include a two-branched 'if' (because the reconstructor produces it.)
;;
(define (top-level-expr-iterator stx context-so-far) (define (top-level-expr-iterator stx context-so-far)
(let ([try (try->offset-try (make-try-all-subexprs stx 'top-level context-so-far))]) (let ([try (try->offset-try (make-try-all-subexprs stx 'top-level context-so-far))])
@ -120,6 +123,8 @@
(loop (+ count 1) (cdr clauses))))] (loop (+ count 1) (cdr clauses))))]
[(if test then else) [(if test then else)
(try-exprs-offset 1 #'(test then else))] (try-exprs-offset 1 #'(test then else))]
[(if test then)
(try-exprs-offset 1 #'(test then))]
[(begin . bodies) [(begin . bodies)
(try-exprs-offset 1 #'bodies)] (try-exprs-offset 1 #'bodies)]
[(begin0 . bodies) [(begin0 . bodies)