tree-sitter / tree-sitter-c

C grammar for tree-sitter
MIT License
226 stars 100 forks source link

Failure to parse typedef with the comments inside and outside - regression #151

Closed XVilka closed 1 year ago

XVilka commented 1 year ago

This looks like regression and was working before

ℤ tree-sitter parse bla.c
Warning: You have not configured any parser directories!
Please run `tree-sitter init-config` and edit the resulting
configuration file to indicate where we should look for
language grammars.

(translation_unit [0, 0] - [1, 0]
  (type_definition [0, 0] - [0, 36]
    (comment [0, 8] - [0, 17])
    type: (sized_type_specifier [0, 18] - [0, 26])
    (ERROR [0, 27] - [0, 30]
      (type_identifier [0, 27] - [0, 30]))
    declarator: (type_identifier [0, 31] - [0, 35]))
  (comment [0, 37] - [0, 43]))
bla.c   0 ms    (ERROR [0, 27] - [0, 30])
rizinorg_tree-sitter-c on  master [⇕!?]                                                                                                                                                      10:51:10 via 🦀 1.70.0
ℤ cat bla.c
typedef /* fff */ unsigned int uint; // ggg

cc @amaanq

amaanq commented 1 year ago

Yeah, I realized this broke after I merged. I have an idea to fix everything w.r.t that that I'll try shortly.

amaanq commented 1 year ago

Got a little busy, should all be fixed now