Example macros written using syntax/parse
.
> raco pkg install syntax-parse-example
Or
> git clone https://github.com/bennn/syntax-parse-example
> raco pkg install ./syntax-parse-example
The documentation is online:
And, if you installed the package, on your computer:
> raco docs syntax-parse-example
Or, just browse this repo.
Except for the lang/
folder, every folder here contains:
- one file implementing a macro,
- one file with unit tests, and
- one file documenting the macro
To contribute a macro named M
:
- Clone this package (
raco pkg install --clone syntax-parse-example
) - Navigate to the
syntax-parse-example/
folder on your machine - Run
raco syntax-parse-example --new M
- Edit the newly-generated files:
M/M.rkt
M/M-test.rkt
M/M.scrbl
- Submit a pull request!