1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-30 06:50:31 +02:00

psyntax: Fix bug in match-each+.

Reported by Panicz Maciej Godek <godek.maciek@gmail.com> in
<http://lists.gnu.org/archive/html/guile-user/2015-09/msg00017.html>.

* module/ice-9/psyntax.scm (match-each+): Fix the case where a non-pair
  syntax object is encountered in a dotted tail.
* module/ice-9/psyntax-pp.scm: Regenerate.
This commit is contained in:
Mark H Weaver 2015-09-03 02:51:00 -04:00 committed by Andy Wingo
parent a04c849b09
commit bb7075dc1a
2 changed files with 4 additions and 2 deletions

View file

@ -2509,7 +2509,8 @@
(values '() (cdr y-pat) (match (car e) (car y-pat) w r mod))) (values '() (cdr y-pat) (match (car e) (car y-pat) w r mod)))
(values #f #f #f))))) (values #f #f #f)))))
((syntax-object? e) ((syntax-object? e)
(f (syntax-object-expression e) (join-wraps w e))) (f (syntax-object-expression e)
(join-wraps w (syntax-object-wrap e))))
(else (values '() y-pat (match e z-pat w r mod))))))) (else (values '() y-pat (match e z-pat w r mod)))))))
(match-each-any (match-each-any
(lambda (e w mod) (lambda (e w mod)

View file

@ -2849,7 +2849,8 @@
(match (car e) (car y-pat) w r mod))) (match (car e) (car y-pat) w r mod)))
(values #f #f #f))))) (values #f #f #f)))))
((syntax-object? e) ((syntax-object? e)
(f (syntax-object-expression e) (join-wraps w e))) (f (syntax-object-expression e)
(join-wraps w (syntax-object-wrap e))))
(else (else
(values '() y-pat (match e z-pat w r mod))))))) (values '() y-pat (match e z-pat w r mod)))))))