Skip to content

Commit 60ccc36

Browse files
fix: update example
1 parent 93c16a4 commit 60ccc36

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

website/blog/new-ver-42.md

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -270,15 +270,14 @@ Match nodes against any one of several selectors — a concise way to express "o
270270
:::code-group
271271

272272
```yaml [:is]
273-
# match functions containing either return or variable declaration
274-
kind: 'function_declaration:has(:is(return_statement, lexical_declaration))'
273+
# match return statements or variable declarations inside a block
274+
kind: 'statement_block > :is(return_statement, lexical_declaration)'
275275
# is equivalent to
276-
kind: function_declaration
277-
has:
278-
any:
279-
- kind: return_statement
280-
- kind: lexical_declaration
281-
stopBy: end
276+
any:
277+
- kind: return_statement
278+
- kind: lexical_declaration
279+
inside:
280+
kind: statement_block
282281
```
283282

284283
:::

0 commit comments

Comments
 (0)