minor reformatting

svn: r13635

original commit: 2f09a6d3bb505b8752e0cf67abcf36cd58784614
This commit is contained in:
Eli Barzilay 2009-02-16 00:51:03 +00:00
parent 92cd42afe6
commit f5cdef07f2

View File

@ -35,20 +35,17 @@
code-blocks id code-blocks id
`(,@(mapping-get code-blocks id) ,@(map syntax-local-introduce exprs))))) `(,@(mapping-get code-blocks id) ,@(map syntax-local-introduce exprs)))))
(define :make-splice make-splice)
(define-syntax (chunk stx) (define-syntax (chunk stx)
(syntax-case stx () (syntax-case stx ()
[(_ name expr ...) [(_ name expr ...)
(begin (cond [(not (identifier? #'name))
(unless (identifier? #'name) (raise-syntax-error #f "expected a chunk name" stx #'name)]
(raise-syntax-error #f "expected a chunk name" stx #'name)) [(not (regexp-match? #rx"^<.*>$" (symbol->string (syntax-e #'name))))
(unless (regexp-match #rx"^<.*>$" (symbol->string (syntax-e #'name))) (raise-syntax-error
(raise-syntax-error #f "chunk names must begin and end with angle brackets, <...>" #f "chunk names must begin and end with angle brackets, <...>"
stx stx #'name)]
#'name)) [else (add-to-block! #'name (syntax->list #'(expr ...)))
(add-to-block! #'name (syntax->list #'(expr ...))) #`(void)])]))
#`(void))]))
(define-syntax (tangle stx) (define-syntax (tangle stx)
(define block-mentions '()) (define block-mentions '())