This repository was archived by the owner on Dec 15, 2022. It is now read-only.
This repository was archived by the owner on Dec 15, 2022. It is now read-only.
C++ Syntax Highlighting gets confused by apostrophes #320
Closed
Description
Edit by @rsese - also an issue with Tree-sitter
From @Aerijo:
Tree sitter also trips on this, it just recovers before the function.
From @damyanp on January 30, 2019 18:21
Issue Type: Bug
For example:
#error Don't do this
void foo() { }
The syntax highlighter thinks that a string starts from the apostrophe betwee the "n" and "t" in "don't" and highlights the rest of the file as a string until it reaches the next single quote.
Visual Studio gets this correct, since the entire line for the preprocessor directive is highlighted separately and it doesn't look for strings inside it.
Copied from original issue: microsoft/vscode#67568