I noticed that when I use a dotted template for syntax-case (and syntax-parse) that the dotted element has a syntax-position equivalent to the entire expression. Is this expected behavior?

(define (with-syntax-case stx)
  (syntax-case stx ()
               [(a b c . d)
                (begin
                (printf "a is at ~a\n" (syntax-position #'a))
                (printf "b is at ~a\n" (syntax-position #'b))
                (printf "c is at ~a\n" (syntax-position #'c))
                (printf "d is at ~a\n" (syntax-position #'d)))]))

(with-syntax-case #'(1 2 3 4))

==>
a is at 695
b is at 697
c is at 699
d is at 694

I would expect `d' to be at position 701 instead of 694.
_________________________________________________
 For list-related administrative tasks:
 http://list.cs.brown.edu/mailman/listinfo/plt-dev

Reply via email to