#proc-macro #macro #low-level #tokens #token-stream #type

proc-macro-utils

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

13 releases (breaking)

0.10.0 May 21, 2024
0.9.1 Mar 13, 2024
0.8.0 May 14, 2023
0.5.1 Mar 2, 2023

#117 in Procedural macros

Download history 60248/week @ 2024-04-04 68589/week @ 2024-04-11 67441/week @ 2024-04-18 63720/week @ 2024-04-25 69484/week @ 2024-05-02 68978/week @ 2024-05-09 71404/week @ 2024-05-16 78945/week @ 2024-05-23 91004/week @ 2024-05-30 86702/week @ 2024-06-06 82076/week @ 2024-06-13 74461/week @ 2024-06-20 101242/week @ 2024-06-27 82848/week @ 2024-07-04 91534/week @ 2024-07-11 72058/week @ 2024-07-18

359,065 downloads per month
Used in 282 crates (5 directly)

MIT/Apache

79KB
1.5K 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

~105KB