Broke out into two macro sections

This commit is contained in:
Justin Ethier 2021-08-23 13:38:59 -04:00
parent fc92f9c302
commit 83a64b4c1c

View file

@ -13,6 +13,8 @@
- [Interpreter](#interpreter)
- [Language Details](#language-details)
- [Macro Systems](#macro-systems)
- [Syntax Rules](#syntax-rules)
- [Explicit Renaming](#explicit-renaming)
- [Debugging](#debugging)
- [Multithreaded Programming](#multithreaded-programming)
- [Thread Safety](#thread-safety)
@ -164,9 +166,7 @@ A [R<sup>7</sup>RS Compliance Chart](Scheme-Language-Compliance.md) lists differ
# Macro Systems
## Overview
Cyclone provides two macro systems.
## Syntax Rules
High-level hygienic macros may be created using `syntax-rules`. This system is based on a template language specified by R<sup>7</sup>RS. The specification goes into more detail on how to work with these macros:
@ -176,7 +176,11 @@ High-level hygienic macros may be created using `syntax-rules`. This system is b
(if test
(begin result1 result2 ...)))))
Alternatively a low-level explicit renaming (ER) macros system is also provided that allows defining macros using Scheme code, in a similar manner as `defmacro`. This macro system provides the convenience functions `(rename identifier)` to hygienically rename an identifier and `(compare identifier1 identifier2)` to compare two identifiers:
## Explicit Renaming
Alternatively a low-level explicit renaming (ER) macros system is also provided that allows defining macros using Scheme code, in a similar manner as `defmacro`.
This macro system provides the convenience functions `(rename identifier)` to hygienically rename an identifier and `(compare identifier1 identifier2)` to compare two identifiers:
(define-syntax when
(er-macro-transformer