#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

#108 in Procedural macros

Download history 60400/week @ 2023-12-04 44483/week @ 2023-12-11 37722/week @ 2023-12-18 16403/week @ 2023-12-25 32855/week @ 2024-01-01 43649/week @ 2024-01-08 45912/week @ 2024-01-15 44199/week @ 2024-01-22 39059/week @ 2024-01-29 45081/week @ 2024-02-05 43294/week @ 2024-02-12 44240/week @ 2024-02-19 53497/week @ 2024-02-26 55988/week @ 2024-03-04 45234/week @ 2024-03-11 46817/week @ 2024-03-18

202,930 downloads per month
Used in 205 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

~110KB