jeff-hykin / better-cpp-syntax

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

Issue with comments between array declaration #412

Open Summon528 opened 5 years ago

Summon528 commented 5 years ago

Checklist

The code with a problem is:

int main() {
    int a // foo
    [10]; // bar
}

It looks like:

image

It should look like:

// bar should be green

matter123 commented 5 years ago

Confirmed for C++ with 1.14.12

matter123 commented 5 years ago

@jeff-hykin It is treating the [10] as the start of a lambda.

I see three resolutions: