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))
m
(let ([body (vloop (cdr p) (add1 pos))]) (let ([body (vloop (cdr p) (add1 pos))])
(and body (and body
(if elem-did-var? (if elem-did-var?
(if (null? body) (if (null? body)
m m
(append m body)) (append m body))
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))]