Skip to content

Commit c485db8

Browse files
csharp
1 parent 2bb896f commit c485db8

8 files changed

+86
-21
lines changed

data/fixtures/scopes/csharp/argumentList/argumentList.actual.constructor.multiLine.scope

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,12 @@ new Foo(
44
);
55
---
66

7-
[Content] =
7+
[Content] = 1:4-2:7
8+
>----
9+
1| aaa,
10+
2| bbb
11+
-------<
12+
813
[Removal] = 0:8-3:0
914
>
1015
0| new Foo(
@@ -13,6 +18,10 @@ new Foo(
1318
3| );
1419
<
1520

21+
[Leading delimiter] = 1:0-1:4
22+
>----<
23+
1| aaa,
24+
1625
[Domain] = 0:0-3:1
1726
>--------
1827
0| new Foo(

data/fixtures/scopes/csharp/argumentList/argumentList.actual.method.multiLine.scope

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,12 @@ foo.bar(
44
);
55
---
66

7-
[Content] =
7+
[Content] = 1:4-2:7
8+
>----
9+
1| aaa,
10+
2| bbb
11+
-------<
12+
813
[Removal] = 0:8-3:0
914
>
1015
0| foo.bar(
@@ -13,6 +18,10 @@ foo.bar(
1318
3| );
1419
<
1520

21+
[Leading delimiter] = 1:0-1:4
22+
>----<
23+
1| aaa,
24+
1625
[Domain] = 0:0-3:1
1726
>--------
1827
0| foo.bar(

data/fixtures/scopes/csharp/argumentList/argumentList.actual.multiLine.scope

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,12 @@ foo(
44
);
55
---
66

7-
[Content] =
7+
[Content] = 1:4-2:7
8+
>----
9+
1| aaa,
10+
2| bbb
11+
-------<
12+
813
[Removal] = 0:4-3:0
914
>
1015
0| foo(
@@ -13,6 +18,10 @@ foo(
1318
3| );
1419
<
1520

21+
[Leading delimiter] = 1:0-1:4
22+
>----<
23+
1| aaa,
24+
1625
[Domain] = 0:0-3:1
1726
>----
1827
0| foo(

data/fixtures/scopes/csharp/argumentList/argumentList.formal.constructor.multiLine.scope

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,12 @@ class MyClass {
66
}
77
---
88

9-
[Content] =
9+
[Content] = 2:8-3:15
10+
>--------
11+
2| int aaa,
12+
3| int bbb
13+
---------------<
14+
1015
[Removal] = 1:12-4:4
1116
>
1217
1| MyClass(
@@ -15,6 +20,10 @@ class MyClass {
1520
4| ) {}
1621
----<
1722

23+
[Leading delimiter] = 2:0-2:8
24+
>--------<
25+
2| int aaa,
26+
1827
[Domain] = 1:4-4:8
1928
>--------
2029
1| MyClass(

data/fixtures/scopes/csharp/argumentList/argumentList.formal.lambda.multiLine.scope

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,12 @@
44
) => {};
55
---
66

7-
[Content] =
7+
[Content] = 1:4-2:7
8+
>----
9+
1| aaa,
10+
2| bbb
11+
-------<
12+
813
[Removal] = 0:1-3:0
914
>
1015
0| (
@@ -13,6 +18,10 @@
1318
3| ) => {};
1419
<
1520

21+
[Leading delimiter] = 1:0-1:4
22+
>----<
23+
1| aaa,
24+
1625
[Domain] = 0:0-3:7
1726
>-
1827
0| (

data/fixtures/scopes/csharp/argumentList/argumentList.formal.method.multiLine.scope

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,12 @@ class MyClass {
66
}
77
---
88

9-
[Content] =
9+
[Content] = 2:8-3:15
10+
>--------
11+
2| int aaa,
12+
3| int bbb
13+
---------------<
14+
1015
[Removal] = 1:13-4:4
1116
>
1217
1| void foo(
@@ -15,6 +20,10 @@ class MyClass {
1520
4| ) {}
1621
----<
1722

23+
[Leading delimiter] = 2:0-2:8
24+
>--------<
25+
2| int aaa,
26+
1827
[Domain] = 1:4-4:8
1928
>---------
2029
1| void foo(

data/fixtures/scopes/csharp/argumentList/argumentList.formal.multiLine.scope

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,12 @@ void foo(
44
) {}
55
---
66

7-
[Content] =
7+
[Content] = 1:4-2:7
8+
>----
9+
1| aaa,
10+
2| bbb
11+
-------<
12+
813
[Removal] = 0:9-3:0
914
>
1015
0| void foo(
@@ -13,6 +18,10 @@ void foo(
1318
3| ) {}
1419
<
1520

21+
[Leading delimiter] = 1:0-1:4
22+
>----<
23+
1| aaa,
24+
1625
[Domain] = 0:0-3:4
1726
>---------
1827
0| void foo(

queries/csharp.scm

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,7 @@
401401
">" @type.iteration.end.startOf
402402
)
403403

404-
;;!! int value = 5
404+
;;!! int value = 0;
405405
;;! ^
406406
(parameter
407407
name: (_) @value.leading.endOf
@@ -410,8 +410,8 @@
410410
)
411411
) @_.domain
412412

413-
;; !! foo(a, b)
414-
;; ! ^ ^
413+
;; !! foo(aaa, bbb)
414+
;; ! ^^^ ^^^
415415
(
416416
(argument_list
417417
(_)? @_.leading.endOf
@@ -424,14 +424,15 @@
424424
(#single-or-multi-line-delimiter! @argumentOrParameter @_dummy ", " ",\n")
425425
)
426426

427-
;; !! foo(a, b)
428-
;; ! ^^^^
427+
;; !! foo(aaa, bbb)
428+
;; ! ^^^^^^^^
429429
(_
430430
(argument_list
431-
"(" @argumentList.start.endOf @argumentOrParameter.iteration.start.endOf
432-
")" @argumentList.end.startOf @argumentOrParameter.iteration.end.startOf
433-
) @_dummy
434-
(#empty-single-multi-delimiter! @argumentList.start.endOf @_dummy "" ", " ",\n")
431+
"(" @argumentList.removal.start.endOf @argumentOrParameter.iteration.start.endOf
432+
")" @argumentList.removal.end.startOf @argumentOrParameter.iteration.end.startOf
433+
) @argumentList
434+
(#child-range! @argumentList 1 -2)
435+
(#empty-single-multi-delimiter! @argumentList @argumentList "" ", " ",\n")
435436
) @argumentList.domain @argumentOrParameter.iteration.domain
436437

437438
;; !! void foo(int a, int b)
@@ -452,10 +453,11 @@
452453
;; ! ^^^^^^^^^^^^
453454
(_
454455
(parameter_list
455-
"(" @argumentList.start.endOf @argumentOrParameter.iteration.start.endOf
456-
")" @argumentList.end.startOf @argumentOrParameter.iteration.end.startOf
457-
) @_dummy
458-
(#empty-single-multi-delimiter! @argumentList.start.endOf @_dummy "" ", " ",\n")
456+
"(" @argumentList.removal.start.endOf @argumentOrParameter.iteration.start.endOf
457+
")" @argumentList.removal.end.startOf @argumentOrParameter.iteration.end.startOf
458+
) @argumentList
459+
(#child-range! @argumentList 1 -2)
460+
(#empty-single-multi-delimiter! @argumentList @argumentList "" ", " ",\n")
459461
) @argumentList.domain @argumentOrParameter.iteration.domain
460462

461463
(parameter_list
@@ -465,7 +467,7 @@
465467

466468
;; Treat interior of all bodies as iteration scopes for `name`, eg
467469
;;!! void foo() { }
468-
;;! ***
470+
;;! ^^^
469471
(_
470472
body: (_
471473
"{" @name.iteration.start.endOf @value.iteration.start.endOf @type.iteration.start.endOf

0 commit comments

Comments
 (0)