query: Make * operator only match named nodes
This commit is contained in:
parent
55edafa946
commit
1d6ea51b63
1 changed files with 3 additions and 1 deletions
|
|
@ -1238,7 +1238,9 @@ static inline bool ts_query_cursor__advance(TSQueryCursor *self) {
|
|||
// Determine if this node matches this step of the pattern, and also
|
||||
// if this node can have later siblings that match this step of the
|
||||
// pattern.
|
||||
bool node_does_match = !step->symbol || step->symbol == symbol;
|
||||
bool node_does_match =
|
||||
step->symbol == symbol ||
|
||||
(!step->symbol && ts_node_is_named(node));
|
||||
bool later_sibling_can_match = can_have_later_siblings;
|
||||
if (step->field) {
|
||||
if (step->field == field_id) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue