v6.3-exception
Matthew Butterick 7 years ago
parent 9d4292ac85
commit b4588a7767

@ -67,13 +67,12 @@
(define-macro block #'begin)
(provide (rename-out [my-if if]))
(define-macro-cases my-if
[(_ COND TBLOCK) #'(when COND TRUE-BLOCK)]
[(_ COND TBLOCK FBLOCK) #'(if COND (let () TBLOCK) (let () FBLOCK))])
(define-macro (my-if COND TBLOCK FBLOCK)
#'(if COND (let () TBLOCK) (let () FBLOCK)))
(define (read-syntax src ip)
(define parse-tree (parse (λ () (lex ip))))
(strip-context
(with-syntax ([PT parse-tree])
#'(module _ pythonesque-demo
#'(module pyname pythonesque-demo
PT))))
Loading…
Cancel
Save