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

proc-macro-utils

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

12 releases (breaking)

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

#111 in Procedural macros

Download history 43653/week @ 2024-01-23 39842/week @ 2024-01-30 46154/week @ 2024-02-06 39506/week @ 2024-02-13 51677/week @ 2024-02-20 52560/week @ 2024-02-27 51920/week @ 2024-03-05 45958/week @ 2024-03-12 48877/week @ 2024-03-19 50904/week @ 2024-03-26 66284/week @ 2024-04-02 63181/week @ 2024-04-09 68809/week @ 2024-04-16 68100/week @ 2024-04-23 65779/week @ 2024-04-30 50508/week @ 2024-05-07

263,717 downloads per month
Used in 229 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