fix eval:alts to not add context
svn: r8383 original commit: b7a19fdc4a19e7f62a6f47f05e4ea32b6d97b98b
This commit is contained in:
parent
0d52905593
commit
c63cd9a943
|
@ -124,14 +124,21 @@
|
||||||
(cdr val-list+outputs)
|
(cdr val-list+outputs)
|
||||||
#f)))))))
|
#f)))))))
|
||||||
|
|
||||||
|
(define (extract s . ops)
|
||||||
|
(let loop ([s s][ops ops])
|
||||||
|
(cond
|
||||||
|
[(null? ops) s]
|
||||||
|
[(syntax? s) (loop (syntax-e s) ops)]
|
||||||
|
[else (loop ((car ops) s) (cdr ops))])))
|
||||||
|
|
||||||
(define ((do-eval ev) s)
|
(define ((do-eval ev) s)
|
||||||
(syntax-case s (code:comment eval:alts)
|
(syntax-case s (code:comment eval:alts)
|
||||||
[(code:line v (code:comment . rest))
|
[(code:line v (code:comment . rest))
|
||||||
((do-eval ev) #'v)]
|
((do-eval ev) (extract s cdr car))]
|
||||||
[(code:comment . rest)
|
[(code:comment . rest)
|
||||||
(list (list (void)) "" "")]
|
(list (list (void)) "" "")]
|
||||||
[(eval:alts p e)
|
[(eval:alts p e)
|
||||||
((do-eval ev) #'e)]
|
((do-eval ev) (extract s cdr cdr car))]
|
||||||
[else
|
[else
|
||||||
(with-handlers ([exn:fail? (lambda (e)
|
(with-handlers ([exn:fail? (lambda (e)
|
||||||
(list (exn-message e)
|
(list (exn-message e)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user