metadata for syntax-rules, identifier-syntax, and define-macro macros

* module/ice-9/psyntax.scm (syntax-rules, identifier-syntax):
* module/ice-9/boot-9.scm (define-macro): Embed metadata into the macro
  transformer for use by documentation tools and the like.

* module/ice-9/psyntax-pp.scm: Regenerated.
This commit is contained in:
Andy Wingo 2010-03-29 18:01:34 +02:00
commit a5e95abe9b
3 changed files with 7968 additions and 7782 deletions

View file

@ -2649,6 +2649,9 @@
(syntax-case x ()
((_ (k ...) ((keyword . pattern) template) ...)
#'(lambda (x)
;; embed patterns as procedure metadata
#((macro-type . syntax-rules)
(patterns pattern ...))
(syntax-case x (k ...)
((dummy . pattern) #'template)
...))))))
@ -2824,6 +2827,7 @@
(syntax-case x ()
((_ e)
#'(lambda (x)
#((macro-type . identifier-syntax))
(syntax-case x ()
(id
(identifier? #'id)