Improve gen-duck formatting.
This commit is contained in:
parent
28ad38926a
commit
507e8e9043
3 changed files with 10 additions and 1 deletions
|
@ -1,7 +1,11 @@
|
||||||
# Utility modules
|
# Utility modules
|
||||||
|
|
||||||
|
These are various utility modules for other HackerBase libraries.
|
||||||
|
|
||||||
## util-time [module]
|
## util-time [module]
|
||||||
|
|
||||||
|
(import util-time)
|
||||||
|
|
||||||
Compatibility time module for <5.2 and >=5.3 versions of CHICKEN.
|
Compatibility time module for <5.2 and >=5.3 versions of CHICKEN.
|
||||||
|
|
||||||
### current-util-milliseconds [procedure]
|
### current-util-milliseconds [procedure]
|
||||||
|
|
|
@ -46,6 +46,8 @@
|
||||||
(define (print-duck-module sec)
|
(define (print-duck-module sec)
|
||||||
(print "## " (cadr sec) " [module]")
|
(print "## " (cadr sec) " [module]")
|
||||||
(newline)
|
(newline)
|
||||||
|
(print " (import " (cadr sec) ")")
|
||||||
|
(newline)
|
||||||
(print-duck-text (caddr sec)))
|
(print-duck-text (caddr sec)))
|
||||||
|
|
||||||
(define (print-duck-variable sec)
|
(define (print-duck-variable sec)
|
||||||
|
|
|
@ -3,12 +3,14 @@
|
||||||
|
|
||||||
(define-syntax gen-duck
|
(define-syntax gen-duck
|
||||||
(syntax-rules ()
|
(syntax-rules ()
|
||||||
((_ fname title mod ...)
|
((_ fname title abstract mod ...)
|
||||||
(begin
|
(begin
|
||||||
(import mod ...)
|
(import mod ...)
|
||||||
(with-output-to-file fname
|
(with-output-to-file fname
|
||||||
(lambda ()
|
(lambda ()
|
||||||
(print "# " title)
|
(print "# " title)
|
||||||
|
(newline)
|
||||||
|
(print abstract)
|
||||||
(let ()
|
(let ()
|
||||||
(newline)
|
(newline)
|
||||||
(print-module-duck mod))
|
(print-module-duck mod))
|
||||||
|
@ -17,4 +19,5 @@
|
||||||
|
|
||||||
(gen-duck "doc/d-utils.md"
|
(gen-duck "doc/d-utils.md"
|
||||||
"Utility modules"
|
"Utility modules"
|
||||||
|
"These are various utility modules for other HackerBase libraries."
|
||||||
util-time)
|
util-time)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue