153 releases

new 0.0.202 Feb 19, 2024
0.0.199 Jan 29, 2024
0.0.190 Dec 18, 2023
0.0.187 Nov 27, 2023
0.0.26 Nov 30, 2020

#738 in Rust patterns

Download history 3247/week @ 2023-10-30 2501/week @ 2023-11-06 2691/week @ 2023-11-13 2512/week @ 2023-11-20 3031/week @ 2023-11-27 2721/week @ 2023-12-04 2580/week @ 2023-12-11 2183/week @ 2023-12-18 1477/week @ 2023-12-25 1869/week @ 2024-01-01 2682/week @ 2024-01-08 2613/week @ 2024-01-15 2206/week @ 2024-01-22 2216/week @ 2024-01-29 2178/week @ 2024-02-05 2013/week @ 2024-02-12

8,928 downloads per month
Used in 25 crates (3 directly)

MIT/Apache

150KB
3.5K SLoC

mbe (short for Macro By Example) crate contains code for handling macro_rules macros. It uses TokenTree (from tt package) as the interface, although it contains some code to bridge SyntaxNodes and TokenTrees as well!

The tests for this functionality live in another crate: hir_def::macro_expansion_tests::mbe.

Dependencies

~6–16MB
~170K SLoC