Docs: document _ wildcard node
Closes https://github.com/tree-sitter/tree-sitter/issues/1253
This commit is contained in:
parent
0926fad1e2
commit
4adc2f5c88
1 changed files with 3 additions and 1 deletions
|
|
@ -586,8 +586,10 @@ This pattern would match a set of possible keyword tokens, capturing them as `@k
|
|||
|
||||
#### Wildcard Node
|
||||
|
||||
A wildcard node is represented with an underscore (`(_)`), it matches any node.
|
||||
A wildcard node is represented with an underscore (`_`), it matches any node.
|
||||
This is similar to `.` in regular expressions.
|
||||
There are two types, `(_)` will match any named node,
|
||||
and `_` will match any named or anonymous node.
|
||||
|
||||
For example, this pattern would match any node inside a call:
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue