fix syntax pattern-matching bug (PR 9643)

svn: r10989
This commit is contained in:
Matthew Flatt 2008-07-30 19:45:59 +00:00
parent 1338d3d5fe
commit 16b04d0328

View File

@ -227,15 +227,13 @@
[elem-did-var? (cdr clause)]) [elem-did-var? (cdr clause)])
(let ([m (loop match-elem (stx-vector-ref e pos) cap)]) (let ([m (loop match-elem (stx-vector-ref e pos) cap)])
(and m (and m
(if (null? (cdr p)) (let ([body (vloop (cdr p) (add1 pos))])
m (and body
(let ([body (vloop (cdr p) (add1 pos))]) (if elem-did-var?
(and body (if (null? body)
(if elem-did-var? m
(if (null? body) (append m body))
m body)))))))])))]
(append m body))
body))))))))])))]
[(eq? i 'prefab) [(eq? i 'prefab)
(and (stx-prefab? (vector-ref i 1) e) (and (stx-prefab? (vector-ref i 1) e)
(loop (vector-ref i 2) (cdr (vector->list (struct->vector (syntax-e e)))) cap))] (loop (vector-ref i 2) (cdr (vector->list (struct->vector (syntax-e e)))) cap))]