How to Use Rust Procedural Macros to Replace Panic with syn's Fold
Briefly

Procedural macros are a powerful tool for manipulating Rust code. Programmers that want to write these macros will undoubtedly turn to libraries like syn and quote for parsing and outputting token streams.
The wiser course of action is to turn to the library's Fold trait. Hidden behind a feature flag, it is an excellent choice for recursively changing code, offering multiple methods that allow you to 'hook in' to specific parts of your input.
Read at InfoQ
[
|
]