Skip to content

Commit bce8067

Browse files
branch.ternary
1 parent c08f567 commit bce8067

28 files changed

+167
-100
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
true ? 0 : 1;
2+
---
3+
4+
[Range] =
5+
[Domain] = 0:0-0:12
6+
>------------<
7+
0| true ? 0 : 1;
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
true ? 0 : 1;
2+
---
3+
4+
[Range] =
5+
[Domain] = 0:0-0:12
6+
>------------<
7+
0| true ? 0 : 1;
Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,37 @@
1-
value ? 1 : 2;
1+
true ? 0 : 1;
22
---
33

44
[#1 Content] =
5-
[#1 Domain] = 0:8-0:9
6-
>-<
7-
0| value ? 1 : 2;
5+
[#1 Domain] = 0:7-0:8
6+
>-<
7+
0| true ? 0 : 1;
88

9-
[#1 Removal] = 0:8-0:10
10-
>--<
11-
0| value ? 1 : 2;
9+
[#1 Removal] = 0:7-0:9
10+
>--<
11+
0| true ? 0 : 1;
1212

13-
[#1 Leading delimiter] = 0:7-0:8
14-
>-<
15-
0| value ? 1 : 2;
13+
[#1 Leading delimiter] = 0:6-0:7
14+
>-<
15+
0| true ? 0 : 1;
1616

17-
[#1 Trailing delimiter] = 0:9-0:10
18-
>-<
19-
0| value ? 1 : 2;
17+
[#1 Trailing delimiter] = 0:8-0:9
18+
>-<
19+
0| true ? 0 : 1;
2020

2121
[#1 Insertion delimiter] = "\n"
2222

2323

2424
[#2 Content] =
25-
[#2 Domain] = 0:12-0:13
26-
>-<
27-
0| value ? 1 : 2;
25+
[#2 Domain] = 0:11-0:12
26+
>-<
27+
0| true ? 0 : 1;
2828

29-
[#2 Removal] = 0:11-0:13
30-
>--<
31-
0| value ? 1 : 2;
29+
[#2 Removal] = 0:10-0:12
30+
>--<
31+
0| true ? 0 : 1;
3232

33-
[#2 Leading delimiter] = 0:11-0:12
34-
>-<
35-
0| value ? 1 : 2;
33+
[#2 Leading delimiter] = 0:10-0:11
34+
>-<
35+
0| true ? 0 : 1;
3636

3737
[#2 Insertion delimiter] = "\n"
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
true ? 0 : 1;
2+
---
3+
4+
[Range] =
5+
[Domain] = 0:0-0:12
6+
>------------<
7+
0| true ? 0 : 1;
Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,37 @@
1-
value != null ? value : -1;
1+
true ? 0 : 1;
22
---
33

44
[#1 Content] =
5-
[#1 Domain] = 0:16-0:21
6-
>-----<
7-
0| value != null ? value : -1;
5+
[#1 Domain] = 0:7-0:8
6+
>-<
7+
0| true ? 0 : 1;
88

9-
[#1 Removal] = 0:16-0:22
10-
>------<
11-
0| value != null ? value : -1;
9+
[#1 Removal] = 0:7-0:9
10+
>--<
11+
0| true ? 0 : 1;
1212

13-
[#1 Leading delimiter] = 0:15-0:16
14-
>-<
15-
0| value != null ? value : -1;
13+
[#1 Leading delimiter] = 0:6-0:7
14+
>-<
15+
0| true ? 0 : 1;
1616

17-
[#1 Trailing delimiter] = 0:21-0:22
18-
>-<
19-
0| value != null ? value : -1;
17+
[#1 Trailing delimiter] = 0:8-0:9
18+
>-<
19+
0| true ? 0 : 1;
2020

2121
[#1 Insertion delimiter] = "\n"
2222

2323

2424
[#2 Content] =
25-
[#2 Domain] = 0:24-0:26
26-
>--<
27-
0| value != null ? value : -1;
25+
[#2 Domain] = 0:11-0:12
26+
>-<
27+
0| true ? 0 : 1;
2828

29-
[#2 Removal] = 0:23-0:26
30-
>---<
31-
0| value != null ? value : -1;
29+
[#2 Removal] = 0:10-0:12
30+
>--<
31+
0| true ? 0 : 1;
3232

33-
[#2 Leading delimiter] = 0:23-0:24
34-
>-<
35-
0| value != null ? value : -1;
33+
[#2 Leading delimiter] = 0:10-0:11
34+
>-<
35+
0| true ? 0 : 1;
3636

3737
[#2 Insertion delimiter] = "\n"
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
true ? 0 : 1
2+
---
3+
4+
[Range] =
5+
[Domain] = 0:0-0:12
6+
>------------<
7+
0| true ? 0 : 1
Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,37 @@
1-
aaa ? bbb : ccc;
1+
true ? 0 : 1
22
---
33

44
[#1 Content] =
5-
[#1 Domain] = 0:6-0:9
6-
>---<
7-
0| aaa ? bbb : ccc;
5+
[#1 Domain] = 0:7-0:8
6+
>-<
7+
0| true ? 0 : 1
88

9-
[#1 Removal] = 0:6-0:10
10-
>----<
11-
0| aaa ? bbb : ccc;
9+
[#1 Removal] = 0:7-0:9
10+
>--<
11+
0| true ? 0 : 1
1212

13-
[#1 Leading delimiter] = 0:5-0:6
14-
>-<
15-
0| aaa ? bbb : ccc;
13+
[#1 Leading delimiter] = 0:6-0:7
14+
>-<
15+
0| true ? 0 : 1
1616

17-
[#1 Trailing delimiter] = 0:9-0:10
18-
>-<
19-
0| aaa ? bbb : ccc;
17+
[#1 Trailing delimiter] = 0:8-0:9
18+
>-<
19+
0| true ? 0 : 1
2020

2121
[#1 Insertion delimiter] = "\n"
2222

2323

2424
[#2 Content] =
25-
[#2 Domain] = 0:12-0:15
26-
>---<
27-
0| aaa ? bbb : ccc;
25+
[#2 Domain] = 0:11-0:12
26+
>-<
27+
0| true ? 0 : 1
2828

29-
[#2 Removal] = 0:11-0:15
30-
>----<
31-
0| aaa ? bbb : ccc;
29+
[#2 Removal] = 0:10-0:12
30+
>--<
31+
0| true ? 0 : 1
3232

33-
[#2 Leading delimiter] = 0:11-0:12
34-
>-<
35-
0| aaa ? bbb : ccc;
33+
[#2 Leading delimiter] = 0:10-0:11
34+
>-<
35+
0| true ? 0 : 1
3636

3737
[#2 Insertion delimiter] = "\n"
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
0 if True else 1
2+
---
3+
4+
[Range] =
5+
[Domain] = 0:0-0:16
6+
>----------------<
7+
0| 0 if True else 1
Lines changed: 19 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,33 @@
1-
aaa = bbb if ccc else ddd
1+
0 if True else 1
22
---
33

44
[#1 Content] =
5-
[#1 Domain] = 0:6-0:9
6-
>---<
7-
0| aaa = bbb if ccc else ddd
5+
[#1 Domain] = 0:0-0:1
6+
>-<
7+
0| 0 if True else 1
88

9-
[#1 Removal] = 0:6-0:10
10-
>----<
11-
0| aaa = bbb if ccc else ddd
9+
[#1 Removal] = 0:0-0:2
10+
>--<
11+
0| 0 if True else 1
1212

13-
[#1 Leading delimiter] = 0:5-0:6
14-
>-<
15-
0| aaa = bbb if ccc else ddd
16-
17-
[#1 Trailing delimiter] = 0:9-0:10
18-
>-<
19-
0| aaa = bbb if ccc else ddd
13+
[#1 Trailing delimiter] = 0:1-0:2
14+
>-<
15+
0| 0 if True else 1
2016

2117
[#1 Insertion delimiter] = "\n"
2218

2319

2420
[#2 Content] =
25-
[#2 Domain] = 0:22-0:25
26-
>---<
27-
0| aaa = bbb if ccc else ddd
21+
[#2 Domain] = 0:15-0:16
22+
>-<
23+
0| 0 if True else 1
2824

29-
[#2 Removal] = 0:21-0:25
30-
>----<
31-
0| aaa = bbb if ccc else ddd
25+
[#2 Removal] = 0:14-0:16
26+
>--<
27+
0| 0 if True else 1
3228

33-
[#2 Leading delimiter] = 0:21-0:22
34-
>-<
35-
0| aaa = bbb if ccc else ddd
29+
[#2 Leading delimiter] = 0:14-0:15
30+
>-<
31+
0| 0 if True else 1
3632

3733
[#2 Insertion delimiter] = "\n"

packages/common/src/scopeSupportFacets/c.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ export const cCoreScopeSupport: LanguageScopeSupportFacetMap = {
5252
"branch.switchCase": supported,
5353
"branch.switchCase.iteration": supported,
5454
"branch.ternary": supported,
55-
"branch.loop": supported,
55+
"branch.ternary.iteration": supported,
5656

5757
"comment.line": supported,
5858
"comment.block": supported,
@@ -185,6 +185,8 @@ export const cCoreScopeSupport: LanguageScopeSupportFacetMap = {
185185
"value.yield": notApplicable,
186186
"value.field": notApplicable,
187187
"interior.static": notApplicable,
188+
"branch.loop": notApplicable,
189+
"branch.loop.iteration": notApplicable,
188190
environment: notApplicable,
189191
pairDelimiter: notApplicable,
190192
regularExpression: notApplicable,

0 commit comments

Comments
 (0)