Changeset 13582 in project for chicken


Ignore:
Timestamp:
03/08/09 02:07:09 (11 years ago)
Author:
felix winkelmann
Message:

fix for syntax-rules bug reported by Jim Ursetto

Location:
chicken/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • chicken/trunk/synrules.scm

    r12359 r13582  
    156156                   (,%or (,%null? ,%l)
    157157                         (,%and (,%pair? ,%l)
     158                                ,@conjuncts
    158159                                (,%loop (,%cdr ,%l)))))))))
    159160
  • chicken/trunk/tests/runtests.sh

    r13351 r13582  
    9898echo "======================================== srfi-18 tests ..."
    9999$interpret -s srfi-18-tests.scm
     100# $interpret -s feeley-dynwind.scm
    100101
    101102echo "======================================== path tests ..."
  • chicken/trunk/tests/syntax-tests.scm

    r13389 r13582  
    289289(assert (eq? 'xbazz (xbar 1)))
    290290(assert (eq? 'xbar (xbar)))
     291
     292
     293;;;; ellipsis pattern element wasn't matched - reported by Jim Ursetto (fixed rev. 13582)
     294
     295(define-syntax foo
     296  (syntax-rules ()
     297    ((_ (a b) ...)
     298     (list '(a b) ...))
     299    ((_ a ...)
     300     (list '(a) ...))))
     301
     302(assert (equal? (foo (1 2) (3 4) (5 6)) '((1 2) (3 4) (5 6))))
     303(assert (equal? (foo (1 2) (3) (5 6)) '(((1 2)) ((3)) ((5 6))))) ; failed
     304(assert (equal? (foo 1) '((1))))
Note: See TracChangeset for help on using the changeset viewer.