Closed sylvere-k closed 2 years ago
The highlighting error is fixed when >
is added.
Also, the following code has a problem:
bool operator , (const Nbcomplexe & b) const {
return (mod() > b.mod());
}
The highlighting error is partially fixed when a non-whitespace character(s) are added.
Alphanumeric
Number
Opening Parenthesis
bool operator > (const Nbcomplexe & b) const {
return (mod() > b.mod());
}
bool operator < (const Nbcomplexe & b) const {
return (mod() > b.mod());
}
bool operator , (const Nbcomplexe & b) const {
return (mod() > b.mod());
}
I tested this code and the syntax highlighting works for TextMate, both the highlighting on operator without spaces and when <
or ,
is used.
Tree-sitter
TextMate
Mentioned here: https://github.com/tree-sitter/tree-sitter-cpp/issues/110
I noticed that you can't type "operator+" when I wan't to overload an operator in a custom class (or anything like that) else "operator" and the '+' sign won't be colored as they should. The only way to have them colored the right way is to separate them with spaces "operator + ", which is awful but could be fine IF it didn't broke the color/grammar/syntax of the rest of the function/etc : when doing so, "const" won't be his normal color, and "return" either.
Here's the screenshots.
I can also give the whole source code if needed.
Thanks !