delete scribble.rkt

pull/2/head
Matthew Butterick 10 years ago
parent 56c942bc0f
commit 9572ce74df

@ -11,7 +11,6 @@
"string.rkt"
"len.rkt"
"exception.rkt"
"scribble.rkt"
"tree.rkt"
"values.rkt")
@ -27,6 +26,5 @@
"string.rkt"
"len.rkt"
"exception.rkt"
"scribble.rkt"
"tree.rkt"
"values.rkt"))

@ -1,18 +0,0 @@
#lang racket
(require (for-syntax racket/base))
(require "coerce/value.rkt")
(provide when/block)
;; improves the syntax for conditional blocks in templates
;; ordinarily it would be @when[condition]{@list{stuff ...}}
;; now it can be @when/block[condition]{stuff ...}
;; has to be a macro otherwise body expressions will be evaluated regardless of condition
;; this is bad: if condition is false, expression should exit
(define-syntax (when/block stx)
(syntax-case stx ()
[(_ condition body ...)
#'(if condition (string-append*
(with-handlers ([exn:fail? (λ(exn) (error (format "when/block: ~a" (exn-message exn))))])
(map ->string (list body ...))))
"")]))
Loading…
Cancel
Save