proposal: heredoc comments to allow `+/` in comments, eg from urls or documented unittests

Timothee Cour thelastmammoth at gmail.com
Fri Feb 9 03:10:08 UTC 2018


NOTE:
the analog of documenting comments (/++ ...+/ and /** */) could be:

/""EOC
multiline comment
EOC"/

(ie allow both `/""` and `/"` before reading in the heredoc token)


On Thu, Feb 8, 2018 at 7:06 PM, Timothee Cour <thelastmammoth at gmail.com> wrote:
> same exact idea as motivation for delimited strings
> (https://dlang.org/spec/lex.html#delimited_strings)
>
> ```
>
> auto heredoc = q"EOS
> This is a multi-line
> heredoc string
> EOS"
> ;
>
> /"EOC
> This is a multi-line
> heredoc comment allowing
> /+ documented unittests containing nesting comments +/
> and weird urls like https://gcc.gnu.org/onlinedocs/libstdc++/faq.html
> EOS"/
>
> ```


More information about the Digitalmars-d mailing list