1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-20 11:40:18 +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
parent 5d66fd3fcf
commit 3bda6eb9df
2 changed files with 4 additions and 2 deletions

View file

@ -2451,7 +2451,8 @@
(values '() (cdr y-pat) (match (car e) (car y-pat) w r mod)))
(values #f #f #f)))))
((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)))))))
(match-each-any
(lambda (e w mod)

View file

@ -2725,7 +2725,8 @@
(match (car e) (car y-pat) w r mod)))
(values #f #f #f)))))
((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)))))))