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

This commit is contained in:
Will Lillis 2026-06-30 00:24:11 -04:00
parent ec872bca82
commit 9fc2f486a8

View file

@ -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)