chat-noir literate small repairs
svn: r13765 original commit: 24e4fd407ba20d2eb14cbf1a0ce996e484d4d1d8
This commit is contained in:
parent
43168b31dd
commit
d33566e09f
|
@ -32,12 +32,18 @@
|
||||||
(if (n . > . 1)
|
(if (n . > . 1)
|
||||||
#'(void)
|
#'(void)
|
||||||
(with-syntax ([tag str]
|
(with-syntax ([tag str]
|
||||||
[str str])
|
[str str]
|
||||||
|
[((for-label-mod ...) ...)
|
||||||
|
(map (lambda (expr)
|
||||||
|
(syntax-case expr (require)
|
||||||
|
[(require mod ...)
|
||||||
|
#'(mod ...)]
|
||||||
|
[else null]))
|
||||||
|
(syntax->list #'(expr ...)))])
|
||||||
#`(begin
|
#`(begin
|
||||||
;; ---- This is the new part --------
|
|
||||||
(define-syntax name (make-element-id-transformer
|
(define-syntax name (make-element-id-transformer
|
||||||
(lambda (stx) #'(chunkref name))))
|
(lambda (stx) #'(chunkref name))))
|
||||||
;; ----------------------------------
|
(require (for-label for-label-mod ... ...))
|
||||||
(make-splice
|
(make-splice
|
||||||
(list (make-toc-element
|
(list (make-toc-element
|
||||||
#f
|
#f
|
||||||
|
|
|
@ -68,7 +68,7 @@
|
||||||
chunk-mentions)])
|
chunk-mentions)])
|
||||||
#`(begin body ... (let ([b-id (void)]) b-use) ...)))
|
#`(begin body ... (let ([b-id (void)]) b-use) ...)))
|
||||||
|
|
||||||
(define-syntax (module-begin stx)
|
(define-syntax (literate-begin stx)
|
||||||
(syntax-case stx ()
|
(syntax-case stx ()
|
||||||
[(module-begin expr ...)
|
[(module-begin expr ...)
|
||||||
(with-syntax
|
(with-syntax
|
||||||
|
@ -98,6 +98,12 @@
|
||||||
#%provide)))
|
#%provide)))
|
||||||
(cons expanded (loop (cdr exprs)))]
|
(cons expanded (loop (cdr exprs)))]
|
||||||
[else (loop (cdr exprs))]))]))])
|
[else (loop (cdr exprs))]))]))])
|
||||||
#'(#%module-begin
|
#'(begin
|
||||||
body-code ...
|
body-code ...
|
||||||
(tangle)))]))
|
(tangle)))]))
|
||||||
|
|
||||||
|
(define-syntax (module-begin stx)
|
||||||
|
(syntax-case stx ()
|
||||||
|
[(_ id exprs . body)
|
||||||
|
#'(#%module-begin
|
||||||
|
(literate-begin id exprs . body))]))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user