tree-sitter-cpp
tree-sitter-cpp copied to clipboard
:bug: misidentified structure variable definition
The following is a query demo to capture struct's name:
(struct_specifier
name: (type_identifier) @target_object
)
here is a cpp demo code:
struct Student update_time;
expected:
- It is recognized that this is a line of code that defines a variable of type
struct Student
update_time
. - And can not be recognized as a struct definition
Student
.
bug:
- recognized as a struct definition
Student
and the query capture theStudent
.