mirror of
https://github.com/tree-sitter/tree-sitter.git
synced 2026-09-10 07:26:23 -04:00
docs(queries): clarify behavior of first child anchor example
Some checks failed
Check Bindgen Output / check-bindgen (push) Has been cancelled
CI / checks (push) Has been cancelled
CI / sanitize (push) Has been cancelled
CI / build (push) Has been cancelled
CI / check-wasm-stdlib (push) Has been cancelled
Deploy Docs / deploy-docs (push) Has been cancelled
Check Wasm Exports / check-wasm-exports (push) Has been cancelled
Some checks failed
Check Bindgen Output / check-bindgen (push) Has been cancelled
CI / checks (push) Has been cancelled
CI / sanitize (push) Has been cancelled
CI / build (push) Has been cancelled
CI / check-wasm-stdlib (push) Has been cancelled
Deploy Docs / deploy-docs (push) Has been cancelled
Check Wasm Exports / check-wasm-exports (push) Has been cancelled
This commit is contained in:
parent
ec872bca82
commit
9fc2f486a8
|
|
@ -180,7 +180,7 @@ depending on where it's placed inside a query.
|
|||
|
||||
When `.` is placed before the _first_ child within a parent pattern, the child will only match when it is the first named
|
||||
node in the parent. For example, the below pattern matches a given `array` node at most once, assigning the `@the-element`
|
||||
capture to the first `identifier` node in the parent `array`:
|
||||
capture to the first node in the parent `array`, only if it's an `identifier` node:
|
||||
|
||||
```query
|
||||
(array . (identifier) @the-element)
|
||||
|
|
|
|||
Loading…
Reference in a new issue