Skip to content

Syntax highlighting is incorrect for valid C header file #646

@Omcsesz

Description

@Omcsesz

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 test test2 /* line 1
          The timeout is set to 5x to ensure we don't timeout too early. */

/* test comment */
typedef enum{
    A= 0,
    B= 1
} BB;

It looks like:

image

It should look like:

The comments should all be in dark green as it is visible in the end of the first line, and the normal syntax highlighting should be applied for lines 5-8

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