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