On Thu, 28 Mar 2024 at 23:54, Alice Osako wrote:
I was going to write a long diatribe on the subject of
textual-replacement macros vs. lexical macros, but none of that is
really relevant.
There is no difference between text replacement and lexical replacement.
I don't especially like the idea of embedding preprocessor directives in comments,
but it is what is available so it will have to do.
The delimiters are defined as constants in the source. You can replace them with whatever delimiters you like as long as they are not already used otherwise in the Modula-2 grammar.
In my C and Objective-C hosted template engines I used French quotation marks « and » instead. And M2R10 defines <# and #> as placeholder delimiters. The reason why I decided to use (*? and *) in M2PP was simply so they would not be rendered as illegal characters when the template sources are rendered on sites like GitHub.
You could perhaps use //placeholder// or ~~placeholder~~ or some other digraph composed of legal symbols instead to prevent GitHub et al display the delimiters as illegal characters.
regards
benjamin