Closed vtastek closed 2 years ago
Thanks for your error report! Have you any justification that an "@" is allowed inside a preprocessor constant? I found only that the glsl spec says look at the c++ preprocessor specs and there they only talk of an identifier, which is defined here https://docs.microsoft.com/en-us/cpp/cpp/identifiers-cpp?view=msvc-170
I am not a C++ dev, so I can't really comment. But the parse code that added "@" was committed 5 years ago as a "shader manager", mentioning "shader templates".
I published a new version that should allow you to use "@" in identifiers. Hope this helps!
Thanks for the update, it works as expected now.
Just for context in case this makes someone break things, the @
is an OpenMW-specific extension to GLSL as we run it through our own preprocessor before the GLSL preprocessor, and we wanted a way to make it clear when that was happening, so picked an otherwise-illegal character. Obviously, it's a bit better if having a rogue character only breaks the immediate area around it rather than the whole file, but it's probably sensible to still leave a red squiggle under the symbol containing the @
.
Installed product versions
Description
Using @ in preprocessor constants breaks syntax highlighting for the rest of the file.
Steps to recreate
Current behavior
Expected behavior
(highlighted)