phc-toolkit/test/test-define-temp-ids.rkt
2017-04-27 23:38:55 +02:00

27 lines
813 B
Racket

#lang racket
(require (submod "../main.rkt" untyped))
(with-syntax ([((foo ...) ...) #'((aa bb cc) (x1 x2))])
(define-temp-ids "___~a.truc" ((foo ...) ...) #:first-base fst)
(syntax->datum #'((___foo.truc ...) ...))
(syntax->datum #'(fst ___fst.truc))
(void))
(with-syntax ([(foo ...) #'(aa bb cc)])
(define-temp-ids "___~a.truc" (foo ...) #:first-base fst)
(syntax->datum #'(___foo.truc ...))
(syntax->datum #'(fst ___fst.truc))
(void))
(with-syntax ([foo #'aa])
(define-temp-ids "___~a.truc" foo)
(syntax->datum #'___foo.truc)
(syntax->datum #'(fst ___fst.truc))
(void))
(with-syntax ([((foo ...) ...) #'((aa bb cc) (x1 x2))])
(define-temp-ids "___~a.truc" ((foo ...) ...) #:first-base fst)
(syntax->datum #'(___foo.truc ... ...))
(syntax->datum #'(fst ___fst.truc))
(void))