better-cpp-syntax
better-cpp-syntax copied to clipboard
field index followed by arrow operator
Tested on vscode.dev
The code with a problem is:
int main() {
a_long_variable_name
[field_index] +=
some_object->field;
random_cpp_code(with_bad_highlighting);
}
It looks like:
Notice that the last line has incorrect highlighting.
It should look like:
Removing a line return fixes the highlighting:
once the brackets are on a newline, the syntax is recognizing them as the beginning of a lambda. Sadly because textmate can only look at one line at a time, this is going to be really tough to fully fix.