Closed damerste closed 1 year ago
Hi @damerste . I can reproduce this issue, but it repros even without the C/C++ Extension installed.
The C/C++ Extension provides semantic colorization. VS Code itself provides syntax/lexical colorization, using something called a TextMate grammar. VS Code is currently ingesting the TextMate grammar for C and C++ contributed by the following repo: https://github.com/jeff-hykin/better-cpp-syntax
I'd suggest opening an issue either in that repo or in the VS Code repo.
Closing this issue as external.
Environment
Bug Summary and Steps to Reproduce
Bug Summary:
If a
#define
inside an#if
block is followed by a trailing comment, the highlighting of the#endif
is erroneous (red instead of magenta) if language mode is set to C. Problems are still empty, so it's obviously only a highlighting issue.Setting language mode to C++, or writing the comment as
/* */
makes the error disappear.Expected behavior:
With
cStandard
set toc99
or higher, the highlighter should cope with double-slash comments.Configuration and Logs