Closed bbatliner closed 5 years ago
I think adding virtual
as a modifier
will solve this issue. I don't see it in the cpp grammar. I'll make a PR on Github but I can't really test it.
Hello @bbatliner ,
In fact it's a bug in tree-sitter-cpp, that incorrectly parses definitions with virtual
.
I've just discovered, that there's a newer version, maybe it's already fixed. Otherwise I'll upstream corresponding question to tree-sitter-cpp developers. Anyway, there's another bug with default
.
Yet you are right that virtual
is missing. I'll merge your PR. Please note, that it won't fix the issue.
Hello @bbatliner ,
It seems I was right, the latest version of tree-sitter-cpp fixes at least this issue.
I'll publish a new version in a day. Stay tuned.
Awesome, that's great to hear. It looks like throw
and maybe __attribute__
got added to that latest version, as well. We might be able to close #21, if it fixes that, too.
throw
and virtual
have been fixed indeed. But highlighting of structs with __attribute__
is still corrupted, it became slightly better though. It seems, that attributes are fixed only for functions in tree-sitter-cpp. So let's leave #21 open for a while. I'll try to ask tree-sitter-cpp developers to fix this issues.
Hello @bbatliner , just in case, this bug is fixed in the latest version 0.3.3, I've published on Friday.
Yes, confirmed. Thanks.
I can't explain what's going on here: the highlighting changes vastly despite the function signatures being nearly identical. The presence of the
virtual
keyword seems to play an effect. In this example, the first function has incorrect/inconsistent highlighting, and the second is highlighted as expected.