Factor out parts of syntax templates

Thank you very much @countvajhula for your detailed explanations. I took my time to read them attentively multiple times and I found them really illuminating. In particular, the ideas of value bindings in different phases, and define-syntax as a bridge between two consecutive phases are very helpful to understand subtle things.

Thank you as well for your suggestion about not defining the helper macro for syntax, but rather in the same phase as the macro which uses it, as well as for the pointer to define-syntax-parser, which is a very natural thing to have, but which I have never seen before. I'll update my code with this new approach.

1 Like