minor reformatting
svn: r13635
This commit is contained in:
parent
8298feacb2
commit
2f09a6d3bb
|
@ -1,4 +1,4 @@
|
|||
These are the files for the literate version of Chat Noir. The files
|
||||
These are the files for the literate version of Chat Noir. The files
|
||||
not mentioned are actually in use for Chat Noir that you get via PLT
|
||||
Games.
|
||||
|
||||
|
@ -10,7 +10,7 @@ Games.
|
|||
the rendered output.
|
||||
|
||||
- literate-lang.ss: the language for running literate programs
|
||||
(contains the tangler)
|
||||
(contains the tangler).
|
||||
|
||||
- literate-reader.ss: the reader used for chat-noir-literate.ss to
|
||||
put it into the 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 '())
|
||||
|
|
Loading…
Reference in New Issue
Block a user