You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
322 B
Racket
15 lines
322 B
Racket
6 years ago
|
#lang br
|
||
|
|
||
|
(define (convert-expr x)
|
||
|
(let loop ([x x])
|
||
|
(cond
|
||
|
[(list? x) (map loop x)]
|
||
|
[(number? x) 42]
|
||
|
[(string? x) "whee"]
|
||
|
[else 'kaboom])))
|
||
|
|
||
|
(define-macro (dsl-module-begin EXPR ...)
|
||
|
#'(#%module-begin
|
||
|
(convert-expr 'EXPR) ...))
|
||
|
(provide (rename-out [dsl-module-begin #%module-begin]))
|