D is trying to parse C and C++ inside strings
FeepingCreature
feepingcreature at gmail.com
Tue Mar 21 09:59:06 UTC 2023
On Saturday, 18 March 2023 at 03:00:46 UTC, Hipreme wrote:
> modules/renderer/source/hip/hiprenderer/backend/metal/mtlshader.d(104,9): Warning: C preprocessor directive `#include` is not supported
>
> This looks like related to use token string.
While the compiler shouldn't do that, token strings are intended
to be used for D code. AFAIR the idea is that the syntax
highlighter treats them as D, so you can do `mixin(format!q{int a
= %s;}(5));`, and have D syntax coloring for the code inside the
string. So putting another language in there is at least dubious.
More information about the Digitalmars-d
mailing list