#macros

proc-macro-utils

low-level utilities on proc-macro and proc-macro2 types

10 releases (breaking)

new 0.8.0 May 14, 2023
0.6.0 Apr 29, 2023
0.5.1 Mar 2, 2023

#138 in Procedural macros

Download history 85/week @ 2023-02-09 21/week @ 2023-02-16 13/week @ 2023-02-23 255/week @ 2023-03-02 632/week @ 2023-03-09 1076/week @ 2023-03-16 908/week @ 2023-03-23 1678/week @ 2023-03-30 1513/week @ 2023-04-06 2201/week @ 2023-04-13 1209/week @ 2023-04-20 1480/week @ 2023-04-27 1678/week @ 2023-05-04 1724/week @ 2023-05-11

6,314 downloads per month
Used in 26 crates (4 directly)

MIT/Apache

73KB
1K SLoC

proc-macro-utils

CI Status Crates.io Docs.rs Documentation for main

Some utility functions on proc-macro types.


lib.rs:

Some useful functions on [proc_macro] and [proc_macro2] types

E.g. pushing tokens onto TokenStream and testing for specific punctuation on TokenTree and Punct

It also adds the [assert_tokens!] and [assert_expansion!] macros to improve unit testability for proc-macros.

Dependencies

~115KB