29
Introducing crabtime, a novel way to write Rust macros
(ferrisoft.com)
Welcome to the Rust community! This is a place to discuss about the Rust programming language.
Credits
Not nearly as readable though
It was just a quick solution showing how to do it with one macro and zero dependencies, utilizing the power of meta variables. It probably can be made nicer.
Side Note: It's not directly relevant/needed here, but this also shows that maybe a theoretical
$reverse{}meta variable can be useful with repeated patterns, to in this case generate the variants in the expected order.