Improve gen-duck formatting.

This commit is contained in:
Dominik Pantůček 2023-07-04 20:51:32 +02:00
parent 28ad38926a
commit 507e8e9043
3 changed files with 10 additions and 1 deletions

View file

@ -1,7 +1,11 @@
# Utility modules
These are various utility modules for other HackerBase libraries.
## util-time [module]
(import util-time)
Compatibility time module for <5.2 and >=5.3 versions of CHICKEN.
### current-util-milliseconds [procedure]

View file

@ -46,6 +46,8 @@
(define (print-duck-module sec)
(print "## " (cadr sec) " [module]")
(newline)
(print " (import " (cadr sec) ")")
(newline)
(print-duck-text (caddr sec)))
(define (print-duck-variable sec)

View file

@ -3,12 +3,14 @@
(define-syntax gen-duck
(syntax-rules ()
((_ fname title mod ...)
((_ fname title abstract mod ...)
(begin
(import mod ...)
(with-output-to-file fname
(lambda ()
(print "# " title)
(newline)
(print abstract)
(let ()
(newline)
(print-module-duck mod))
@ -17,4 +19,5 @@
(gen-duck "doc/d-utils.md"
"Utility modules"
"These are various utility modules for other HackerBase libraries."
util-time)