mirror of
https://github.com/justinethier/cyclone.git
synced 2025-05-19 05:39:17 +02:00
Broke out into two macro sections
This commit is contained in:
parent
fc92f9c302
commit
83a64b4c1c
1 changed files with 8 additions and 4 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue