jeff-hykin / better-cpp-syntax

💾 The source of VS Code's C++ syntax highlighting
GNU General Public License v3.0
155 stars 30 forks source link

Add semantic colorization for c++23 #elifdef and #elifndef #641

Closed BluTree closed 1 year ago

BluTree commented 1 year ago

Checklist

The code with a problem is:

#include <iostream>

int main(int argc, const char ** argv)
{
    #ifdef _WIN32
    std::cout << "Hello World Windows" << std::endl;
    #elifdef __linux__
    std::cout << "Hello World Linux" << std::endl;
    #endif
    return 0;
}

It looks like:

image using Material Theme (Community Material Theme Darker)

It should look like:

The #elifdef and #elifndef sould be colored correctly, as this is a supported and standard preprocessor directive from c++23

jeff-hykin commented 1 year ago

man why does the C++ team keep adding junk like this 🙄

anyways, added support in v1.21.1, you should see a huge change in type highlighting as well.