From 9572ce74df737279147907a8afe52d3f9f31460e Mon Sep 17 00:00:00 2001 From: Matthew Butterick Date: Thu, 13 Mar 2014 11:59:45 -0700 Subject: [PATCH] delete scribble.rkt --- main.rkt | 2 -- scribble.rkt | 18 ------------------ 2 files changed, 20 deletions(-) delete mode 100644 scribble.rkt diff --git a/main.rkt b/main.rkt index e035fad..ff68855 100644 --- a/main.rkt +++ b/main.rkt @@ -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")) \ No newline at end of file diff --git a/scribble.rkt b/scribble.rkt deleted file mode 100644 index bd3b473..0000000 --- a/scribble.rkt +++ /dev/null @@ -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 ...)))) - "")])) \ No newline at end of file