File tree Expand file tree Collapse file tree 1 file changed +7
-8
lines changed
Expand file tree Collapse file tree 1 file changed +7
-8
lines changed Original file line number Diff line number Diff 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:: :
You can’t perform that action at this time.
0 commit comments