3 ms·
lua also allows you to define blocks like [=[ ... ]=] but with arbitrary, matching counts of '=' inside. Using this style with your comment syntax handles havi
by lucozade 9y ago
lua also allows you to define blocks like [=[ ... ]=] but with arbitrary, matching counts of '=' inside.
Using this style with your comment syntax handles having nested and/or dangling comment delimiters in the body.
It's probably the most comprehensive approach I've used. In practice, I've never actually needed more than one level of nesting or dangling but it's not particularly onerous to the parser to include the arbitrary levels.