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

Hi, I think that the following declaration is causing a parsing error : ```c TSLanguage *(*lang_parser)(void); ``` The outputed tree is (tested on the playground) : ``` translation_unit [0, 0]...

When we parse the struct which has the name and typedef name, with "__attribute__" tag, the parser will truncate it before the "__attribute__" and recoginize the " __attribute__" is an...

[Source](https://github.com/septag/rizz/blob/master/include/sx/allocator.h#L133): ```c static inline void* sx__aligned_alloc(const sx_alloc* alloc, size_t size, uint32_t align, const char* file, const char* func, uint32_t line) { align = ({ typeof((int)align) var__a = ((int)align); typeof(8) var__b...

```c typedef void const *voidpc; ``` ``` # (type_definition 225 4 27 # (primitive_type 225 12 4 "void") # (ERROR 225 17 5 "const" # (type_identifier 225 17 5 "const")...

```c #define BIO_CTRL_DGRAM_SET_CONNECTED 32/* allow for an externally connected * socket to be passed in */ ``` Results in: ``` (translation_unit 1 1 146 (preproc_def 1 1 77 (identifier 1...

```c struct status { unsigned int widthValidated : 1, heightValidated : 1; }; ``` Results in: ``` # (struct_specifier 1 1 74 # (type_identifier 1 8 6 "status") # (field_declaration_list...

Right now, I don't think C line continuations are fully supported. Sure, PR #29 added line continuation to `extras`, and there is code in place to support line continuations in...

See https://github.com/tree-sitter/tree-sitter/pull/246 Fixes https://github.com/atom/language-c/issues/308

So I [recently learned](https://discuss.atom.io/t/help-with-text-format/59938) functions can omit the return type. Googling this tells me this has been deprecated, but my tests still let me compile without it. Currently, leaving out...

I am using neovim with nvim-treesitter. In this function: `int foo(char bar[], int baz);` bar is not highlighted as a parameter, unlike baz, which actually is recognized as such. Strangely,...