Finish ducking util-tag.
This commit is contained in:
parent
e6d798bc2a
commit
3833196533
5 changed files with 14 additions and 17 deletions
|
@ -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.
|
||||
|
|
14
doc/utils.md
14
doc/utils.md
|
@ -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.
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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 ...))
|
||||
|
|
|
@ -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.")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue