Search code examples
c++sublimetext3syntax-highlighting

Sublime-text3 highlights a } as an illegal character


Why does my sublime-text3 text editor highlights the closed parenthesis as an illegal character while the code compiles?

{
    cout<<">>"<<endl;   
}

Is it related to digraphs or trigraphs?

s


Solution

  • It seems like it is a bug of Syntax Highlighting. Looks like it has been fixed, but it is raised quite recently(in Sep 2019) so it probably is not reflected in your version. I tested it and had same issue with Build 3211 which is the lastest offical version.

    Here's the issue and fix for that. You may try the recent C++.sublime-syntax file.