Skip to content

Commit e164a9f

Browse files
named function iteration scope
1 parent 776275d commit e164a9f

File tree

4 files changed

+25
-11
lines changed

4 files changed

+25
-11
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
class MyClass { }
2+
---
3+
4+
[Range] =
5+
[Domain] = 0:15-0:16
6+
>-<
7+
0| class MyClass { }
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
class MyClass { }
2+
---
3+
4+
[Range] =
5+
[Domain] = 0:15-0:16
6+
>-<
7+
0| class MyClass { }

packages/common/src/scopeSupportFacets/java.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,13 @@ export const javaScopeSupport: LanguageScopeSupportFacetMap = {
5959
functionCallee: supported,
6060
"functionCallee.constructor": supported,
6161

62+
"namedFunction.constructor": supported,
63+
"namedFunction.method": supported,
64+
"namedFunction.method.iteration.class": supported,
65+
6266
"functionName.constructor": supported,
6367
"functionName.method": supported,
68+
"functionName.method.iteration.class": supported,
6469

6570
"name.argument.formal.constructor": supported,
6671
"name.argument.formal.constructor.iteration": supported,
@@ -73,8 +78,6 @@ export const javaScopeSupport: LanguageScopeSupportFacetMap = {
7378
"name.foreach": supported,
7479
"name.method": supported,
7580
"name.variable": supported,
76-
"namedFunction.constructor": supported,
77-
"namedFunction.method": supported,
7881

7982
ifStatement: supported,
8083
statement: supported,
@@ -121,13 +124,6 @@ export const javaScopeSupport: LanguageScopeSupportFacetMap = {
121124
"value.resource": unsupported,
122125
"value.resource.iteration": unsupported,
123126

124-
"namedFunction.iteration.document": unsupported,
125-
"namedFunction.method.iteration.class": unsupported,
126-
127-
"functionName.iteration.block": unsupported,
128-
"functionName.iteration.document": unsupported,
129-
"functionName.method.iteration.class": unsupported,
130-
131127
"interior.class": unsupported,
132128
"interior.element": unsupported,
133129
"interior.function": unsupported,
@@ -189,8 +185,12 @@ export const javaScopeSupport: LanguageScopeSupportFacetMap = {
189185
"textFragment.element": notApplicable,
190186

191187
namedFunction: notApplicable,
188+
"namedFunction.iteration.document": notApplicable,
192189
"namedFunction.iteration.block": notApplicable,
193190

191+
"functionName.iteration.document": notApplicable,
192+
"functionName.iteration.block": notApplicable,
193+
194194
pairDelimiter: notApplicable,
195195
functionName: notApplicable,
196196
map: notApplicable,

queries/java.scm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -432,8 +432,8 @@
432432
;;! ^
433433
(class_body
434434
.
435-
"{" @type.iteration.start.endOf
436-
"}" @type.iteration.end.startOf
435+
"{" @type.iteration.start.endOf @namedFunction.iteration.start.endOf @functionName.iteration.start.endOf
436+
"}" @type.iteration.end.startOf @namedFunction.iteration.end.startOf @functionName.iteration.end.startOf
437437
.
438438
)
439439

0 commit comments

Comments
 (0)