DanielKeep / tlborm

The Little Book of Rust Macros
880 stars 96 forks source link

Macros that help us build macros section #46

Open randall-coding opened 3 years ago

randall-coding commented 3 years ago

I think it would be nice to have a macro helpers section. What do I mean by this? I mean those convenient methods that Rust gives us that are commonly used in macros such as stringify! and unstringify!. I was just searching high and low for a method to do the opposite of stringify! to finally figure out it was unstringify! (duh right?). But it could have easily been tokenize! or some other word, or nothing at all.

Where am I going with this rant? It would be convenient to collect all those macros which are helpful in macro building into their own section of this little book. Assuming there are enough of these things to put into their own section, that could be helpful and save us devs a lot of time!