Finish ducking util-tag.

This commit is contained in:
Dominik Pantůček 2023-07-06 19:44:06 +02:00
parent e6d798bc2a
commit 3833196533
5 changed files with 14 additions and 17 deletions

View file

@ -365,7 +365,9 @@ A unifying module for compound data structures tagging.
### make-tag [syntax]
* ```name``` - unquoted symbol to base the tag on
(_ tag)
* ```tag``` - unquoted symbol to base the tag on
Creates a unique and collision free symbol to identify compound data
structures based on lists and pairs.

View file

@ -292,17 +292,3 @@ quoted-printable sequences.
Returns the ```str``` with all characters converted to upper case
using ```char-upcase```. Does not work with UTF-8.
### Tag
(import util-tag)
A unifying module for compound data structures tagging.
(make-tag name)
* ```name``` - unquoted symbol to base the tag on
Creates a unique and collision free symbol to identify compound data
structures based on lists and pairs.

View file

@ -173,6 +173,11 @@
(newline)
(print "### " (cadr sec) " [syntax]")
(newline)
(let loop ((patterns (cadddr sec)))
(when (not (null? patterns))
(print " " (car patterns))
(loop (cdr patterns))))
(newline)
(print-duck-text (caddr sec)))
(define (print-duck-unknown sec)

View file

@ -74,7 +74,11 @@
expr)))
(define-syntax duck-extract-doc
(syntax-rules (define/doc make-parameter define*/doc define-syntax/doc)
(syntax-rules (define/doc make-parameter define*/doc define-syntax/doc syntax-rules)
((_ (define-syntax/doc id doc
(syntax-rules (literal ...)
(pattern template) ...)))
(list 'STX 'id `doc '(pattern ...)))
((_ (define-syntax/doc id doc transformer))
(list 'STX 'id `doc))
((_ (define/doc (proc . args) doc expr ...))

View file

@ -41,7 +41,7 @@
;; Syntactic wrapper to allow easy tag creation
(define-syntax/doc make-tag
("* ```name``` - unquoted symbol to base the tag on
("* ```tag``` - unquoted symbol to base the tag on
Creates a unique and collision free symbol to identify compound data
structures based on lists and pairs.")