blob: 75bc450554b8fb1f1d695975c9f7d947ec42ce89 [file] [log] [blame] [view]
David Tolnay48d27c32018-01-02 22:33:11 -08001### [`dump-syntax`](dump-syntax)
2
3Little utility to parse a Rust source file into a `syn::File` and print out a
4debug representation of the syntax tree.
5
6### [`heapsize`](heapsize)
7
8A complete working Macros 1.1 implementation of a custom derive. Works on any
9Rust compiler >=1.15.0.
10
11### [`heapsize2`](heapsize2)
12
13The equivalent of the previous example but using fancy new APIs from the nightly
14compiler. It illustrates some neat features of the hygiene system of Macros 2.0
15and shows how to leverage those to provide amazing error messages to users.
16Currently requires a nightly Rust compiler >=1.24.0-nightly but we are working
17to stabilize all of the APIs involved.
David Tolnay3c383c12018-01-04 11:47:24 -080018
19### [`lazy-static`](lazy-static)
20
21An example of parsing a custom syntax within a `functionlike!(...)` procedural
22macro. Demonstrates how to trigger custom warnings and error messages on
23individual tokens of the input.
David Tolnay56be6652018-01-06 15:55:29 -080024
25### [`trace-var`](trace-var)
26
27An attribute procedural macro that uses a syntax tree traversal to transform
28certain syntax tree nodes in a function body.