From f5cdef07f210c8e93791d0474ce3ccae1d30c443 Mon Sep 17 00:00:00 2001 From: Eli Barzilay Date: Mon, 16 Feb 2009 00:51:03 +0000 Subject: [PATCH] minor reformatting svn: r13635 original commit: 2f09a6d3bb505b8752e0cf67abcf36cd58784614 --- collects/games/chat-noir/literate-lang.ss | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/collects/games/chat-noir/literate-lang.ss b/collects/games/chat-noir/literate-lang.ss index 93358715..3f6bbbec 100644 --- a/collects/games/chat-noir/literate-lang.ss +++ b/collects/games/chat-noir/literate-lang.ss @@ -35,20 +35,17 @@ code-blocks id `(,@(mapping-get code-blocks id) ,@(map syntax-local-introduce exprs))))) -(define :make-splice make-splice) - (define-syntax (chunk stx) (syntax-case stx () [(_ name expr ...) - (begin - (unless (identifier? #'name) - (raise-syntax-error #f "expected a chunk name" stx #'name)) - (unless (regexp-match #rx"^<.*>$" (symbol->string (syntax-e #'name))) - (raise-syntax-error #f "chunk names must begin and end with angle brackets, <...>" - stx - #'name)) - (add-to-block! #'name (syntax->list #'(expr ...))) - #`(void))])) + (cond [(not (identifier? #'name)) + (raise-syntax-error #f "expected a chunk name" stx #'name)] + [(not (regexp-match? #rx"^<.*>$" (symbol->string (syntax-e #'name)))) + (raise-syntax-error + #f "chunk names must begin and end with angle brackets, <...>" + stx #'name)] + [else (add-to-block! #'name (syntax->list #'(expr ...))) + #`(void)])])) (define-syntax (tangle stx) (define block-mentions '())