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

proc-macro-utils

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

13 releases (breaking)

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

#152 in Procedural macros

Download history 42897/week @ 2024-02-02 44534/week @ 2024-02-09 42480/week @ 2024-02-16 53979/week @ 2024-02-23 56601/week @ 2024-03-01 46426/week @ 2024-03-08 47036/week @ 2024-03-15 52679/week @ 2024-03-22 61207/week @ 2024-03-29 61747/week @ 2024-04-05 68825/week @ 2024-04-12 66421/week @ 2024-04-19 63727/week @ 2024-04-26 67101/week @ 2024-05-03 73153/week @ 2024-05-10 56090/week @ 2024-05-17

273,692 downloads per month
Used in 232 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