The pragma parsing syntax only allows whitespace *between* macro definitions. Thus, as you have noted, using HTML comments in-between the macros does NOT work:
<!-- comment before definition -->
\define foo() bar
However, when using a multi-line macro definition, you can use HTML comments *inside* the macro itself:
\define foo()
<-- comment inside definition -->
bar
\end
But... this won't work if the macro content is intended for use in other TW syntax (e.g., as a parameter value in a widget call).
One approach that DOES work, is to define dummy "comment()" macros, like this:
\define comment() notes about foo go here
\define foo() bar
\define comment() notes about mumble go here
\define mumble() gronk
and... for readability, you can use dashes as the comment macro names to match the length of the macro being defined after it, like this:
\define ---() notes about foo go here
\define foo() bar
\define ------() notes about mumble go here
\define mumble() gronk
I think the best long-term solution is to update the core pragma parsing to allow HTML-style comments in between macros... but until then, the above method does work today even though it's a bit ugly and awkward.
enjoy,
-e