lukaslueg / macro_railroad

A library to generate syntax diagrams for Rust macros.
MIT License
529 stars 11 forks source link

Upgrade to Syn 0.15 #19

Closed dtolnay closed 5 years ago

dtolnay commented 5 years ago

Some ideas for how I would implement the Syn upgrade. I am going to be busy for the rest of the week so feel free to take any ideas from here and incorporate into #18 as makes sense.

18 mentioned a performance degradation -- I added a benchmark and found that this PR improves parsing performance by about 20% compared to Syn 0.14. You can confirm by running cargo bench against the first commit which just adds the benchmark, and against the second commit which contains the 0.15 code.