Skip to content

Commit 07d51cb

Browse files
Added interior scopes for C and C++. (#2987)
1 parent 31e44d6 commit 07d51cb

20 files changed

+969
-89
lines changed
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
struct aaa { int bbb; };
2+
---
3+
4+
[#1 Content] = 0:13-0:21
5+
>--------<
6+
0| struct aaa { int bbb; };
7+
8+
[#1 Removal] = 0:12-0:22
9+
>----------<
10+
0| struct aaa { int bbb; };
11+
12+
[#1 Domain] = 0:0-0:24
13+
>------------------------<
14+
0| struct aaa { int bbb; };
15+
16+
[#1 Insertion delimiter] = " "
17+
18+
19+
[#2 Content] = 0:13-0:21
20+
>--------<
21+
0| struct aaa { int bbb; };
22+
23+
[#2 Removal] = 0:12-0:22
24+
>----------<
25+
0| struct aaa { int bbb; };
26+
27+
[#2 Domain] = 0:11-0:23
28+
>------------<
29+
0| struct aaa { int bbb; };
30+
31+
[#2 Insertion delimiter] = " "
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
typedef struct { int fff; } ggg;
2+
---
3+
4+
[#1 Content] = 0:17-0:25
5+
>--------<
6+
0| typedef struct { int fff; } ggg;
7+
8+
[#1 Removal] = 0:16-0:26
9+
>----------<
10+
0| typedef struct { int fff; } ggg;
11+
12+
[#1 Domain] = 0:0-0:32
13+
>--------------------------------<
14+
0| typedef struct { int fff; } ggg;
15+
16+
[#1 Insertion delimiter] = " "
17+
18+
19+
[#2 Content] = 0:17-0:25
20+
>--------<
21+
0| typedef struct { int fff; } ggg;
22+
23+
[#2 Removal] = 0:16-0:26
24+
>----------<
25+
0| typedef struct { int fff; } ggg;
26+
27+
[#2 Domain] = 0:15-0:27
28+
>------------<
29+
0| typedef struct { int fff; } ggg;
30+
31+
[#2 Insertion delimiter] = " "
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
union bbb { int ccc; };
2+
---
3+
4+
[#1 Content] = 0:12-0:20
5+
>--------<
6+
0| union bbb { int ccc; };
7+
8+
[#1 Removal] = 0:11-0:21
9+
>----------<
10+
0| union bbb { int ccc; };
11+
12+
[#1 Domain] = 0:0-0:23
13+
>-----------------------<
14+
0| union bbb { int ccc; };
15+
16+
[#1 Insertion delimiter] = " "
17+
18+
19+
[#2 Content] = 0:12-0:20
20+
>--------<
21+
0| union bbb { int ccc; };
22+
23+
[#2 Removal] = 0:11-0:21
24+
>----------<
25+
0| union bbb { int ccc; };
26+
27+
[#2 Domain] = 0:10-0:22
28+
>------------<
29+
0| union bbb { int ccc; };
30+
31+
[#2 Insertion delimiter] = " "
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
typedef union { int hhh; } iii;
2+
---
3+
4+
[#1 Content] = 0:16-0:24
5+
>--------<
6+
0| typedef union { int hhh; } iii;
7+
8+
[#1 Removal] = 0:15-0:25
9+
>----------<
10+
0| typedef union { int hhh; } iii;
11+
12+
[#1 Domain] = 0:0-0:31
13+
>-------------------------------<
14+
0| typedef union { int hhh; } iii;
15+
16+
[#1 Insertion delimiter] = " "
17+
18+
19+
[#2 Content] = 0:16-0:24
20+
>--------<
21+
0| typedef union { int hhh; } iii;
22+
23+
[#2 Removal] = 0:15-0:25
24+
>----------<
25+
0| typedef union { int hhh; } iii;
26+
27+
[#2 Domain] = 0:14-0:26
28+
>------------<
29+
0| typedef union { int hhh; } iii;
30+
31+
[#2 Insertion delimiter] = " "
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
enum ccc { ddd, eee };
2+
---
3+
4+
[#1 Content] = 0:11-0:19
5+
>--------<
6+
0| enum ccc { ddd, eee };
7+
8+
[#1 Removal] = 0:10-0:20
9+
>----------<
10+
0| enum ccc { ddd, eee };
11+
12+
[#1 Domain] = 0:0-0:22
13+
>----------------------<
14+
0| enum ccc { ddd, eee };
15+
16+
[#1 Insertion delimiter] = " "
17+
18+
19+
[#2 Content] = 0:11-0:19
20+
>--------<
21+
0| enum ccc { ddd, eee };
22+
23+
[#2 Removal] = 0:10-0:20
24+
>----------<
25+
0| enum ccc { ddd, eee };
26+
27+
[#2 Domain] = 0:9-0:21
28+
>------------<
29+
0| enum ccc { ddd, eee };
30+
31+
[#2 Insertion delimiter] = " "
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
typedef enum { jjj, kkk } lll;
2+
---
3+
4+
[#1 Content] = 0:15-0:23
5+
>--------<
6+
0| typedef enum { jjj, kkk } lll;
7+
8+
[#1 Removal] = 0:14-0:24
9+
>----------<
10+
0| typedef enum { jjj, kkk } lll;
11+
12+
[#1 Domain] = 0:0-0:30
13+
>------------------------------<
14+
0| typedef enum { jjj, kkk } lll;
15+
16+
[#1 Insertion delimiter] = " "
17+
18+
19+
[#2 Content] = 0:15-0:23
20+
>--------<
21+
0| typedef enum { jjj, kkk } lll;
22+
23+
[#2 Removal] = 0:14-0:24
24+
>----------<
25+
0| typedef enum { jjj, kkk } lll;
26+
27+
[#2 Domain] = 0:13-0:25
28+
>------------<
29+
0| typedef enum { jjj, kkk } lll;
30+
31+
[#2 Insertion delimiter] = " "
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
void foo() { }
2+
---
3+
4+
[#1 Content] =
5+
[#1 Removal] = 0:12-0:13
6+
>-<
7+
0| void foo() { }
8+
9+
[#1 Domain] = 0:0-0:14
10+
>--------------<
11+
0| void foo() { }
12+
13+
[#1 Insertion delimiter] = " "
14+
15+
16+
[#2 Content] =
17+
[#2 Removal] = 0:9-0:9
18+
><
19+
0| void foo() { }
20+
21+
[#2 Domain] = 0:8-0:10
22+
>--<
23+
0| void foo() { }
24+
25+
[#2 Insertion delimiter] = " "
26+
27+
28+
[#3 Content] =
29+
[#3 Removal] = 0:12-0:13
30+
>-<
31+
0| void foo() { }
32+
33+
[#3 Domain] = 0:11-0:14
34+
>---<
35+
0| void foo() { }
36+
37+
[#3 Insertion delimiter] = " "
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
void NS::foo() { }
2+
---
3+
4+
[#1 Content] =
5+
[#1 Removal] = 0:16-0:17
6+
>-<
7+
0| void NS::foo() { }
8+
9+
[#1 Domain] = 0:0-0:18
10+
>------------------<
11+
0| void NS::foo() { }
12+
13+
[#1 Insertion delimiter] = " "
14+
15+
16+
[#2 Content] =
17+
[#2 Removal] = 0:13-0:13
18+
><
19+
0| void NS::foo() { }
20+
21+
[#2 Domain] = 0:12-0:14
22+
>--<
23+
0| void NS::foo() { }
24+
25+
[#2 Insertion delimiter] = " "
26+
27+
28+
[#3 Content] =
29+
[#3 Removal] = 0:16-0:17
30+
>-<
31+
0| void NS::foo() { }
32+
33+
[#3 Domain] = 0:15-0:18
34+
>---<
35+
0| void NS::foo() { }
36+
37+
[#3 Insertion delimiter] = " "
Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
if (true) { }
2+
else if (false) { }
3+
else { }
4+
---
5+
6+
[#1 Content] =
7+
[#1 Removal] = 0:11-0:12
8+
>-<
9+
0| if (true) { }
10+
11+
[#1 Domain] = 0:0-0:13
12+
>-------------<
13+
0| if (true) { }
14+
15+
[#1 Insertion delimiter] = " "
16+
17+
18+
[#2 Content] =
19+
[#2 Removal] = 0:4-0:8
20+
>----<
21+
0| if (true) { }
22+
23+
[#2 Domain] = 0:3-0:9
24+
>------<
25+
0| if (true) { }
26+
27+
[#2 Insertion delimiter] = " "
28+
29+
30+
[#3 Content] =
31+
[#3 Removal] = 0:11-0:12
32+
>-<
33+
0| if (true) { }
34+
35+
[#3 Domain] = 0:10-0:13
36+
>---<
37+
0| if (true) { }
38+
39+
[#3 Insertion delimiter] = " "
40+
41+
42+
[#4 Content] =
43+
[#4 Removal] = 1:17-1:18
44+
>-<
45+
1| else if (false) { }
46+
47+
[#4 Domain] = 1:0-1:19
48+
>-------------------<
49+
1| else if (false) { }
50+
51+
[#4 Insertion delimiter] = " "
52+
53+
54+
[#5 Content] =
55+
[#5 Removal] = 1:9-1:14
56+
>-----<
57+
1| else if (false) { }
58+
59+
[#5 Domain] = 1:8-1:15
60+
>-------<
61+
1| else if (false) { }
62+
63+
[#5 Insertion delimiter] = " "
64+
65+
66+
[#6 Content] =
67+
[#6 Removal] = 1:17-1:18
68+
>-<
69+
1| else if (false) { }
70+
71+
[#6 Domain] = 1:16-1:19
72+
>---<
73+
1| else if (false) { }
74+
75+
[#6 Insertion delimiter] = " "
76+
77+
78+
[#7 Content] =
79+
[#7 Removal] = 2:6-2:7
80+
>-<
81+
2| else { }
82+
83+
[#7 Domain] = 2:0-2:8
84+
>--------<
85+
2| else { }
86+
87+
[#7 Insertion delimiter] = " "
88+
89+
90+
[#8 Content] =
91+
[#8 Removal] = 2:6-2:7
92+
>-<
93+
2| else { }
94+
95+
[#8 Domain] = 2:5-2:8
96+
>---<
97+
2| else { }
98+
99+
[#8 Insertion delimiter] = " "

0 commit comments

Comments
 (0)