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

The grammar currently seems limited in how it deals with assignment expressions and in particular what can appear on the LHS of an assignment expression. Arbitrary expressions on the LHS...

Since C++17, attributes can have `using` in them: ```cpp [[using name::space: attr]] ``` Also (this is admittedly strange) the C++ grammar doesn't introduce an attribute with a single `[[` token...

``` int arg = 0; if ((arg = arg + 1) > 5) { printf("arg: %d, greater than 5.\n", arg); } ```

The following is a query demo to capture struct's name: ``` (struct_specifier name: (type_identifier) @target_object ) ``` here is a cpp demo code: ```cpp struct Student update_time; ``` expected: -...

### Did you check existing issues? - [X] I have read all the [tree-sitter docs](https://tree-sitter.github.io/tree-sitter/using-parsers) if it relates to using the parser - [X] I have searched the existing issues...

bug

### Did you check the tree-sitter docs? - [x] I have read all the [tree-sitter docs](https://tree-sitter.github.io/tree-sitter/using-parsers) if it relates to using the parser ### Is your feature request related to...

enhancement

### Did you check existing issues? - [X] I have read all the [tree-sitter docs](https://tree-sitter.github.io/tree-sitter/using-parsers) if it relates to using the parser - [X] I have searched the existing issues...

bug

As discussed in #173, this PR implements the [C++20 modules grammar](https://en.cppreference.com/w/cpp/language/modules) after the last contributor time restraints. It Closes #174. #### Parser states before: ```c #define STATE_COUNT 9798 #define LARGE_STATE_COUNT...

Here is a shortened version of my code, which couldn't be parsed correctly. This is my first time editing a tree-sitter grammar. Maybe I accidentally broke the parsing of other...

### Did you check existing issues? - [X] I have read all the [tree-sitter docs](https://tree-sitter.github.io/tree-sitter/using-parsers) if it relates to using the parser - [X] I have searched the existing issues...

bug