File tree Expand file tree Collapse file tree 6 files changed +150
-5
lines changed
data/fixtures/scopes/java
packages/common/src/scopeSupportFacets Expand file tree Collapse file tree 6 files changed +150
-5
lines changed Original file line number Diff line number Diff line change 1+ public class MyClass {
2+ String foo, bar;
3+ }
4+ ---
5+
6+ [Range] = 1:11-1:19
7+ >--------<
8+ 1| String foo, bar;
9+
10+ [Domain] = 1:4-1:20
11+ >----------------<
12+ 1| String foo, bar;
Original file line number Diff line number Diff line change 1+ public class MyClass {
2+ public void myFunk() {
3+ String foo, bar;
4+ }
5+ }
6+ ---
7+
8+ [Range] = 2:15-2:23
9+ >--------<
10+ 2| String foo, bar;
11+
12+ [Domain] = 2:8-2:24
13+ >----------------<
14+ 2| String foo, bar;
Original file line number Diff line number Diff line change 1+ public class MyClass {
2+ String foo, bar;
3+ }
4+ ---
5+
6+ [#1 Content] =
7+ [#1 Domain] = 1:11-1:14
8+ >---<
9+ 1| String foo, bar;
10+
11+ [#1 Removal] = 1:11-1:16
12+ >-----<
13+ 1| String foo, bar;
14+
15+ [#1 Trailing delimiter] = 1:14-1:16
16+ >--<
17+ 1| String foo, bar;
18+
19+ [#1 Insertion delimiter] = ", "
20+
21+
22+ [#2 Content] =
23+ [#2 Domain] = 1:16-1:19
24+ >---<
25+ 1| String foo, bar;
26+
27+ [#2 Removal] = 1:14-1:19
28+ >-----<
29+ 1| String foo, bar;
30+
31+ [#2 Leading delimiter] = 1:14-1:16
32+ >--<
33+ 1| String foo, bar;
34+
35+ [#2 Insertion delimiter] = ", "
Original file line number Diff line number Diff line change 1+ public class MyClass {
2+ public void myFunk() {
3+ String foo, bar;
4+ }
5+ }
6+ ---
7+
8+ [#1 Content] =
9+ [#1 Domain] = 2:15-2:18
10+ >---<
11+ 2| String foo, bar;
12+
13+ [#1 Removal] = 2:15-2:20
14+ >-----<
15+ 2| String foo, bar;
16+
17+ [#1 Trailing delimiter] = 2:18-2:20
18+ >--<
19+ 2| String foo, bar;
20+
21+ [#1 Insertion delimiter] = ", "
22+
23+
24+ [#2 Content] =
25+ [#2 Domain] = 2:20-2:23
26+ >---<
27+ 2| String foo, bar;
28+
29+ [#2 Removal] = 2:18-2:23
30+ >-----<
31+ 2| String foo, bar;
32+
33+ [#2 Leading delimiter] = 2:18-2:20
34+ >--<
35+ 2| String foo, bar;
36+
37+ [#2 Insertion delimiter] = ", "
Original file line number Diff line number Diff line change @@ -21,14 +21,17 @@ export const javaScopeSupport: LanguageScopeSupportFacetMap = {
2121 "argument.actual" : supported ,
2222 "argument.actual.iteration" : supported ,
2323
24- element : notApplicable ,
25- tags : notApplicable ,
26- attribute : notApplicable ,
27- "key.attribute" : notApplicable ,
28- "value.attribute" : notApplicable ,
24+ "collectionItem.unenclosed" : supported ,
25+ "collectionItem.unenclosed.iteration" : supported ,
2926
3027 "branch.if" : supported ,
3128 "branch.if.iteration" : supported ,
3229 "branch.try" : supported ,
3330 "branch.try.iteration" : supported ,
31+
32+ element : notApplicable ,
33+ tags : notApplicable ,
34+ attribute : notApplicable ,
35+ "key.attribute" : notApplicable ,
36+ "value.attribute" : notApplicable ,
3437} ;
Original file line number Diff line number Diff line change 316316 value: (_)? @value @name.trailing.startOf
317317 )
318318) @_.domain
319+
319320(field_declaration
320321 (variable_declarator
321322 name: (_) @name @value.leading.endOf
322323 value: (_)? @value @name.trailing.startOf
323324 )
324325) @_.domain
325326
327+ ;; !! int foo, bar;
328+ ;; ! ^^^ ^^^
329+ (
330+ (local_variable_declaration
331+ type: (_)
332+ (variable_declarator)? @_.leading.endOf
333+ .
334+ (variable_declarator) @collectionItem
335+ .
336+ (variable_declarator)? @_.trailing.startOf
337+ )
338+ (#insertion-delimiter! @collectionItem ", ")
339+ )
340+
341+ (
342+ (field_declaration
343+ type: (_)
344+ (variable_declarator)? @_.leading.endOf
345+ .
346+ (variable_declarator) @collectionItem
347+ .
348+ (variable_declarator)? @_.trailing.startOf
349+ )
350+ (#insertion-delimiter! @collectionItem ", ")
351+ )
352+
353+ ;; !! int foo, bar;
354+ ;; ! ^^^^ ^^^^
355+ ;; ! -------------
356+ (local_variable_declaration
357+ type: (_)
358+ .
359+ (_) @collectionItem.iteration.start.startOf
360+ ";"? @collectionItem.iteration.end.startOf
361+ ) @collectionItem.iteration.domain
362+
363+ (field_declaration
364+ type: (_)
365+ .
366+ (_) @collectionItem.iteration.start.startOf
367+ ";"? @collectionItem.iteration.end.startOf
368+ ) @collectionItem.iteration.domain
369+
326370;; !! value = 1;
327371;; ! ^
328372;; ! xxxx
You can’t perform that action at this time.
0 commit comments