Using `switch` keyword in macro call breaks `#endif` highlighting (C only)
Checklist
- [x] This problem exists even with the setting
"C_Cpp.enhancedColorization": "Disabled"
If Disabling that^ makes the problem go away, then follow this to make an issue on the C++ extension: https://github.com/microsoft/vscode-cpptools/issues/new/choose
The code with a problem is:
#define DEF(name) JS_ATOM_ ## name,
#ifdef DEF
DEF(switch)
#endif
It looks like:
It should look like:
The #endif should be highlighted as valid, as with other keywords:
Just confirmed that the highlighting is correct when treating the file as C++, the above issue only occurs when treating as C
the C repo is here https://github.com/jeff-hykin/better-c-syntax
caused by the switch not having a early cutoff at brackets )
) should be added to the end pattern character class
https://github.com/jeff-hykin/better-c-syntax/blob/ff81a5813673a7be5944e544b2ab83ff8c165a2b/autogenerated/c.tmLanguage.json#L3499