Skip to content

Commit 9eaca9c

Browse files
Update named function iteration scope facets (#3041)
1 parent cac86cf commit 9eaca9c

25 files changed

+22
-50
lines changed
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

data/scopeSupportFacetInfos.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -241,10 +241,9 @@
241241

242242
- `namedFunction` A named function declaration
243243
- `namedFunction.constructor` A constructor declaration in a class
244-
- `namedFunction.iteration.block` Iteration scope for named functions: statement blocks (body of functions/if-statements/for-loops/etc).
244+
- `namedFunction.iteration.class` Iteration scope for named functions: class bodies.
245245
- `namedFunction.iteration.document` Iteration scope for named functions: the entire document including leading and trailing empty lines.
246246
- `namedFunction.method` A named method declaration in a class
247-
- `namedFunction.method.iteration.class` Iteration scope for named functions: class bodies.
248247

249248
### nonWhitespaceSequence
250249

packages/common/src/scopeSupportFacets/c.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -186,9 +186,6 @@ export const cCoreScopeSupport: LanguageScopeSupportFacetMap = {
186186
// Nested class
187187
"class.iteration.block": notApplicable,
188188

189-
// Nested function
190-
"namedFunction.iteration.block": notApplicable,
191-
192189
// Try catch
193190
"branch.try": notApplicable,
194191
"branch.try.iteration": notApplicable,
@@ -279,7 +276,7 @@ export const cScopeSupport: LanguageScopeSupportFacetMap = {
279276
"name.argument.formal.method.iteration": notApplicable,
280277
"name.argument.formal.method": notApplicable,
281278
"name.method": notApplicable,
282-
"namedFunction.method.iteration.class": notApplicable,
279+
"namedFunction.iteration.class": notApplicable,
283280
"namedFunction.method": notApplicable,
284281
"type.argument.formal.method.iteration": notApplicable,
285282
"type.argument.formal.method": notApplicable,

packages/common/src/scopeSupportFacets/cpp.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ export const cppScopeSupport: LanguageScopeSupportFacetMap = {
4343
"functionCallee.constructor": supported,
4444

4545
"namedFunction.method": supported,
46-
"namedFunction.method.iteration.class": supported,
46+
"namedFunction.iteration.class": supported,
4747
"namedFunction.constructor": supported,
4848

4949
"name.argument.formal.method": supported,

packages/common/src/scopeSupportFacets/csharp.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export const csharpScopeSupport: LanguageScopeSupportFacetMap = {
2626
"namedFunction.iteration.document": supported,
2727
"namedFunction.constructor": supported,
2828
"namedFunction.method": supported,
29-
"namedFunction.method.iteration.class": supported,
29+
"namedFunction.iteration.class": supported,
3030

3131
"branch.if": supported,
3232
"branch.if.elif.else": supported,
@@ -225,9 +225,6 @@ export const csharpScopeSupport: LanguageScopeSupportFacetMap = {
225225
"value.argument.actual": notApplicable,
226226
"value.argument.actual.iteration": notApplicable,
227227

228-
// Functions in blocks
229-
"namedFunction.iteration.block": notApplicable,
230-
231228
// Resource syntax
232229
"interior.resource": notApplicable,
233230
"type.resource": notApplicable,

0 commit comments

Comments
 (0)