tree-sitter-cpp icon indicating copy to clipboard operation
tree-sitter-cpp copied to clipboard

C++ grammar for tree-sitter

Results 66 tree-sitter-cpp issues
Sort by recently updated
recently updated
newest added

This PR adds support for C++20 modules. (Semi-)formal syntax description can be found on [cppreference](https://en.cppreference.com/w/cpp/language/modules#Syntax). While implementing support for modules, I also noticed that [class template instantiation](https://en.cppreference.com/w/cpp/language/class_template#Class_template_instantiation), as well as...

Hi! I'm experimenting with C++20 modules in neovim and tree-sitter can't parse modules. I took a crack at implementing it and it seems to work. Implementation can be found in...

As of C++20 it is possible to use `using enum ;` The parser does not support it yet. ```cpp enum class Foo { bar, }; int main() { using enum...

Hi, Value parameters and reference parameters have different syntax highlight groups. Consider this example: ![image](https://user-images.githubusercontent.com/6927259/171135907-c959f804-7482-4a61-8b73-45100302ad11.png) According to TSCaptureUnderCursor: * arg1 is {TSVariable, TSParameter} in that order * arg2 is {TSParameter,...

As I was trying to highlight the contents of C++ raw string literals depending on custom delimiters (e.g. `R"re(...)re"` for regular expressions), I found it is probably impossible without tweaking...

enhancement

I use py-tree-sitter with the grammar *of this repository* to parse c++/c files. However I found that the "and" keyword leads to a weird behaviour. I'm not sure if I...

A class with a conversion function fails to highlight the conversion function name. ``` struct aa { // conversion function operator int() { return 0; } }; auto main() ->...

An operator overload fails to highlight the function name. ``` struct aa { }; // operator overload auto operator +(aa const&, aa const&) -> aa { return {}; } auto...

Can you please release a new version? The latest one (v0.20.0) doesn’t work with modern nvim-treesitter. I’m maintainer of the [tree-sitter-cpp](https://pkgs.alpinelinux.org/packages?name=tree-sitter-cpp) package in Alpine Linux and I had to update...