Lifts mysterious restriction on patterns that now seems unnecessary.
This commit is contained in:
parent
daa8507e51
commit
d6b20a51d2
|
@ -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))
|
||||
|
|
|
@ -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)))
|
||||
|
|
Loading…
Reference in New Issue
Block a user