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

C grammar for tree-sitter

Results 69 tree-sitter-c issues
Sort by recently updated
recently updated
newest added

The following code does not parse correctly, or recover gracefully: ``` void haunted() { { DEBUG_CODE( if (0) { a(1); } ); } } ``` On the playground, this produces...

I tried to construct a query that would match a function_definition with a capture for the identifier, but I wasn't able to make a one that would reliably match the...

While looking into how one could tackle zeek/tree-sitter-zeek#6 I looked into this grammar for inspiration and noticed that it has similar issues. In C or C++ preprocessor macros can appear...

It is possible (and necessary) to declare a custom defined variable by enclosing the result in parenthesis. For example: ```c typedef double CeedScalar; void example(CeedScalar in[]) { const CeedScalar (*q)...

Hi, in the C language there is an ambiguity with the syntax `T(a);`: 1) if `T` is a type, this is a variable declaration 2) else, it is a function...

I would like to highlight builtin types differently from user defined types. Like `int` type here: But tree-sitter-c will highlight to a Normal type. PS: std::vector is highlight by lsp...

![image](https://user-images.githubusercontent.com/59733058/170888751-bf162e29-e36d-40e7-9f80-6b3255dbcc43.png) This occurs in both C/C++. Captured in Neovim v0.7.0 using nvim-treesitter.

Related: https://github.com/tree-sitter/tree-sitter/pull/1749

Using the following in the playground leads to an inaccurate parse: ```c int f(void) { return a *= b != c ? d : e; } ``` This parses as...

Hi, I've received [this](https://github.com/m-demare/hlargs.nvim/issues/21) issue in my neovim plugin Basically, when a macro is used in the parameter_list, the parser fails: ![imagen](https://user-images.githubusercontent.com/34817965/164526644-2b7c6b6e-f098-4ab8-8ba6-0a0f5b777a67.png) Is this solvable?