From fc92f9c3024db96d68005196235f3b8413143a51 Mon Sep 17 00:00:00 2001 From: Justin Ethier Date: Mon, 23 Aug 2021 13:36:13 -0400 Subject: [PATCH] Grammar --- docs/User-Manual.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/User-Manual.md b/docs/User-Manual.md index f3681ee3..1ea280a5 100644 --- a/docs/User-Manual.md +++ b/docs/User-Manual.md @@ -168,7 +168,7 @@ A [R7RS Compliance Chart](Scheme-Language-Compliance.md) lists differ Cyclone provides two macro systems. -High-level hygienic macros may be created using `syntax-rules`. This system is based on a template language specified by R7RS. The specification goes into more detail on how to work with these macros. +High-level hygienic macros may be created using `syntax-rules`. This system is based on a template language specified by R7RS. The specification goes into more detail on how to work with these macros: (define-syntax when (syntax-rules () @@ -176,7 +176,7 @@ 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. +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 @@ -194,7 +194,7 @@ Alternatively a low-level explicit renaming (ER) macros system is also provided cyclone> (expand '(when #t (+ 1 2 3)) *global-environment* '()) (if #t ((lambda () (+ 1 2 3))) ) -- Alternatively when developing an ER macro, since its just a Scheme function, the macro can be defined as a `lambda` and passed a quoted expression to debug. +- Alternatively when developing an ER macro, since its just a Scheme function, the macro can be defined as a `lambda` and passed a quoted expression to debug: (pretty-print ((lambda (exp rename compare)