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

Variable template incorrectly recognized as comparison operator #581

Closed jgcodes2020 closed 4 months ago

jgcodes2020 commented 2 years ago

Checklist

The code with a problem is:

#include <iostream>

template <bool T>
constexpr bool var_template = T;

template <bool T>
struct obj_template {
  static constexpr bool value = T;
};

int main() {
  std::cout << var_template<true> << obj_template<true>::value;
}

It looks like:

image with the One Monokai theme

It should look like:

The <and > tokens next to var_template in var_template<true> should get the punctuation.section.angle-brackets.begin.template.call.cpp and punctuation.section.angle-brackets.end.template.call.cpp scopes respectively.

They don't.

jeff-hykin commented 4 months ago

fixed, not sure when it was fixed though