Query syntax for consecutive sibling nodes? #750
-
The documentation seems to be incorrect or I am misinterpreting it.
I would expect this query to match against comments followed by function declarations, but when run in the playground with some simple C code // this is a comment, not followed immediately by a function, but eventually followed by a function
static const int x = 2;
// this is a comment, followed by a function
int main(void) {
return 0;
}
// this is just a comment, at the end of the code when running the query
in the playground, the two top comments are matched, despite the first comment and |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
Hi, I think that what you are searching for is the
|
Beta Was this translation helpful? Give feedback.
-
Thanks! Is there somewhere where this is documented? Or is the query language not fully documented yet? |
Beta Was this translation helpful? Give feedback.
-
Yeah, there are some undocumented features #549 I opened a PR documented some of them #713 |
Beta Was this translation helpful? Give feedback.
Hi, I think that what you are searching for is the
.
syntax, and that the query you want is :