Lifts mysterious restriction on patterns that now seems unnecessary.

This commit is contained in:
Casey Klein 2010-06-21 11:24:30 -05:00
parent daa8507e51
commit d6b20a51d2
2 changed files with 2 additions and 1 deletions

View File

@ -1449,7 +1449,7 @@ before the pattern compiler is invoked.
[`(variable-prefix ,vars) ribs]
[`variable-not-otherwise-mentioned ribs]
[`hole (error 'match-pattern "cannot have a hole inside an ellipses")]
[`hole ribs]
[(? symbol?)
(cond
[(regexp-match #rx"_!_" (symbol->string pattern))

View File

@ -185,6 +185,7 @@
(test-empty '((name x a) ...) '() (list (make-test-mtch (make-bindings (list (make-bind 'x '()))) '() none)))
(test-empty '((name x a) ...) '(a) (list (make-test-mtch (make-bindings (list (make-bind 'x '(a)))) '(a) none)))
(test-empty '((name x a) ...) '(a a) (list (make-test-mtch (make-bindings (list (make-bind 'x '(a a)))) '(a a) none)))
(test-empty '(hole ...) '() (list (make-test-mtch (make-bindings empty) '() none)))
(test-empty '(b ... a ...) '() (list (make-test-mtch (make-bindings empty) '() none)))
(test-empty '(b ... a ...) '(a) (list (make-test-mtch (make-bindings empty) '(a) none)))