mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-10 05:50:26 +02:00
fix matches? test
* test-suite/tests/syntax.test (matches?): Unfortunately this relatively recent macro fails due to the underscore-in-literals-list prohibition. But, it seems I was in the minority wanting _ for a literal.
This commit is contained in:
parent
b78d91d517
commit
31fe120216
1 changed files with 2 additions and 2 deletions
|
@ -139,14 +139,14 @@
|
|||
(eval '(begin (if #t (begin)) #t) (interaction-environment))))
|
||||
|
||||
(define-syntax matches?
|
||||
(syntax-rules (_)
|
||||
(syntax-rules (<>)
|
||||
((_ (op arg ...) pat) (let ((x (op arg ...)))
|
||||
(matches? x pat)))
|
||||
((_ x ()) (null? x))
|
||||
((_ x (a . b)) (and (pair? x)
|
||||
(matches? (car x) a)
|
||||
(matches? (cdr x) b)))
|
||||
((_ x _) #t)
|
||||
((_ x <>) #t)
|
||||
((_ x pat) (equal? x 'pat))))
|
||||
|
||||
(with-test-prefix "lambda"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue