subtemplate/test/bug-5.rkt
2017-05-06 03:43:41 +02:00

23 lines
830 B
Racket

#lang racket/base
(require subtemplate/override
rackunit)
(check-equal?(syntax->datum
(let ()
(define/syntax-parse ({~optional
{~or k:keyword b:boolean i:nat}}
{~and {~or (v ) s:str}} )
#'(#:a-keyword (1 2 3 4) "foo" (5 6)))
#'(l (?@@ (?? (v )) ))))
'(l 1 2 3 4 5 6))
(check-equal? (syntax->datum
(let ()
(define/syntax-parse ({~optional
{~or k:keyword b:boolean i:nat}}
{~and {~or (v ) s:str}} )
#'(#:a-keyword (1 2 3 4) "foo" (5 6)))
#'(l (?@@ (?? (v )) ))))
'(l 1 2 3 4 5 6))