macro-debugger: PR 10527: fixed "out of lifts" too-strict sanity check

svn: r16391

original commit: 1ba5bd64872b8fce3db91a11418d0d2a1c04545a
This commit is contained in:
Ryan Culpepper 2009-10-20 21:32:33 +00:00
parent 64b1c3f7bc
commit 9bc38dd1c1

View File

@ -300,8 +300,6 @@
(visible-lift-stxs null)) (visible-lift-stxs null))
[#:pass1] [#:pass1]
[Expr ?form first] [Expr ?form first]
[#:do (when (pair? (available-lift-stxs))
(lift-error 'lift/let-deriv "available lifts left over"))]
[#:let visible-lifts (visible-lift-stxs)] [#:let visible-lifts (visible-lift-stxs)]
[#:with-visible-form [#:with-visible-form
[#:left-foot] [#:left-foot]
@ -381,9 +379,6 @@
[#:rename/unmark ?form e1 me1] [#:rename/unmark ?form e1 me1]
[#:pass1] [#:pass1]
[Expr ?form inner] [Expr ?form inner]
[#:do (when (pair? (available-lift-stxs))
(lift-error 'local-expand/capture-lifts
"available lifts left over"))]
[#:let visible-lifts (visible-lift-stxs)] [#:let visible-lifts (visible-lift-stxs)]
[#:with-visible-form [#:with-visible-form
[#:left-foot] [#:left-foot]
@ -608,8 +603,14 @@
(define (take-lift!) (define (take-lift!)
(define avail (available-lift-stxs)) (define avail (available-lift-stxs))
(cond [(list? avail) (cond [(list? avail)
#|
;; This check is wrong! (and thus disabled)
;; If a syntax error occurs between the time a lift is "thrown"
;; and when it is "caught", no lifts will be available to take.
;; But that's not a bug, so don't complain.
(unless (pair? avail) (unless (pair? avail)
(lift-error 'local-lift "out of lifts (begin)!")) (lift-error 'local-lift "out of lifts (begin)!"))
|#
(when (pair? avail) (when (pair? avail)
(let ([lift-stx (car avail)]) (let ([lift-stx (car avail)])
(available-lift-stxs (cdr avail)) (available-lift-stxs (cdr avail))