Skip to content

Using switch keyword in macro call breaks #endif highlighting (C only) #688

@andrjohns

Description

@andrjohns

Checklist

  • 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:

Image

It should look like:

The #endif should be highlighted as valid, as with other keywords:

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions