Fix PR 10140

svn: r17473
This commit is contained in:
Sam Tobin-Hochstadt 2010-01-04 01:12:58 +00:00
parent b50ae83a27
commit b802c7dfd0
2 changed files with 10 additions and 6 deletions

View File

@ -42,11 +42,10 @@
(append-pats pat rpat)
(raise-syntax-error 'match "non-list pattern inside unquote-splicing"
stx #'p)))]
[(p dd)
[(p dd . rest)
(ddk? #'dd)
(let* ([count (ddk? #'..)]
[min (if (number? count) count #f)]
[max (if (number? count) count #f)])
(let* ([count (ddk? #'dd)]
[min (and (number? count) count)])
(make-GSeq
(parameterize ([match-...-nesting (add1 (match-...-nesting))])
(list (list (pq #'p))))
@ -55,7 +54,7 @@
(list #f)
;; patterns in p get bound to lists
(list #f)
(make-Null (make-Dummy #f))
(pq #'rest)
#f))]
[(a . b) (make-Pair (pq #'a) (pq #'b))]
;; the hard cases

View File

@ -603,4 +603,9 @@
(match 3
[(or) 1]
[_ 4]))
(comp '((1 2) 3)
(match `(begin 1 2 3)
[`(begin ,es ... ,en)
(list es en)]))
))