Skip to content

Commit ff5784e

Browse files
Add missing C scope implementations (#2963)
1 parent ff116ed commit ff5784e

File tree

50 files changed

+1062
-163
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+1062
-163
lines changed

data/fixtures/recorded/languages/cpp/clearSubject2.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@ initialState:
2828
finalState:
2929
documentContents: |
3030
int main() {
31-
switch (int i = rand() % 100; ) {
31+
switch () {
3232
default:
3333
break;
3434
}
3535
}
3636
selections:
37-
- anchor: {line: 1, character: 32}
38-
active: {line: 1, character: 32}
37+
- anchor: {line: 1, character: 10}
38+
active: {line: 1, character: 10}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
foo();
2+
---
3+
4+
[Content] =
5+
[Removal] = 0:4-0:4
6+
><
7+
0| foo();
8+
9+
[Domain] = 0:0-0:5
10+
>-----<
11+
0| foo();
12+
13+
[Insertion delimiter] = ""
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
foo(
2+
aaa,
3+
bbb
4+
);
5+
---
6+
7+
[Content] =
8+
[Removal] = 0:4-3:0
9+
>
10+
0| foo(
11+
1| aaa,
12+
2| bbb
13+
3| );
14+
<
15+
16+
[Domain] = 0:0-3:1
17+
>----
18+
0| foo(
19+
1| aaa,
20+
2| bbb
21+
3| );
22+
-<
23+
24+
[Insertion delimiter] = ",\n"
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
foo(aaa, bbb);
2+
---
3+
4+
[Content] =
5+
[Removal] = 0:4-0:12
6+
>--------<
7+
0| foo(aaa, bbb);
8+
9+
[Domain] = 0:0-0:13
10+
>-------------<
11+
0| foo(aaa, bbb);
12+
13+
[Insertion delimiter] = ", "
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
void foo() {}
2+
---
3+
4+
[Content] =
5+
[Removal] = 0:9-0:9
6+
><
7+
0| void foo() {}
8+
9+
[Domain] = 0:0-0:13
10+
>-------------<
11+
0| void foo() {}
12+
13+
[Insertion delimiter] = ""
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
void foo(
2+
int aaa,
3+
int bbb
4+
) {}
5+
---
6+
7+
[Content] =
8+
[Removal] = 0:9-3:0
9+
>
10+
0| void foo(
11+
1| int aaa,
12+
2| int bbb
13+
3| ) {}
14+
<
15+
16+
[Domain] = 0:0-3:4
17+
>---------
18+
0| void foo(
19+
1| int aaa,
20+
2| int bbb
21+
3| ) {}
22+
----<
23+
24+
[Insertion delimiter] = ",\n"
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
void foo(int aaa, int bbb) {}
2+
---
3+
4+
[Content] =
5+
[Removal] = 0:9-0:25
6+
>----------------<
7+
0| void foo(int aaa, int bbb) {}
8+
9+
[Domain] = 0:0-0:29
10+
>-----------------------------<
11+
0| void foo(int aaa, int bbb) {}
12+
13+
[Insertion delimiter] = ", "
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
if (true) {}
2+
else if (false) {}
3+
else {}
4+
---
5+
6+
[Range] =
7+
[Domain] = 0:0-2:7
8+
>------------
9+
0| if (true) {}
10+
1| else if (false) {}
11+
2| else {}
12+
-------<
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
if (true) {}
2+
else if (false) {}
3+
else {}
4+
---
5+
6+
[#1 Content] =
7+
[#1 Domain] = 0:0-0:12
8+
>------------<
9+
0| if (true) {}
10+
11+
[#1 Removal] = 0:0-1:5
12+
>------------
13+
0| if (true) {}
14+
1| else if (false) {}
15+
-----<
16+
17+
[#1 Insertion delimiter] = "\n"
18+
19+
20+
[#2 Content] =
21+
[#2 Domain] = 1:0-1:18
22+
>------------------<
23+
1| else if (false) {}
24+
25+
[#2 Removal] = 1:0-2:0
26+
>------------------
27+
1| else if (false) {}
28+
2| else {}
29+
<
30+
31+
[#2 Insertion delimiter] = "\n"
32+
33+
34+
[#3 Content] =
35+
[#3 Domain] = 2:0-2:7
36+
>-------<
37+
2| else {}
38+
39+
[#3 Removal] = 1:18-2:7
40+
>
41+
1| else if (false) {}
42+
2| else {}
43+
-------<
44+
45+
[#3 Insertion delimiter] = "\n"
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
for (int i = 0; i < size; ++i) {}
2+
---
3+
4+
[Content] =
5+
[Removal] =
6+
[Domain] = 0:0-0:33
7+
>---------------------------------<
8+
0| for (int i = 0; i < size; ++i) {}
9+
10+
[Insertion delimiter] = "\n"

0 commit comments

Comments
 (0)