microsoft / vscode-cpptools

Official repository for the Microsoft C/C++ extension for VS Code.
Other
5.42k stars 1.52k forks source link

case keyword without space followed by character literal breaks syntax highlighting #7631

Closed MrExquisite closed 3 years ago

MrExquisite commented 3 years ago

Bug type: Language Service

Describe the bug

When a keyword like case is immediately followed by a character literal, syntax highlighting gets broken.

Steps to reproduce

  1. Open a new file
  2. Click on Select Language Mode
  3. Select C++
  4. Insert the code sample provided below.
  5. Observe syntax highlighting

Expected behavior

Syntax highlighting should work correctly, like when a space is positioned between case and the string literal.

Code sample and logs

Screenshots

image

sean-mcmanus commented 3 years ago

This is not our bug, i.e. repros with our extension disabled. Can you file a bug at https://github.com/jeff-hykin/cpp-textmate-grammar/issues ? That is the repro for the C/C++ lexical colorization that is used by VS Code.

MrExquisite commented 3 years ago

Thank you and SFTI, moved to here.