It's for term-rewriting templates: [https://nim-lang.github.io/Nim/manual_experimental.html#term-rewriting-macros](https://nim-lang.github.io/Nim/manual_experimental.html#term-rewriting-macros)
The section is pretty detailed. In the wild I use in Arraymancer to catch `multiply -> add` and rewrite them as an optimized fused operation for example: [https://github.com/mratsim/Arraymancer/blob/532f45a6/src/tensor/optim_ops_fusion.nim#L53-L74](https://github.com/mratsim/Arraymancer/blob/532f45a6/src/tensor/optim_ops_fusion.nim#L53-L74)