diff options
author | Andy Wingo <wingo@pobox.com> | 2019-09-19 15:24:14 +0200 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2019-09-19 15:42:57 +0200 |
commit | 462782af86a723cad40c505fe81a26046959f3a8 (patch) | |
tree | 09123b7305ea72b0fd6a43e59aef92c61ea06df6 | |
parent | 374c1e5807a35b16170ed7686abcd5c407554d78 (diff) | |
download | guile-462782af86a723cad40c505fe81a26046959f3a8.tar.gz |
Add documentation for else, =>, _, ... aux syntax
* doc/ref/api-macros.texi (Syntax Rules): Document aux syntax.
-rw-r--r-- | doc/ref/api-macros.texi | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/doc/ref/api-macros.texi b/doc/ref/api-macros.texi index 2e0036932..83345a2f5 100644 --- a/doc/ref/api-macros.texi +++ b/doc/ref/api-macros.texi @@ -248,6 +248,26 @@ lawyers probably see the need here for use of @code{literal-identifier=?} rather than @code{free-identifier=?}, and would probably be correct. Patches accepted.}. +@cindex auxiliary syntax +@cindex syntax, auxiliary +Although literals can be unbound, usually they are bound to allow them +to be imported, exported, and renamed. @xref{Modules}, for more +information on imports and exports. In Guile there are a few standard +auxiliary syntax definitions, as specified by R6RS and R7RS: + +@deffn {Scheme Syntax} else +@deffnx {Scheme Syntax} => +@deffnx {Scheme Syntax} _ +@deffnx {Scheme Syntax} ... +Auxiliary syntax definitions. + +These are defined as if with a macro that never matches, e.g.: + +@example +(define-syntax else (syntax-rules ())) +@end example +@end deffn + If a pattern is not a list, vector, or an identifier, it matches as a literal, with @code{equal?}. |