Skip to content

Commit f2832ac

Browse files
type argument iteration
1 parent 6476ab2 commit f2832ac

File tree

4 files changed

+29
-5
lines changed

4 files changed

+29
-5
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
public class MyClass {
2+
public MyClass(String name, int age) {}
3+
}
4+
---
5+
6+
[Range] = 1:19-1:39
7+
>--------------------<
8+
1| public MyClass(String name, int age) {}
9+
10+
[Domain] = 1:4-1:43
11+
>---------------------------------------<
12+
1| public MyClass(String name, int age) {}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
public class MyClass {
2+
public void foo(String name, int age) {}
3+
}
4+
---
5+
6+
[Range] = 1:20-1:40
7+
>--------------------<
8+
1| public void foo(String name, int age) {}
9+
10+
[Domain] = 1:4-1:44
11+
>----------------------------------------<
12+
1| public void foo(String name, int age) {}

packages/common/src/scopeSupportFacets/java.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,8 @@ export const javaScopeSupport: LanguageScopeSupportFacetMap = {
9898

9999
"type.argument.formal.constructor": supported,
100100
"type.argument.formal.method": supported,
101+
"type.argument.formal.constructor.iteration": supported,
102+
"type.argument.formal.method.iteration": supported,
101103
"type.foreach": supported,
102104
"type.field": supported,
103105
"type.field.iteration": supported,
@@ -117,8 +119,6 @@ export const javaScopeSupport: LanguageScopeSupportFacetMap = {
117119

118120
// Unsupported
119121

120-
"type.argument.formal.constructor.iteration": unsupported,
121-
"type.argument.formal.method.iteration": unsupported,
122122
"type.cast": unsupported,
123123
"type.class": unsupported,
124124
"type.enum": unsupported,

queries/java.scm

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -289,10 +289,10 @@
289289
;;! ^^^^^^^^^
290290
(formal_parameters
291291
.
292-
"(" @name.iteration.start.endOf
293-
")" @name.iteration.end.startOf
292+
"(" @type.iteration.start.endOf @name.iteration.start.endOf
293+
")" @type.iteration.end.startOf @name.iteration.end.startOf
294294
.
295-
) @name.iteration.domain
295+
) @type.iteration.domain @name.iteration.domain
296296

297297
;;!! Map<String, String>
298298
;;! ^^^^^^^ ^^^^^^

0 commit comments

Comments
 (0)