diff --git a/data/fixtures/scopes/c/branch.loop.scope b/data/fixtures/scopes/c/branch.loop.scope
deleted file mode 100644
index b17e514454..0000000000
--- a/data/fixtures/scopes/c/branch.loop.scope
+++ /dev/null
@@ -1,10 +0,0 @@
-for (int i = 0; i < size; ++i) {}
----
-
-[Content] =
-[Removal] =
-[Domain] = 0:0-0:33
- >---------------------------------<
-0| for (int i = 0; i < size; ++i) {}
-
-[Insertion delimiter] = "\n"
diff --git a/data/fixtures/scopes/c/branch.loop2.scope b/data/fixtures/scopes/c/branch.loop2.scope
deleted file mode 100644
index 5aaf57be8f..0000000000
--- a/data/fixtures/scopes/c/branch.loop2.scope
+++ /dev/null
@@ -1,10 +0,0 @@
-while (true) {}
----
-
-[Content] =
-[Removal] =
-[Domain] = 0:0-0:15
- >---------------<
-0| while (true) {}
-
-[Insertion delimiter] = "\n"
diff --git a/data/fixtures/scopes/c/branch.loop3.scope b/data/fixtures/scopes/c/branch.loop3.scope
deleted file mode 100644
index e1e74c9153..0000000000
--- a/data/fixtures/scopes/c/branch.loop3.scope
+++ /dev/null
@@ -1,10 +0,0 @@
-do {} while (true);
----
-
-[Content] =
-[Removal] =
-[Domain] = 0:0-0:19
- >-------------------<
-0| do {} while (true);
-
-[Insertion delimiter] = "\n"
diff --git a/data/fixtures/scopes/c/branch.ternary.iteration.scope b/data/fixtures/scopes/c/branch.ternary.iteration.scope
new file mode 100644
index 0000000000..7c4fa798f9
--- /dev/null
+++ b/data/fixtures/scopes/c/branch.ternary.iteration.scope
@@ -0,0 +1,7 @@
+true ? 0 : 1;
+---
+
+[Range] =
+[Domain] = 0:0-0:12
+ >------------<
+0| true ? 0 : 1;
diff --git a/data/fixtures/scopes/cpp/interior.namespace.scope b/data/fixtures/scopes/cpp/interior.namespace.scope
index a1ad98ebff..1f9153248c 100644
--- a/data/fixtures/scopes/cpp/interior.namespace.scope
+++ b/data/fixtures/scopes/cpp/interior.namespace.scope
@@ -1,25 +1,25 @@
-namespace NS { }
+namespace Foo { }
---
[#1 Content] =
-[#1 Removal] = 0:14-0:15
- >-<
-0| namespace NS { }
+[#1 Removal] = 0:15-0:16
+ >-<
+0| namespace Foo { }
-[#1 Domain] = 0:0-0:16
- >----------------<
-0| namespace NS { }
+[#1 Domain] = 0:0-0:17
+ >-----------------<
+0| namespace Foo { }
[#1 Insertion delimiter] = " "
[#2 Content] =
-[#2 Removal] = 0:14-0:15
- >-<
-0| namespace NS { }
+[#2 Removal] = 0:15-0:16
+ >-<
+0| namespace Foo { }
-[#2 Domain] = 0:13-0:16
- >---<
-0| namespace NS { }
+[#2 Domain] = 0:14-0:17
+ >---<
+0| namespace Foo { }
[#2 Insertion delimiter] = " "
diff --git a/data/fixtures/scopes/cpp/name.class.scope b/data/fixtures/scopes/cpp/name.class.scope
index e7b4b10ca4..d7fe067187 100644
--- a/data/fixtures/scopes/cpp/name.class.scope
+++ b/data/fixtures/scopes/cpp/name.class.scope
@@ -1,48 +1,24 @@
-class aaa {};
-enum class ccc {};
+class Foo {};
---
-[#1 Content] = 0:6-0:9
+[Content] = 0:6-0:9
>---<
-0| class aaa {};
+0| class Foo {};
-[#1 Removal] = 0:6-0:10
+[Removal] = 0:6-0:10
>----<
-0| class aaa {};
+0| class Foo {};
-[#1 Leading delimiter] = 0:5-0:6
+[Leading delimiter] = 0:5-0:6
>-<
-0| class aaa {};
+0| class Foo {};
-[#1 Trailing delimiter] = 0:9-0:10
+[Trailing delimiter] = 0:9-0:10
>-<
-0| class aaa {};
+0| class Foo {};
-[#1 Domain] = 0:0-0:13
+[Domain] = 0:0-0:13
>-------------<
-0| class aaa {};
+0| class Foo {};
-[#1 Insertion delimiter] = " "
-
-
-[#2 Content] = 1:11-1:14
- >---<
-1| enum class ccc {};
-
-[#2 Removal] = 1:11-1:15
- >----<
-1| enum class ccc {};
-
-[#2 Leading delimiter] = 1:10-1:11
- >-<
-1| enum class ccc {};
-
-[#2 Trailing delimiter] = 1:14-1:15
- >-<
-1| enum class ccc {};
-
-[#2 Domain] = 1:0-1:18
- >------------------<
-1| enum class ccc {};
-
-[#2 Insertion delimiter] = " "
+[Insertion delimiter] = " "
diff --git a/data/fixtures/scopes/cpp/name.class2.scope b/data/fixtures/scopes/cpp/name.class2.scope
new file mode 100644
index 0000000000..c6442bcc97
--- /dev/null
+++ b/data/fixtures/scopes/cpp/name.class2.scope
@@ -0,0 +1,24 @@
+enum class Foo {};
+---
+
+[Content] = 0:11-0:14
+ >---<
+0| enum class Foo {};
+
+[Removal] = 0:11-0:15
+ >----<
+0| enum class Foo {};
+
+[Leading delimiter] = 0:10-0:11
+ >-<
+0| enum class Foo {};
+
+[Trailing delimiter] = 0:14-0:15
+ >-<
+0| enum class Foo {};
+
+[Domain] = 0:0-0:18
+ >------------------<
+0| enum class Foo {};
+
+[Insertion delimiter] = " "
diff --git a/data/fixtures/scopes/cpp/name.namespace.scope b/data/fixtures/scopes/cpp/name.namespace.scope
new file mode 100644
index 0000000000..12f853ed95
--- /dev/null
+++ b/data/fixtures/scopes/cpp/name.namespace.scope
@@ -0,0 +1,24 @@
+namespace Foo { }
+---
+
+[Content] = 0:10-0:13
+ >---<
+0| namespace Foo { }
+
+[Removal] = 0:10-0:14
+ >----<
+0| namespace Foo { }
+
+[Leading delimiter] = 0:9-0:10
+ >-<
+0| namespace Foo { }
+
+[Trailing delimiter] = 0:13-0:14
+ >-<
+0| namespace Foo { }
+
+[Domain] = 0:0-0:17
+ >-----------------<
+0| namespace Foo { }
+
+[Insertion delimiter] = " "
diff --git a/data/fixtures/scopes/cpp/value.return.lambda.scope b/data/fixtures/scopes/cpp/value.return.lambda.scope
deleted file mode 100644
index a7a8d0d82c..0000000000
--- a/data/fixtures/scopes/cpp/value.return.lambda.scope
+++ /dev/null
@@ -1,22 +0,0 @@
-[]() {
- return 0;
-}
----
-
-[Content] = 1:11-1:12
- >-<
-1| return 0;
-
-[Removal] = 1:10-1:12
- >--<
-1| return 0;
-
-[Leading delimiter] = 1:10-1:11
- >-<
-1| return 0;
-
-[Domain] = 1:4-1:13
- >---------<
-1| return 0;
-
-[Insertion delimiter] = " "
diff --git a/data/fixtures/scopes/csharp/branch.loop.scope b/data/fixtures/scopes/csharp/branch.loop.scope
deleted file mode 100644
index 993264e193..0000000000
--- a/data/fixtures/scopes/csharp/branch.loop.scope
+++ /dev/null
@@ -1,10 +0,0 @@
-while (true) { }
----
-
-[Content] =
-[Removal] =
-[Domain] = 0:0-0:16
- >----------------<
-0| while (true) { }
-
-[Insertion delimiter] = "\n"
diff --git a/data/fixtures/scopes/csharp/branch.loop2.scope b/data/fixtures/scopes/csharp/branch.loop2.scope
deleted file mode 100644
index de7560026d..0000000000
--- a/data/fixtures/scopes/csharp/branch.loop2.scope
+++ /dev/null
@@ -1,10 +0,0 @@
-do { } while (true);
----
-
-[Content] =
-[Removal] =
-[Domain] = 0:0-0:20
- >--------------------<
-0| do { } while (true);
-
-[Insertion delimiter] = "\n"
diff --git a/data/fixtures/scopes/csharp/branch.loop3.scope b/data/fixtures/scopes/csharp/branch.loop3.scope
deleted file mode 100644
index 2d18232ba5..0000000000
--- a/data/fixtures/scopes/csharp/branch.loop3.scope
+++ /dev/null
@@ -1,10 +0,0 @@
-for (int i = 0; i < size; ++i) { }
----
-
-[Content] =
-[Removal] =
-[Domain] = 0:0-0:34
- >----------------------------------<
-0| for (int i = 0; i < size; ++i) { }
-
-[Insertion delimiter] = "\n"
diff --git a/data/fixtures/scopes/csharp/branch.loop4.scope b/data/fixtures/scopes/csharp/branch.loop4.scope
deleted file mode 100644
index 8ccc856579..0000000000
--- a/data/fixtures/scopes/csharp/branch.loop4.scope
+++ /dev/null
@@ -1,10 +0,0 @@
-foreach (int v in values) { }
----
-
-[Content] =
-[Removal] =
-[Domain] = 0:0-0:29
- >-----------------------------<
-0| foreach (int v in values) { }
-
-[Insertion delimiter] = "\n"
diff --git a/data/fixtures/scopes/csharp/branch.ternary.iteration.scope b/data/fixtures/scopes/csharp/branch.ternary.iteration.scope
new file mode 100644
index 0000000000..7c4fa798f9
--- /dev/null
+++ b/data/fixtures/scopes/csharp/branch.ternary.iteration.scope
@@ -0,0 +1,7 @@
+true ? 0 : 1;
+---
+
+[Range] =
+[Domain] = 0:0-0:12
+ >------------<
+0| true ? 0 : 1;
diff --git a/data/fixtures/scopes/csharp/branch.ternary.scope b/data/fixtures/scopes/csharp/branch.ternary.scope
index d96d24ff5b..9d12750feb 100644
--- a/data/fixtures/scopes/csharp/branch.ternary.scope
+++ b/data/fixtures/scopes/csharp/branch.ternary.scope
@@ -1,37 +1,37 @@
-value ? 1 : 2;
+true ? 0 : 1;
---
[#1 Content] =
-[#1 Domain] = 0:8-0:9
- >-<
-0| value ? 1 : 2;
+[#1 Domain] = 0:7-0:8
+ >-<
+0| true ? 0 : 1;
-[#1 Removal] = 0:8-0:10
- >--<
-0| value ? 1 : 2;
+[#1 Removal] = 0:7-0:9
+ >--<
+0| true ? 0 : 1;
-[#1 Leading delimiter] = 0:7-0:8
- >-<
-0| value ? 1 : 2;
+[#1 Leading delimiter] = 0:6-0:7
+ >-<
+0| true ? 0 : 1;
-[#1 Trailing delimiter] = 0:9-0:10
- >-<
-0| value ? 1 : 2;
+[#1 Trailing delimiter] = 0:8-0:9
+ >-<
+0| true ? 0 : 1;
[#1 Insertion delimiter] = "\n"
[#2 Content] =
-[#2 Domain] = 0:12-0:13
- >-<
-0| value ? 1 : 2;
+[#2 Domain] = 0:11-0:12
+ >-<
+0| true ? 0 : 1;
-[#2 Removal] = 0:11-0:13
- >--<
-0| value ? 1 : 2;
+[#2 Removal] = 0:10-0:12
+ >--<
+0| true ? 0 : 1;
-[#2 Leading delimiter] = 0:11-0:12
- >-<
-0| value ? 1 : 2;
+[#2 Leading delimiter] = 0:10-0:11
+ >-<
+0| true ? 0 : 1;
[#2 Insertion delimiter] = "\n"
diff --git a/data/fixtures/scopes/csharp/condition.if.scope b/data/fixtures/scopes/csharp/condition.if.scope
index 1c6f3662ee..4f5ac14fc6 100644
--- a/data/fixtures/scopes/csharp/condition.if.scope
+++ b/data/fixtures/scopes/csharp/condition.if.scope
@@ -1,13 +1,30 @@
-if (1 < 5) { }
+if (true) {}
+else if (false) {}
+else {}
---
-[Content] =
-[Removal] = 0:4-0:9
- >-----<
-0| if (1 < 5) { }
+[#1 Content] =
+[#1 Removal] = 0:4-0:8
+ >----<
+0| if (true) {}
-[Domain] = 0:0-0:14
- >--------------<
-0| if (1 < 5) { }
+[#1 Domain] = 0:0-2:7
+ >------------
+0| if (true) {}
+1| else if (false) {}
+2| else {}
+ -------<
-[Insertion delimiter] = " "
+[#1 Insertion delimiter] = " "
+
+
+[#2 Content] =
+[#2 Removal] = 1:9-1:14
+ >-----<
+1| else if (false) {}
+
+[#2 Domain] = 1:0-1:18
+ >------------------<
+1| else if (false) {}
+
+[#2 Insertion delimiter] = " "
diff --git a/data/fixtures/scopes/csharp/value.return.lambda.scope b/data/fixtures/scopes/csharp/value.return.lambda.scope
index 0d759fd8d3..80775d6bf7 100644
--- a/data/fixtures/scopes/csharp/value.return.lambda.scope
+++ b/data/fixtures/scopes/csharp/value.return.lambda.scope
@@ -1,20 +1,20 @@
-() => 2;
+() => 0;
---
[Content] = 0:6-0:7
>-<
-0| () => 2;
+0| () => 0;
[Removal] = 0:5-0:7
>--<
-0| () => 2;
+0| () => 0;
[Leading delimiter] = 0:5-0:6
>-<
-0| () => 2;
+0| () => 0;
[Domain] = 0:0-0:7
>-------<
-0| () => 2;
+0| () => 0;
[Insertion delimiter] = " "
diff --git a/data/fixtures/scopes/csharp/value.return.lambda2.scope b/data/fixtures/scopes/csharp/value.return.lambda2.scope
deleted file mode 100644
index 5dc35f18ef..0000000000
--- a/data/fixtures/scopes/csharp/value.return.lambda2.scope
+++ /dev/null
@@ -1,22 +0,0 @@
-() => {
- return 2;
-};
----
-
-[Content] = 1:11-1:12
- >-<
-1| return 2;
-
-[Removal] = 1:10-1:12
- >--<
-1| return 2;
-
-[Leading delimiter] = 1:10-1:11
- >-<
-1| return 2;
-
-[Domain] = 1:4-1:13
- >---------<
-1| return 2;
-
-[Insertion delimiter] = " "
diff --git a/data/fixtures/scopes/css/selector.scope b/data/fixtures/scopes/css/selector.scope
new file mode 100644
index 0000000000..0a755d322b
--- /dev/null
+++ b/data/fixtures/scopes/css/selector.scope
@@ -0,0 +1,20 @@
+* {}
+---
+
+[Content] = 0:0-0:1
+ >-<
+0| * {}
+
+[Removal] = 0:0-0:2
+ >--<
+0| * {}
+
+[Trailing delimiter] = 0:1-0:2
+ >-<
+0| * {}
+
+[Domain] = 0:0-0:4
+ >----<
+0| * {}
+
+[Insertion delimiter] = " "
diff --git a/data/fixtures/scopes/css/selector2.scope b/data/fixtures/scopes/css/selector2.scope
new file mode 100644
index 0000000000..65b53db506
--- /dev/null
+++ b/data/fixtures/scopes/css/selector2.scope
@@ -0,0 +1,20 @@
+body {}
+---
+
+[Content] = 0:0-0:4
+ >----<
+0| body {}
+
+[Removal] = 0:0-0:5
+ >-----<
+0| body {}
+
+[Trailing delimiter] = 0:4-0:5
+ >-<
+0| body {}
+
+[Domain] = 0:0-0:7
+ >-------<
+0| body {}
+
+[Insertion delimiter] = " "
diff --git a/data/fixtures/scopes/css/selector3.scope b/data/fixtures/scopes/css/selector3.scope
new file mode 100644
index 0000000000..5bdf99f533
--- /dev/null
+++ b/data/fixtures/scopes/css/selector3.scope
@@ -0,0 +1,20 @@
+.foo {}
+---
+
+[Content] = 0:0-0:4
+ >----<
+0| .foo {}
+
+[Removal] = 0:0-0:5
+ >-----<
+0| .foo {}
+
+[Trailing delimiter] = 0:4-0:5
+ >-<
+0| .foo {}
+
+[Domain] = 0:0-0:7
+ >-------<
+0| .foo {}
+
+[Insertion delimiter] = " "
diff --git a/data/fixtures/scopes/css/selector4.scope b/data/fixtures/scopes/css/selector4.scope
new file mode 100644
index 0000000000..8e424f1012
--- /dev/null
+++ b/data/fixtures/scopes/css/selector4.scope
@@ -0,0 +1,20 @@
+#foo {}
+---
+
+[Content] = 0:0-0:4
+ >----<
+0| #foo {}
+
+[Removal] = 0:0-0:5
+ >-----<
+0| #foo {}
+
+[Trailing delimiter] = 0:4-0:5
+ >-<
+0| #foo {}
+
+[Domain] = 0:0-0:7
+ >-------<
+0| #foo {}
+
+[Insertion delimiter] = " "
diff --git a/data/fixtures/scopes/css/selector5.scope b/data/fixtures/scopes/css/selector5.scope
new file mode 100644
index 0000000000..8f366cc38e
--- /dev/null
+++ b/data/fixtures/scopes/css/selector5.scope
@@ -0,0 +1,20 @@
+body > div {}
+---
+
+[Content] = 0:0-0:10
+ >----------<
+0| body > div {}
+
+[Removal] = 0:0-0:11
+ >-----------<
+0| body > div {}
+
+[Trailing delimiter] = 0:10-0:11
+ >-<
+0| body > div {}
+
+[Domain] = 0:0-0:13
+ >-------------<
+0| body > div {}
+
+[Insertion delimiter] = " "
diff --git a/data/fixtures/scopes/css/selector6.scope b/data/fixtures/scopes/css/selector6.scope
new file mode 100644
index 0000000000..6f0ec790f5
--- /dev/null
+++ b/data/fixtures/scopes/css/selector6.scope
@@ -0,0 +1,20 @@
+#foo.bar {}
+---
+
+[Content] = 0:0-0:8
+ >--------<
+0| #foo.bar {}
+
+[Removal] = 0:0-0:9
+ >---------<
+0| #foo.bar {}
+
+[Trailing delimiter] = 0:8-0:9
+ >-<
+0| #foo.bar {}
+
+[Domain] = 0:0-0:11
+ >-----------<
+0| #foo.bar {}
+
+[Insertion delimiter] = " "
diff --git a/data/fixtures/scopes/css/selector7.scope b/data/fixtures/scopes/css/selector7.scope
new file mode 100644
index 0000000000..2a362c2279
--- /dev/null
+++ b/data/fixtures/scopes/css/selector7.scope
@@ -0,0 +1,20 @@
+div:hover {}
+---
+
+[Content] = 0:0-0:9
+ >---------<
+0| div:hover {}
+
+[Removal] = 0:0-0:10
+ >----------<
+0| div:hover {}
+
+[Trailing delimiter] = 0:9-0:10
+ >-<
+0| div:hover {}
+
+[Domain] = 0:0-0:12
+ >------------<
+0| div:hover {}
+
+[Insertion delimiter] = " "
diff --git a/data/fixtures/scopes/css/unit.scope b/data/fixtures/scopes/css/unit.scope
new file mode 100644
index 0000000000..082ba70e3d
--- /dev/null
+++ b/data/fixtures/scopes/css/unit.scope
@@ -0,0 +1,108 @@
+* {
+ padding: 25px 50px 75px 100px;
+}
+---
+
+[#1.1 Content] =
+[#1.1 Removal] = 1:15-1:17
+ >--<
+1| padding: 25px 50px 75px 100px;
+
+[#1.1 Trailing delimiter] = 1:17-1:18
+ >-<
+1| padding: 25px 50px 75px 100px;
+
+[#1.1 Insertion delimiter] = " "
+
+[#1.2 Content] =
+[#1.2 Removal] = 1:20-1:22
+ >--<
+1| padding: 25px 50px 75px 100px;
+
+[#1.2 Trailing delimiter] = 1:22-1:23
+ >-<
+1| padding: 25px 50px 75px 100px;
+
+[#1.2 Insertion delimiter] = " "
+
+[#1.3 Content] =
+[#1.3 Removal] = 1:25-1:27
+ >--<
+1| padding: 25px 50px 75px 100px;
+
+[#1.3 Trailing delimiter] = 1:27-1:28
+ >-<
+1| padding: 25px 50px 75px 100px;
+
+[#1.3 Insertion delimiter] = " "
+
+[#1.4 Content] =
+[#1.4 Removal] = 1:31-1:33
+ >--<
+1| padding: 25px 50px 75px 100px;
+
+[#1.4 Insertion delimiter] = " "
+
+[#1 Domain] = 1:4-1:34
+ >------------------------------<
+1| padding: 25px 50px 75px 100px;
+
+
+[#2 Content] =
+[#2 Removal] = 1:15-1:17
+ >--<
+1| padding: 25px 50px 75px 100px;
+
+[#2 Trailing delimiter] = 1:17-1:18
+ >-<
+1| padding: 25px 50px 75px 100px;
+
+[#2 Domain] = 1:13-1:17
+ >----<
+1| padding: 25px 50px 75px 100px;
+
+[#2 Insertion delimiter] = " "
+
+
+[#3 Content] =
+[#3 Removal] = 1:20-1:22
+ >--<
+1| padding: 25px 50px 75px 100px;
+
+[#3 Trailing delimiter] = 1:22-1:23
+ >-<
+1| padding: 25px 50px 75px 100px;
+
+[#3 Domain] = 1:18-1:22
+ >----<
+1| padding: 25px 50px 75px 100px;
+
+[#3 Insertion delimiter] = " "
+
+
+[#4 Content] =
+[#4 Removal] = 1:25-1:27
+ >--<
+1| padding: 25px 50px 75px 100px;
+
+[#4 Trailing delimiter] = 1:27-1:28
+ >-<
+1| padding: 25px 50px 75px 100px;
+
+[#4 Domain] = 1:23-1:27
+ >----<
+1| padding: 25px 50px 75px 100px;
+
+[#4 Insertion delimiter] = " "
+
+
+[#5 Content] =
+[#5 Removal] = 1:31-1:33
+ >--<
+1| padding: 25px 50px 75px 100px;
+
+[#5 Domain] = 1:28-1:33
+ >-----<
+1| padding: 25px 50px 75px 100px;
+
+[#5 Insertion delimiter] = " "
diff --git a/data/fixtures/scopes/css/unit2.scope b/data/fixtures/scopes/css/unit2.scope
new file mode 100644
index 0000000000..d82e7e3902
--- /dev/null
+++ b/data/fixtures/scopes/css/unit2.scope
@@ -0,0 +1,27 @@
+* {
+ padding: 10px;
+}
+---
+
+[#1 Content] =
+[#1 Removal] = 1:15-1:17
+ >--<
+1| padding: 10px;
+
+[#1 Domain] = 1:4-1:18
+ >--------------<
+1| padding: 10px;
+
+[#1 Insertion delimiter] = " "
+
+
+[#2 Content] =
+[#2 Removal] = 1:15-1:17
+ >--<
+1| padding: 10px;
+
+[#2 Domain] = 1:13-1:17
+ >----<
+1| padding: 10px;
+
+[#2 Insertion delimiter] = " "
diff --git a/data/fixtures/scopes/css/unit3.scope b/data/fixtures/scopes/css/unit3.scope
new file mode 100644
index 0000000000..ec9523cf24
--- /dev/null
+++ b/data/fixtures/scopes/css/unit3.scope
@@ -0,0 +1,27 @@
+* {
+ padding: 1rem;
+}
+---
+
+[#1 Content] =
+[#1 Removal] = 1:14-1:17
+ >---<
+1| padding: 1rem;
+
+[#1 Domain] = 1:4-1:18
+ >--------------<
+1| padding: 1rem;
+
+[#1 Insertion delimiter] = " "
+
+
+[#2 Content] =
+[#2 Removal] = 1:14-1:17
+ >---<
+1| padding: 1rem;
+
+[#2 Domain] = 1:13-1:17
+ >----<
+1| padding: 1rem;
+
+[#2 Insertion delimiter] = " "
diff --git a/data/fixtures/scopes/css/unit4.scope b/data/fixtures/scopes/css/unit4.scope
new file mode 100644
index 0000000000..8ddfa4361e
--- /dev/null
+++ b/data/fixtures/scopes/css/unit4.scope
@@ -0,0 +1,27 @@
+* {
+ padding: 1em;
+}
+---
+
+[#1 Content] =
+[#1 Removal] = 1:14-1:16
+ >--<
+1| padding: 1em;
+
+[#1 Domain] = 1:4-1:17
+ >-------------<
+1| padding: 1em;
+
+[#1 Insertion delimiter] = " "
+
+
+[#2 Content] =
+[#2 Removal] = 1:14-1:16
+ >--<
+1| padding: 1em;
+
+[#2 Domain] = 1:13-1:16
+ >---<
+1| padding: 1em;
+
+[#2 Insertion delimiter] = " "
diff --git a/data/fixtures/scopes/css/unit5.scope b/data/fixtures/scopes/css/unit5.scope
new file mode 100644
index 0000000000..6bc112d4cb
--- /dev/null
+++ b/data/fixtures/scopes/css/unit5.scope
@@ -0,0 +1,27 @@
+* {
+ padding: 50%;
+}
+---
+
+[#1 Content] =
+[#1 Removal] = 1:15-1:16
+ >-<
+1| padding: 50%;
+
+[#1 Domain] = 1:4-1:17
+ >-------------<
+1| padding: 50%;
+
+[#1 Insertion delimiter] = " "
+
+
+[#2 Content] =
+[#2 Removal] = 1:15-1:16
+ >-<
+1| padding: 50%;
+
+[#2 Domain] = 1:13-1:16
+ >---<
+1| padding: 50%;
+
+[#2 Insertion delimiter] = " "
diff --git a/data/fixtures/scopes/java/branch.loop.scope b/data/fixtures/scopes/java/branch.loop.scope
deleted file mode 100644
index 2d18232ba5..0000000000
--- a/data/fixtures/scopes/java/branch.loop.scope
+++ /dev/null
@@ -1,10 +0,0 @@
-for (int i = 0; i < size; ++i) { }
----
-
-[Content] =
-[Removal] =
-[Domain] = 0:0-0:34
- >----------------------------------<
-0| for (int i = 0; i < size; ++i) { }
-
-[Insertion delimiter] = "\n"
diff --git a/data/fixtures/scopes/java/branch.loop2.scope b/data/fixtures/scopes/java/branch.loop2.scope
deleted file mode 100644
index a7e3be936d..0000000000
--- a/data/fixtures/scopes/java/branch.loop2.scope
+++ /dev/null
@@ -1,10 +0,0 @@
-for (final int v : values) { }
----
-
-[Content] =
-[Removal] =
-[Domain] = 0:0-0:30
- >------------------------------<
-0| for (final int v : values) { }
-
-[Insertion delimiter] = "\n"
diff --git a/data/fixtures/scopes/java/branch.loop3.scope b/data/fixtures/scopes/java/branch.loop3.scope
deleted file mode 100644
index 5beb4d4731..0000000000
--- a/data/fixtures/scopes/java/branch.loop3.scope
+++ /dev/null
@@ -1,10 +0,0 @@
-while(true) { }
----
-
-[Content] =
-[Removal] =
-[Domain] = 0:0-0:15
- >---------------<
-0| while(true) { }
-
-[Insertion delimiter] = "\n"
diff --git a/data/fixtures/scopes/java/branch.loop4.scope b/data/fixtures/scopes/java/branch.loop4.scope
deleted file mode 100644
index 25f6d347bf..0000000000
--- a/data/fixtures/scopes/java/branch.loop4.scope
+++ /dev/null
@@ -1,10 +0,0 @@
-do { } while(true);
----
-
-[Content] =
-[Removal] =
-[Domain] = 0:0-0:19
- >-------------------<
-0| do { } while(true);
-
-[Insertion delimiter] = "\n"
diff --git a/data/fixtures/scopes/java/branch.ternary.iteration.scope b/data/fixtures/scopes/java/branch.ternary.iteration.scope
new file mode 100644
index 0000000000..7c4fa798f9
--- /dev/null
+++ b/data/fixtures/scopes/java/branch.ternary.iteration.scope
@@ -0,0 +1,7 @@
+true ? 0 : 1;
+---
+
+[Range] =
+[Domain] = 0:0-0:12
+ >------------<
+0| true ? 0 : 1;
diff --git a/data/fixtures/scopes/java/branch.ternary.scope b/data/fixtures/scopes/java/branch.ternary.scope
index 75fa5f5e2b..9d12750feb 100644
--- a/data/fixtures/scopes/java/branch.ternary.scope
+++ b/data/fixtures/scopes/java/branch.ternary.scope
@@ -1,37 +1,37 @@
-value != null ? value : -1;
+true ? 0 : 1;
---
[#1 Content] =
-[#1 Domain] = 0:16-0:21
- >-----<
-0| value != null ? value : -1;
+[#1 Domain] = 0:7-0:8
+ >-<
+0| true ? 0 : 1;
-[#1 Removal] = 0:16-0:22
- >------<
-0| value != null ? value : -1;
+[#1 Removal] = 0:7-0:9
+ >--<
+0| true ? 0 : 1;
-[#1 Leading delimiter] = 0:15-0:16
- >-<
-0| value != null ? value : -1;
+[#1 Leading delimiter] = 0:6-0:7
+ >-<
+0| true ? 0 : 1;
-[#1 Trailing delimiter] = 0:21-0:22
- >-<
-0| value != null ? value : -1;
+[#1 Trailing delimiter] = 0:8-0:9
+ >-<
+0| true ? 0 : 1;
[#1 Insertion delimiter] = "\n"
[#2 Content] =
-[#2 Domain] = 0:24-0:26
- >--<
-0| value != null ? value : -1;
+[#2 Domain] = 0:11-0:12
+ >-<
+0| true ? 0 : 1;
-[#2 Removal] = 0:23-0:26
- >---<
-0| value != null ? value : -1;
+[#2 Removal] = 0:10-0:12
+ >--<
+0| true ? 0 : 1;
-[#2 Leading delimiter] = 0:23-0:24
- >-<
-0| value != null ? value : -1;
+[#2 Leading delimiter] = 0:10-0:11
+ >-<
+0| true ? 0 : 1;
[#2 Insertion delimiter] = "\n"
diff --git a/data/fixtures/scopes/java/condition.if.scope b/data/fixtures/scopes/java/condition.if.scope
index b1ee077a52..4f5ac14fc6 100644
--- a/data/fixtures/scopes/java/condition.if.scope
+++ b/data/fixtures/scopes/java/condition.if.scope
@@ -1,13 +1,30 @@
-if (value != null) { }
+if (true) {}
+else if (false) {}
+else {}
---
-[Content] =
-[Removal] = 0:4-0:17
- >-------------<
-0| if (value != null) { }
+[#1 Content] =
+[#1 Removal] = 0:4-0:8
+ >----<
+0| if (true) {}
-[Domain] = 0:0-0:22
- >----------------------<
-0| if (value != null) { }
+[#1 Domain] = 0:0-2:7
+ >------------
+0| if (true) {}
+1| else if (false) {}
+2| else {}
+ -------<
-[Insertion delimiter] = " "
+[#1 Insertion delimiter] = " "
+
+
+[#2 Content] =
+[#2 Removal] = 1:9-1:14
+ >-----<
+1| else if (false) {}
+
+[#2 Domain] = 1:0-1:18
+ >------------------<
+1| else if (false) {}
+
+[#2 Insertion delimiter] = " "
diff --git a/data/fixtures/scopes/java/value.return.lambda.scope b/data/fixtures/scopes/java/value.return.lambda.scope
index 92aec8abee..c95330d977 100644
--- a/data/fixtures/scopes/java/value.return.lambda.scope
+++ b/data/fixtures/scopes/java/value.return.lambda.scope
@@ -1,20 +1,20 @@
-() -> 123
+() -> 0;
---
-[Content] = 0:6-0:9
- >---<
-0| () -> 123
+[Content] = 0:6-0:7
+ >-<
+0| () -> 0;
-[Removal] = 0:5-0:9
- >----<
-0| () -> 123
+[Removal] = 0:5-0:7
+ >--<
+0| () -> 0;
[Leading delimiter] = 0:5-0:6
>-<
-0| () -> 123
+0| () -> 0;
-[Domain] = 0:0-0:9
- >---------<
-0| () -> 123
+[Domain] = 0:0-0:7
+ >-------<
+0| () -> 0;
[Insertion delimiter] = " "
diff --git a/data/fixtures/scopes/javascript.core/branch.loop.scope b/data/fixtures/scopes/javascript.core/branch.loop.scope
deleted file mode 100644
index 2309add85a..0000000000
--- a/data/fixtures/scopes/javascript.core/branch.loop.scope
+++ /dev/null
@@ -1,10 +0,0 @@
-for (let i = 0; i < size; ++i) { }
----
-
-[Content] =
-[Removal] =
-[Domain] = 0:0-0:34
- >----------------------------------<
-0| for (let i = 0; i < size; ++i) { }
-
-[Insertion delimiter] = "\n"
diff --git a/data/fixtures/scopes/javascript.core/branch.loop2.scope b/data/fixtures/scopes/javascript.core/branch.loop2.scope
deleted file mode 100644
index 23da216aa5..0000000000
--- a/data/fixtures/scopes/javascript.core/branch.loop2.scope
+++ /dev/null
@@ -1,10 +0,0 @@
-for (const v of values) { }
----
-
-[Content] =
-[Removal] =
-[Domain] = 0:0-0:27
- >---------------------------<
-0| for (const v of values) { }
-
-[Insertion delimiter] = "\n"
diff --git a/data/fixtures/scopes/javascript.core/branch.loop3.scope b/data/fixtures/scopes/javascript.core/branch.loop3.scope
deleted file mode 100644
index 5beb4d4731..0000000000
--- a/data/fixtures/scopes/javascript.core/branch.loop3.scope
+++ /dev/null
@@ -1,10 +0,0 @@
-while(true) { }
----
-
-[Content] =
-[Removal] =
-[Domain] = 0:0-0:15
- >---------------<
-0| while(true) { }
-
-[Insertion delimiter] = "\n"
diff --git a/data/fixtures/scopes/javascript.core/branch.loop4.scope b/data/fixtures/scopes/javascript.core/branch.loop4.scope
deleted file mode 100644
index 25f6d347bf..0000000000
--- a/data/fixtures/scopes/javascript.core/branch.loop4.scope
+++ /dev/null
@@ -1,10 +0,0 @@
-do { } while(true);
----
-
-[Content] =
-[Removal] =
-[Domain] = 0:0-0:19
- >-------------------<
-0| do { } while(true);
-
-[Insertion delimiter] = "\n"
diff --git a/data/fixtures/scopes/javascript.core/branch.ternary.iteration.scope b/data/fixtures/scopes/javascript.core/branch.ternary.iteration.scope
new file mode 100644
index 0000000000..195e37b047
--- /dev/null
+++ b/data/fixtures/scopes/javascript.core/branch.ternary.iteration.scope
@@ -0,0 +1,7 @@
+true ? 0 : 1
+---
+
+[Range] =
+[Domain] = 0:0-0:12
+ >------------<
+0| true ? 0 : 1
diff --git a/data/fixtures/scopes/javascript.core/branch.ternary.scope b/data/fixtures/scopes/javascript.core/branch.ternary.scope
index 92e00b0f68..d52a64d3ee 100644
--- a/data/fixtures/scopes/javascript.core/branch.ternary.scope
+++ b/data/fixtures/scopes/javascript.core/branch.ternary.scope
@@ -1,37 +1,37 @@
-aaa ? bbb : ccc;
+true ? 0 : 1
---
[#1 Content] =
-[#1 Domain] = 0:6-0:9
- >---<
-0| aaa ? bbb : ccc;
+[#1 Domain] = 0:7-0:8
+ >-<
+0| true ? 0 : 1
-[#1 Removal] = 0:6-0:10
- >----<
-0| aaa ? bbb : ccc;
+[#1 Removal] = 0:7-0:9
+ >--<
+0| true ? 0 : 1
-[#1 Leading delimiter] = 0:5-0:6
- >-<
-0| aaa ? bbb : ccc;
+[#1 Leading delimiter] = 0:6-0:7
+ >-<
+0| true ? 0 : 1
-[#1 Trailing delimiter] = 0:9-0:10
- >-<
-0| aaa ? bbb : ccc;
+[#1 Trailing delimiter] = 0:8-0:9
+ >-<
+0| true ? 0 : 1
[#1 Insertion delimiter] = "\n"
[#2 Content] =
-[#2 Domain] = 0:12-0:15
- >---<
-0| aaa ? bbb : ccc;
+[#2 Domain] = 0:11-0:12
+ >-<
+0| true ? 0 : 1
-[#2 Removal] = 0:11-0:15
- >----<
-0| aaa ? bbb : ccc;
+[#2 Removal] = 0:10-0:12
+ >--<
+0| true ? 0 : 1
-[#2 Leading delimiter] = 0:11-0:12
- >-<
-0| aaa ? bbb : ccc;
+[#2 Leading delimiter] = 0:10-0:11
+ >-<
+0| true ? 0 : 1
[#2 Insertion delimiter] = "\n"
diff --git a/data/fixtures/scopes/javascript.core/condition.if.scope b/data/fixtures/scopes/javascript.core/condition.if.scope
index 6c1a02e37f..4f5ac14fc6 100644
--- a/data/fixtures/scopes/javascript.core/condition.if.scope
+++ b/data/fixtures/scopes/javascript.core/condition.if.scope
@@ -1,18 +1,30 @@
-if (true) {
-
-}
+if (true) {}
+else if (false) {}
+else {}
---
-[Content] =
-[Removal] = 0:4-0:8
+[#1 Content] =
+[#1 Removal] = 0:4-0:8
>----<
-0| if (true) {
+0| if (true) {}
+
+[#1 Domain] = 0:0-2:7
+ >------------
+0| if (true) {}
+1| else if (false) {}
+2| else {}
+ -------<
+
+[#1 Insertion delimiter] = " "
+
+
+[#2 Content] =
+[#2 Removal] = 1:9-1:14
+ >-----<
+1| else if (false) {}
-[Domain] = 0:0-2:1
- >-----------
-0| if (true) {
-1|
-2| }
- -<
+[#2 Domain] = 1:0-1:18
+ >------------------<
+1| else if (false) {}
-[Insertion delimiter] = " "
+[#2 Insertion delimiter] = " "
diff --git a/data/fixtures/scopes/python/branch.loop.iteration.scope b/data/fixtures/scopes/python/branch.loop.iteration.scope
new file mode 100644
index 0000000000..d18e9c41e4
--- /dev/null
+++ b/data/fixtures/scopes/python/branch.loop.iteration.scope
@@ -0,0 +1,14 @@
+while True:
+ pass
+else:
+ pass
+---
+
+[Range] =
+[Domain] = 0:0-3:8
+ >-----------
+0| while True:
+1| pass
+2| else:
+3| pass
+ --------<
diff --git a/data/fixtures/scopes/python/branch.loop.iteration2.scope b/data/fixtures/scopes/python/branch.loop.iteration2.scope
new file mode 100644
index 0000000000..56f8870a5a
--- /dev/null
+++ b/data/fixtures/scopes/python/branch.loop.iteration2.scope
@@ -0,0 +1,14 @@
+for v in values:
+ pass
+else:
+ pass
+---
+
+[Range] =
+[Domain] = 0:0-3:8
+ >----------------
+0| for v in values:
+1| pass
+2| else:
+3| pass
+ --------<
diff --git a/data/fixtures/scopes/python/branch.loop2.scope b/data/fixtures/scopes/python/branch.loop2.scope
index 39b2df2d04..2258b74d83 100644
--- a/data/fixtures/scopes/python/branch.loop2.scope
+++ b/data/fixtures/scopes/python/branch.loop2.scope
@@ -1,4 +1,4 @@
-for aaa in bbb:
+for v in values:
pass
else:
pass
@@ -6,14 +6,14 @@ else:
[#1 Content] =
[#1 Domain] = 0:0-1:8
- >---------------
-0| for aaa in bbb:
+ >----------------
+0| for v in values:
1| pass
--------<
[#1 Removal] = 0:0-2:0
- >---------------
-0| for aaa in bbb:
+ >----------------
+0| for v in values:
1| pass
2| else:
<
diff --git a/data/fixtures/scopes/python/branch.ternary.iteration.scope b/data/fixtures/scopes/python/branch.ternary.iteration.scope
new file mode 100644
index 0000000000..c902f61ed2
--- /dev/null
+++ b/data/fixtures/scopes/python/branch.ternary.iteration.scope
@@ -0,0 +1,7 @@
+0 if True else 1
+---
+
+[Range] =
+[Domain] = 0:0-0:16
+ >----------------<
+0| 0 if True else 1
diff --git a/data/fixtures/scopes/python/branch.ternary.scope b/data/fixtures/scopes/python/branch.ternary.scope
index ccd4db7038..e4623d2d08 100644
--- a/data/fixtures/scopes/python/branch.ternary.scope
+++ b/data/fixtures/scopes/python/branch.ternary.scope
@@ -1,37 +1,33 @@
-aaa = bbb if ccc else ddd
+0 if True else 1
---
[#1 Content] =
-[#1 Domain] = 0:6-0:9
- >---<
-0| aaa = bbb if ccc else ddd
+[#1 Domain] = 0:0-0:1
+ >-<
+0| 0 if True else 1
-[#1 Removal] = 0:6-0:10
- >----<
-0| aaa = bbb if ccc else ddd
+[#1 Removal] = 0:0-0:2
+ >--<
+0| 0 if True else 1
-[#1 Leading delimiter] = 0:5-0:6
- >-<
-0| aaa = bbb if ccc else ddd
-
-[#1 Trailing delimiter] = 0:9-0:10
- >-<
-0| aaa = bbb if ccc else ddd
+[#1 Trailing delimiter] = 0:1-0:2
+ >-<
+0| 0 if True else 1
[#1 Insertion delimiter] = "\n"
[#2 Content] =
-[#2 Domain] = 0:22-0:25
- >---<
-0| aaa = bbb if ccc else ddd
+[#2 Domain] = 0:15-0:16
+ >-<
+0| 0 if True else 1
-[#2 Removal] = 0:21-0:25
- >----<
-0| aaa = bbb if ccc else ddd
+[#2 Removal] = 0:14-0:16
+ >--<
+0| 0 if True else 1
-[#2 Leading delimiter] = 0:21-0:22
- >-<
-0| aaa = bbb if ccc else ddd
+[#2 Leading delimiter] = 0:14-0:15
+ >-<
+0| 0 if True else 1
[#2 Insertion delimiter] = "\n"
diff --git a/data/fixtures/scopes/python/condition.if.scope b/data/fixtures/scopes/python/condition.if.scope
index dca70c6da9..cc5072c278 100644
--- a/data/fixtures/scopes/python/condition.if.scope
+++ b/data/fixtures/scopes/python/condition.if.scope
@@ -1,23 +1,44 @@
-if value > 0:
- pass
+if True: pass
+elif False: pass
+else: pass
---
-[Content] = 0:3-0:12
- >---------<
-0| if value > 0:
+[#1 Content] = 0:3-0:7
+ >----<
+0| if True: pass
-[Removal] = 0:2-0:12
- >----------<
-0| if value > 0:
+[#1 Removal] = 0:2-0:7
+ >-----<
+0| if True: pass
-[Leading delimiter] = 0:2-0:3
+[#1 Leading delimiter] = 0:2-0:3
>-<
-0| if value > 0:
+0| if True: pass
-[Domain] = 0:0-1:8
+[#1 Domain] = 0:0-2:10
>-------------
-0| if value > 0:
-1| pass
- --------<
+0| if True: pass
+1| elif False: pass
+2| else: pass
+ ----------<
-[Insertion delimiter] = " "
+[#1 Insertion delimiter] = " "
+
+
+[#2 Content] = 1:5-1:10
+ >-----<
+1| elif False: pass
+
+[#2 Removal] = 1:4-1:10
+ >------<
+1| elif False: pass
+
+[#2 Leading delimiter] = 1:4-1:5
+ >-<
+1| elif False: pass
+
+[#2 Domain] = 1:0-1:16
+ >----------------<
+1| elif False: pass
+
+[#2 Insertion delimiter] = " "
diff --git a/data/fixtures/scopes/python/value.return.lambda.scope b/data/fixtures/scopes/python/value.return.lambda.scope
index 5d7701938a..885fbb5c78 100644
--- a/data/fixtures/scopes/python/value.return.lambda.scope
+++ b/data/fixtures/scopes/python/value.return.lambda.scope
@@ -1,20 +1,20 @@
-lambda: 123
+lambda: 0
---
-[Content] = 0:8-0:11
- >---<
-0| lambda: 123
+[Content] = 0:8-0:9
+ >-<
+0| lambda: 0
-[Removal] = 0:7-0:11
- >----<
-0| lambda: 123
+[Removal] = 0:7-0:9
+ >--<
+0| lambda: 0
[Leading delimiter] = 0:7-0:8
>-<
-0| lambda: 123
+0| lambda: 0
-[Domain] = 0:0-0:11
- >-----------<
-0| lambda: 123
+[Domain] = 0:0-0:9
+ >---------<
+0| lambda: 0
[Insertion delimiter] = " "
diff --git a/data/fixtures/scopes/scss/condition.if.scope b/data/fixtures/scopes/scss/condition.if.scope
index 2d5f851b07..acac443f85 100644
--- a/data/fixtures/scopes/scss/condition.if.scope
+++ b/data/fixtures/scopes/scss/condition.if.scope
@@ -1,52 +1,52 @@
-@if true { }
-@else if false { }
-@else { }
+@if true {}
+@else if false {}
+@else {}
---
[#1 Content] = 0:4-0:8
>----<
-0| @if true { }
+0| @if true {}
[#1 Removal] = 0:4-0:9
>-----<
-0| @if true { }
+0| @if true {}
[#1 Leading delimiter] = 0:3-0:4
>-<
-0| @if true { }
+0| @if true {}
[#1 Trailing delimiter] = 0:8-0:9
>-<
-0| @if true { }
+0| @if true {}
-[#1 Domain] = 0:0-2:9
- >------------
-0| @if true { }
-1| @else if false { }
-2| @else { }
- ---------<
+[#1 Domain] = 0:0-2:8
+ >-----------
+0| @if true {}
+1| @else if false {}
+2| @else {}
+ --------<
[#1 Insertion delimiter] = " "
[#2 Content] = 1:9-1:14
>-----<
-1| @else if false { }
+1| @else if false {}
[#2 Removal] = 1:9-1:15
>------<
-1| @else if false { }
+1| @else if false {}
[#2 Leading delimiter] = 1:8-1:9
>-<
-1| @else if false { }
+1| @else if false {}
[#2 Trailing delimiter] = 1:14-1:15
>-<
-1| @else if false { }
+1| @else if false {}
-[#2 Domain] = 1:0-1:18
- >------------------<
-1| @else if false { }
+[#2 Domain] = 1:0-1:17
+ >-----------------<
+1| @else if false {}
[#2 Insertion delimiter] = " "
diff --git a/packages/common/src/scopeSupportFacets/c.ts b/packages/common/src/scopeSupportFacets/c.ts
index 1fc7148381..ed9cdd8004 100644
--- a/packages/common/src/scopeSupportFacets/c.ts
+++ b/packages/common/src/scopeSupportFacets/c.ts
@@ -52,7 +52,7 @@ export const cCoreScopeSupport: LanguageScopeSupportFacetMap = {
"branch.switchCase": supported,
"branch.switchCase.iteration": supported,
"branch.ternary": supported,
- "branch.loop": supported,
+ "branch.ternary.iteration": supported,
"comment.line": supported,
"comment.block": supported,
@@ -184,10 +184,14 @@ export const cCoreScopeSupport: LanguageScopeSupportFacetMap = {
"value.attribute": notApplicable,
"value.yield": notApplicable,
"value.field": notApplicable,
+ "interior.static": notApplicable,
+ "branch.loop": notApplicable,
+ "branch.loop.iteration": notApplicable,
environment: notApplicable,
pairDelimiter: notApplicable,
regularExpression: notApplicable,
- "interior.static": notApplicable,
+ selector: notApplicable,
+ unit: notApplicable,
};
export const cScopeSupport: LanguageScopeSupportFacetMap = {
@@ -268,5 +272,6 @@ export const cScopeSupport: LanguageScopeSupportFacetMap = {
"type.typeArgument.iteration": notApplicable,
// Namespace
+ "name.namespace": notApplicable,
"interior.namespace": notApplicable,
};
diff --git a/packages/common/src/scopeSupportFacets/cpp.ts b/packages/common/src/scopeSupportFacets/cpp.ts
index 8b9186c484..66f765a7db 100644
--- a/packages/common/src/scopeSupportFacets/cpp.ts
+++ b/packages/common/src/scopeSupportFacets/cpp.ts
@@ -53,6 +53,7 @@ export const cppScopeSupport: LanguageScopeSupportFacetMap = {
"name.constructor": supported,
"name.foreach": supported,
"name.method": supported,
+ "name.namespace": supported,
"value.argument.formal": supported,
"value.argument.formal.iteration": supported,
@@ -61,7 +62,6 @@ export const cppScopeSupport: LanguageScopeSupportFacetMap = {
"value.argument.formal.constructor": supported,
"value.argument.formal.constructor.iteration": supported,
"value.foreach": supported,
- "value.return.lambda": supported,
"value.field": supported,
"type.argument.formal.method": supported,
@@ -82,4 +82,5 @@ export const cppScopeSupport: LanguageScopeSupportFacetMap = {
/* NOT APPLICABLE */
"interior.lambda.expression": notApplicable,
+ "value.return.lambda": notApplicable,
};
diff --git a/packages/common/src/scopeSupportFacets/csharp.ts b/packages/common/src/scopeSupportFacets/csharp.ts
index ecd5786241..86c4da63bc 100644
--- a/packages/common/src/scopeSupportFacets/csharp.ts
+++ b/packages/common/src/scopeSupportFacets/csharp.ts
@@ -46,7 +46,7 @@ export const csharpScopeSupport: LanguageScopeSupportFacetMap = {
"branch.switchCase": supported,
"branch.switchCase.iteration": supported,
"branch.ternary": supported,
- "branch.loop": supported,
+ "branch.ternary.iteration": supported,
"condition.for": supported,
"condition.while": supported,
@@ -239,10 +239,19 @@ export const csharpScopeSupport: LanguageScopeSupportFacetMap = {
"collectionItem.unenclosed.iteration": notApplicable,
"collectionItem.unenclosed": notApplicable,
+ // Namespace
+ "name.namespace": notApplicable,
+ "interior.namespace": notApplicable,
+
+ // Branch loop
+ "branch.loop": notApplicable,
+ "branch.loop.iteration": notApplicable,
+
// Miscellaneous
environment: notApplicable,
pairDelimiter: notApplicable,
regularExpression: notApplicable,
- "interior.namespace": notApplicable,
+ selector: notApplicable,
+ unit: notApplicable,
"interior.static": notApplicable,
};
diff --git a/packages/common/src/scopeSupportFacets/css.ts b/packages/common/src/scopeSupportFacets/css.ts
index 0e3f8122b7..87546b4a9b 100644
--- a/packages/common/src/scopeSupportFacets/css.ts
+++ b/packages/common/src/scopeSupportFacets/css.ts
@@ -37,6 +37,9 @@ export const cssScopeSupport: LanguageScopeSupportFacetMap = {
statement: supported,
"statement.iteration.document": supported,
+ selector: supported,
+ unit: supported,
+
// Not applicable
anonymousFunction: notApplicable,
@@ -74,9 +77,11 @@ export const cssScopeSupport: LanguageScopeSupportFacetMap = {
"branch.if.iteration": notApplicable,
"branch.if": notApplicable,
"branch.loop": notApplicable,
+ "branch.loop.iteration": notApplicable,
"branch.switchCase.iteration": notApplicable,
"branch.switchCase": notApplicable,
"branch.ternary": notApplicable,
+ "branch.ternary.iteration": notApplicable,
"branch.try.iteration": notApplicable,
"branch.try": notApplicable,
"class.iteration.block": notApplicable,
@@ -141,6 +146,7 @@ export const cssScopeSupport: LanguageScopeSupportFacetMap = {
"name.assignment.pattern": notApplicable,
"name.assignment": notApplicable,
"name.class": notApplicable,
+ "name.namespace": notApplicable,
"name.constructor": notApplicable,
"name.field": notApplicable,
"name.foreach": notApplicable,
diff --git a/packages/common/src/scopeSupportFacets/html.ts b/packages/common/src/scopeSupportFacets/html.ts
index ffc5cc201a..58818832fa 100644
--- a/packages/common/src/scopeSupportFacets/html.ts
+++ b/packages/common/src/scopeSupportFacets/html.ts
@@ -58,9 +58,11 @@ export const htmlScopeSupport: LanguageScopeSupportFacetMap = {
"branch.if.iteration": notApplicable,
"branch.if": notApplicable,
"branch.loop": notApplicable,
+ "branch.loop.iteration": notApplicable,
"branch.switchCase.iteration": notApplicable,
"branch.switchCase": notApplicable,
"branch.ternary": notApplicable,
+ "branch.ternary.iteration": notApplicable,
"branch.try.iteration": notApplicable,
"branch.try": notApplicable,
"class.iteration.block": notApplicable,
@@ -128,6 +130,7 @@ export const htmlScopeSupport: LanguageScopeSupportFacetMap = {
"name.resource": notApplicable,
"name.variable.pattern": notApplicable,
"name.variable": notApplicable,
+ "name.namespace": notApplicable,
"namedFunction.constructor": notApplicable,
"namedFunction.iteration.block": notApplicable,
"namedFunction.iteration.document": notApplicable,
@@ -202,4 +205,6 @@ export const htmlScopeSupport: LanguageScopeSupportFacetMap = {
section: notApplicable,
statement: notApplicable,
switchStatementSubject: notApplicable,
+ selector: notApplicable,
+ unit: notApplicable,
};
diff --git a/packages/common/src/scopeSupportFacets/java.ts b/packages/common/src/scopeSupportFacets/java.ts
index 31ddb5128f..3eec6e205e 100644
--- a/packages/common/src/scopeSupportFacets/java.ts
+++ b/packages/common/src/scopeSupportFacets/java.ts
@@ -48,11 +48,10 @@ export const javaScopeSupport: LanguageScopeSupportFacetMap = {
"branch.if.iteration": supported,
"branch.try": supported,
"branch.try.iteration": supported,
-
"branch.switchCase": supported,
"branch.switchCase.iteration": supported,
"branch.ternary": supported,
- "branch.loop": supported,
+ "branch.ternary.iteration": supported,
class: supported,
"class.iteration.block": supported,
@@ -241,10 +240,19 @@ export const javaScopeSupport: LanguageScopeSupportFacetMap = {
"type.resource.iteration": notApplicable,
"name.resource.iteration": notApplicable,
+ // Namespace
+ "name.namespace": notApplicable,
+ "interior.namespace": notApplicable,
+
+ // Branch loop
+ "branch.loop": notApplicable,
+ "branch.loop.iteration": notApplicable,
+
// Miscellaneous
"value.yield": notApplicable,
- "interior.namespace": notApplicable,
pairDelimiter: notApplicable,
regularExpression: notApplicable,
environment: notApplicable,
+ selector: notApplicable,
+ unit: notApplicable,
};
diff --git a/packages/common/src/scopeSupportFacets/javascript.ts b/packages/common/src/scopeSupportFacets/javascript.ts
index 0a5a0fa5de..63a4f750d3 100644
--- a/packages/common/src/scopeSupportFacets/javascript.ts
+++ b/packages/common/src/scopeSupportFacets/javascript.ts
@@ -102,7 +102,7 @@ export const javascriptCoreScopeSupport: LanguageScopeSupportFacetMap = {
"branch.switchCase": supported,
"branch.switchCase.iteration": supported,
"branch.ternary": supported,
- "branch.loop": supported,
+ "branch.ternary.iteration": supported,
"condition.if": supported,
"condition.while": supported,
@@ -208,9 +208,18 @@ export const javascriptCoreScopeSupport: LanguageScopeSupportFacetMap = {
"functionName.iteration.block": notApplicable,
"namedFunction.iteration.block": notApplicable,
+ // Namespace
+ "name.namespace": notApplicable,
+ "interior.namespace": notApplicable,
+
+ // Branch loop
+ "branch.loop": notApplicable,
+ "branch.loop.iteration": notApplicable,
+
// Miscellaneous
environment: notApplicable,
- "interior.namespace": notApplicable,
+ selector: notApplicable,
+ unit: notApplicable,
};
export const javascriptJsxScopeSupport: LanguageScopeSupportFacetMap = {
diff --git a/packages/common/src/scopeSupportFacets/json.ts b/packages/common/src/scopeSupportFacets/json.ts
index f3f97b43d2..d7d6930b97 100644
--- a/packages/common/src/scopeSupportFacets/json.ts
+++ b/packages/common/src/scopeSupportFacets/json.ts
@@ -63,9 +63,11 @@ export const jsonScopeSupport: LanguageScopeSupportFacetMap = {
"branch.if": notApplicable,
"branch.if.iteration": notApplicable,
"branch.loop": notApplicable,
+ "branch.loop.iteration": notApplicable,
"branch.switchCase": notApplicable,
"branch.switchCase.iteration": notApplicable,
"branch.ternary": notApplicable,
+ "branch.ternary.iteration": notApplicable,
"branch.try": notApplicable,
"branch.try.iteration": notApplicable,
class: notApplicable,
@@ -133,6 +135,7 @@ export const jsonScopeSupport: LanguageScopeSupportFacetMap = {
"name.assignment": notApplicable,
"name.assignment.pattern": notApplicable,
"name.class": notApplicable,
+ "name.namespace": notApplicable,
"name.constructor": notApplicable,
"name.field": notApplicable,
"name.foreach": notApplicable,
@@ -206,4 +209,6 @@ export const jsonScopeSupport: LanguageScopeSupportFacetMap = {
"value.variable": notApplicable,
"value.variable.pattern": notApplicable,
"value.yield": notApplicable,
+ selector: notApplicable,
+ unit: notApplicable,
};
diff --git a/packages/common/src/scopeSupportFacets/markdown.ts b/packages/common/src/scopeSupportFacets/markdown.ts
index 51ffff7a7f..ad507a1a79 100644
--- a/packages/common/src/scopeSupportFacets/markdown.ts
+++ b/packages/common/src/scopeSupportFacets/markdown.ts
@@ -59,9 +59,11 @@ export const markdownScopeSupport: LanguageScopeSupportFacetMap = {
"branch.if": notApplicable,
"branch.if.iteration": notApplicable,
"branch.loop": notApplicable,
+ "branch.loop.iteration": notApplicable,
"branch.switchCase": notApplicable,
"branch.switchCase.iteration": notApplicable,
"branch.ternary": notApplicable,
+ "branch.ternary.iteration": notApplicable,
"branch.try": notApplicable,
"branch.try.iteration": notApplicable,
class: notApplicable,
@@ -131,6 +133,7 @@ export const markdownScopeSupport: LanguageScopeSupportFacetMap = {
"name.assignment": notApplicable,
"name.assignment.pattern": notApplicable,
"name.class": notApplicable,
+ "name.namespace": notApplicable,
"name.constructor": notApplicable,
"name.field": notApplicable,
"name.foreach": notApplicable,
@@ -205,4 +208,6 @@ export const markdownScopeSupport: LanguageScopeSupportFacetMap = {
"value.variable": notApplicable,
"value.variable.pattern": notApplicable,
"value.yield": notApplicable,
+ selector: notApplicable,
+ unit: notApplicable,
};
diff --git a/packages/common/src/scopeSupportFacets/python.ts b/packages/common/src/scopeSupportFacets/python.ts
index f4afafb216..3b8a402399 100644
--- a/packages/common/src/scopeSupportFacets/python.ts
+++ b/packages/common/src/scopeSupportFacets/python.ts
@@ -119,9 +119,11 @@ export const pythonScopeSupport: LanguageScopeSupportFacetMap = {
"branch.switchCase": supported,
"branch.switchCase.iteration": supported,
"branch.ternary": supported,
+ "branch.ternary.iteration": supported,
"branch.try": supported,
"branch.try.iteration": supported,
"branch.loop": supported,
+ "branch.loop.iteration": supported,
class: supported,
"class.iteration.document": supported,
@@ -181,29 +183,47 @@ export const pythonScopeSupport: LanguageScopeSupportFacetMap = {
pairDelimiter: supported,
fieldAccess: supported,
- // Not applicable
+ /* NOT APPLICABLE */
- "argumentList.formal.lambda.multiLine": notApplicable,
+ // Element and tags
+ element: notApplicable,
+ tags: notApplicable,
+ startTag: notApplicable,
+ endTag: notApplicable,
+ "interior.element": notApplicable,
+ "textFragment.element": notApplicable,
+ attribute: notApplicable,
+ "key.attribute": notApplicable,
+ "value.attribute": notApplicable,
+
+ // Section
+ section: notApplicable,
+ "section.iteration.document": notApplicable,
+ "section.iteration.parent": notApplicable,
+
+ // Command
+ command: notApplicable,
+ "interior.command": notApplicable,
+
+ // Namespace
+ "name.namespace": notApplicable,
+ "interior.namespace": notApplicable,
+
+ // Nested classes
"class.iteration.block": notApplicable,
"className.iteration.block": notApplicable,
- "comment.block": notApplicable,
+
+ // for and do-while loops
"condition.doWhile": notApplicable,
"condition.for": notApplicable,
- "functionName.iteration.block": notApplicable,
- "interior.cell": notApplicable,
- "interior.command": notApplicable,
- "interior.element": notApplicable,
- "interior.lambda.block": notApplicable,
"interior.for": notApplicable,
"interior.doWhile": notApplicable,
- "interior.static": notApplicable,
- "interior.namespace": notApplicable,
- "key.attribute": notApplicable,
+
+ // Nested functions. Technically supported, but great problem with `every funk` in a method.
+ "functionName.iteration.block": notApplicable,
"namedFunction.iteration.block": notApplicable,
- "section.iteration.document": notApplicable,
- "section.iteration.parent": notApplicable,
- "textFragment.comment.block": notApplicable,
- "textFragment.element": notApplicable,
+
+ // Type. Python have some types, but not these.
"type.alias": notApplicable,
"type.cast": notApplicable,
"type.enum": notApplicable,
@@ -211,16 +231,23 @@ export const pythonScopeSupport: LanguageScopeSupportFacetMap = {
"type.interface": notApplicable,
"type.resource.iteration": notApplicable,
"type.resource": notApplicable,
- "value.attribute": notApplicable,
"value.typeAlias": notApplicable,
- attribute: notApplicable,
- command: notApplicable,
- element: notApplicable,
- endTag: notApplicable,
- environment: notApplicable,
+
+ // Notebook cell
notebookCell: notApplicable,
+ "interior.cell": notApplicable,
+
+ // Multiline lambda
+ "argumentList.formal.lambda.multiLine": notApplicable,
+ "interior.lambda.block": notApplicable,
+
+ // Block comments
+ "comment.block": notApplicable,
+ "textFragment.comment.block": notApplicable,
+
+ "interior.static": notApplicable,
+ environment: notApplicable,
regularExpression: notApplicable,
- section: notApplicable,
- startTag: notApplicable,
- tags: notApplicable,
+ selector: notApplicable,
+ unit: notApplicable,
};
diff --git a/packages/common/src/scopeSupportFacets/r.ts b/packages/common/src/scopeSupportFacets/r.ts
index efa3037afc..9771532caa 100644
--- a/packages/common/src/scopeSupportFacets/r.ts
+++ b/packages/common/src/scopeSupportFacets/r.ts
@@ -38,10 +38,10 @@ export const rScopeSupport: LanguageScopeSupportFacetMap = {
"branch.if": unsupported,
"branch.if.iteration": unsupported,
- "branch.loop": unsupported,
"branch.switchCase": unsupported,
"branch.switchCase.iteration": unsupported,
"branch.ternary": unsupported,
+ "branch.ternary.iteration": unsupported,
"branch.try": unsupported,
"branch.try.iteration": unsupported,
"condition.for": unsupported,
@@ -81,6 +81,9 @@ export const rScopeSupport: LanguageScopeSupportFacetMap = {
"interior.command": notApplicable,
"interior.element": notApplicable,
"name.assignment.pattern": notApplicable,
+ "branch.loop": notApplicable,
+ "branch.loop.iteration": notApplicable,
+
// Not applicable for base language but might be useful for markdown or quarto
"section.iteration.document": notApplicable,
"section.iteration.parent": notApplicable,
diff --git a/packages/common/src/scopeSupportFacets/scm.ts b/packages/common/src/scopeSupportFacets/scm.ts
index fe5087497b..2e01eed71a 100644
--- a/packages/common/src/scopeSupportFacets/scm.ts
+++ b/packages/common/src/scopeSupportFacets/scm.ts
@@ -59,9 +59,11 @@ export const scmScopeSupport: LanguageScopeSupportFacetMap = {
"branch.if": notApplicable,
"branch.if.iteration": notApplicable,
"branch.loop": notApplicable,
+ "branch.loop.iteration": notApplicable,
"branch.switchCase": notApplicable,
"branch.switchCase.iteration": notApplicable,
"branch.ternary": notApplicable,
+ "branch.ternary.iteration": notApplicable,
"branch.try": notApplicable,
"branch.try.iteration": notApplicable,
class: notApplicable,
@@ -131,6 +133,7 @@ export const scmScopeSupport: LanguageScopeSupportFacetMap = {
"name.assignment": notApplicable,
"name.assignment.pattern": notApplicable,
"name.class": notApplicable,
+ "name.namespace": notApplicable,
"name.constructor": notApplicable,
"name.field": notApplicable,
"name.foreach": notApplicable,
@@ -206,4 +209,6 @@ export const scmScopeSupport: LanguageScopeSupportFacetMap = {
"value.variable": notApplicable,
"value.variable.pattern": notApplicable,
"value.yield": notApplicable,
+ selector: notApplicable,
+ unit: notApplicable,
};
diff --git a/packages/common/src/scopeSupportFacets/scopeSupportFacetInfos.ts b/packages/common/src/scopeSupportFacets/scopeSupportFacetInfos.ts
index 1c2ca91f38..716f3c3b49 100644
--- a/packages/common/src/scopeSupportFacets/scopeSupportFacetInfos.ts
+++ b/packages/common/src/scopeSupportFacets/scopeSupportFacetInfos.ts
@@ -446,15 +446,20 @@ export const scopeSupportFacetInfos: Record<
description: "An if/elif/else branch",
scopeType: "branch",
},
+ "branch.if.iteration": {
+ description:
+ "Iteration scope for if/elif/else branch; should be the entire if-else statement",
+ scopeType: "branch",
+ isIteration: true,
+ },
"branch.loop": {
description:
- "A for / while loop branch. For most languages there will just be one branch for the entire loop, but eg in Python you can have an else branch for a loop.",
+ "A for / while loop branch. For most languages this is not supported, but eg in Python you can have an else branch for a loop.",
scopeType: "branch",
},
-
- "branch.if.iteration": {
+ "branch.loop.iteration": {
description:
- "Iteration scope for if/elif/else branch; should be the entire if-else statement",
+ "Iteration scope for loop branch; should be the entire loop statement",
scopeType: "branch",
isIteration: true,
},
@@ -474,7 +479,7 @@ export const scopeSupportFacetInfos: Record<
},
"branch.switchCase.iteration": {
description:
- "Iteration scope for branches in a switch/match statement; should contain all the cases",
+ "Iteration scope for branches in a switch/match statement; should be the switch statement body",
scopeType: "branch",
isIteration: true,
},
@@ -482,6 +487,12 @@ export const scopeSupportFacetInfos: Record<
description: "A branch in a ternary expression",
scopeType: "branch",
},
+ "branch.ternary.iteration": {
+ description:
+ "Iteration scope for branches in a ternary expression; should be the entire expression",
+ scopeType: "branch",
+ isIteration: true,
+ },
"collectionItem.unenclosed": {
description:
"An item in a comma-separated list without enclosing delimiters. This could be multi-variable declarations, import statements, etc.",
@@ -562,6 +573,10 @@ export const scopeSupportFacetInfos: Record<
description: "Name of a class",
scopeType: "name",
},
+ "name.namespace": {
+ description: "Name of a namespace",
+ scopeType: "name",
+ },
"name.field": {
description: "Name (LHS) of a field in a class / interface",
scopeType: "name",
@@ -926,4 +941,12 @@ export const scopeSupportFacetInfos: Record<
description: "A cell in a notebook or a markdown code block",
scopeType: "notebookCell",
},
+ selector: {
+ description: "A selector in a css rule set",
+ scopeType: "selector",
+ },
+ unit: {
+ description: "A unit in a css rule set",
+ scopeType: "unit",
+ },
};
diff --git a/packages/common/src/scopeSupportFacets/scopeSupportFacets.types.ts b/packages/common/src/scopeSupportFacets/scopeSupportFacets.types.ts
index ffb999d2c0..3aa2462aef 100644
--- a/packages/common/src/scopeSupportFacets/scopeSupportFacets.types.ts
+++ b/packages/common/src/scopeSupportFacets/scopeSupportFacets.types.ts
@@ -118,7 +118,9 @@ export const scopeSupportFacets = [
"branch.switchCase",
"branch.switchCase.iteration",
"branch.ternary",
+ "branch.ternary.iteration",
"branch.loop",
+ "branch.loop.iteration",
"collectionItem.unenclosed",
"collectionItem.unenclosed.iteration",
@@ -140,6 +142,7 @@ export const scopeSupportFacets = [
"name.method",
"name.constructor",
"name.class",
+ "name.namespace",
"name.field",
"name.resource",
"name.resource.iteration",
@@ -225,10 +228,8 @@ export const scopeSupportFacets = [
"interior.static",
"notebookCell",
-
- // FIXME: Still in legacy
- // selector
- // unit
+ "selector",
+ "unit",
] as const;
export interface ScopeSupportFacetInfo {
diff --git a/packages/common/src/scopeSupportFacets/talon.ts b/packages/common/src/scopeSupportFacets/talon.ts
index d22add81cd..f15b9d5f8a 100644
--- a/packages/common/src/scopeSupportFacets/talon.ts
+++ b/packages/common/src/scopeSupportFacets/talon.ts
@@ -75,9 +75,11 @@ export const talonScopeSupport: LanguageScopeSupportFacetMap = {
"branch.if": notApplicable,
"branch.if.iteration": notApplicable,
"branch.loop": notApplicable,
+ "branch.loop.iteration": notApplicable,
"branch.switchCase": notApplicable,
"branch.switchCase.iteration": notApplicable,
"branch.ternary": notApplicable,
+ "branch.ternary.iteration": notApplicable,
"branch.try": notApplicable,
"branch.try.iteration": notApplicable,
class: notApplicable,
@@ -146,6 +148,7 @@ export const talonScopeSupport: LanguageScopeSupportFacetMap = {
"name.argument.formal.method.iteration": notApplicable,
"name.assignment.pattern": notApplicable,
"name.class": notApplicable,
+ "name.namespace": notApplicable,
"name.constructor": notApplicable,
"name.foreach": notApplicable,
"name.function": notApplicable,
@@ -214,4 +217,6 @@ export const talonScopeSupport: LanguageScopeSupportFacetMap = {
"value.yield": notApplicable,
"string.multiLine": notApplicable,
"textFragment.string.multiLine": notApplicable,
+ selector: notApplicable,
+ unit: notApplicable,
};
diff --git a/packages/common/src/scopeSupportFacets/xml.ts b/packages/common/src/scopeSupportFacets/xml.ts
index 1c103520a9..cf20a018bf 100644
--- a/packages/common/src/scopeSupportFacets/xml.ts
+++ b/packages/common/src/scopeSupportFacets/xml.ts
@@ -59,9 +59,11 @@ export const xmlScopeSupport: LanguageScopeSupportFacetMap = {
"branch.if": notApplicable,
"branch.if.iteration": notApplicable,
"branch.loop": notApplicable,
+ "branch.loop.iteration": notApplicable,
"branch.switchCase": notApplicable,
"branch.switchCase.iteration": notApplicable,
"branch.ternary": notApplicable,
+ "branch.ternary.iteration": notApplicable,
"branch.try": notApplicable,
"branch.try.iteration": notApplicable,
class: notApplicable,
@@ -130,6 +132,7 @@ export const xmlScopeSupport: LanguageScopeSupportFacetMap = {
"name.assignment": notApplicable,
"name.assignment.pattern": notApplicable,
"name.class": notApplicable,
+ "name.namespace": notApplicable,
"name.constructor": notApplicable,
"name.field": notApplicable,
"name.foreach": notApplicable,
@@ -202,4 +205,6 @@ export const xmlScopeSupport: LanguageScopeSupportFacetMap = {
"value.variable": notApplicable,
"value.variable.pattern": notApplicable,
"value.yield": notApplicable,
+ selector: notApplicable,
+ unit: notApplicable,
};
diff --git a/packages/common/src/scopeSupportFacets/yaml.ts b/packages/common/src/scopeSupportFacets/yaml.ts
index 4b49c3f3ee..d12e609d85 100644
--- a/packages/common/src/scopeSupportFacets/yaml.ts
+++ b/packages/common/src/scopeSupportFacets/yaml.ts
@@ -69,9 +69,11 @@ export const yamlScopeSupport: LanguageScopeSupportFacetMap = {
"branch.if": notApplicable,
"branch.if.iteration": notApplicable,
"branch.loop": notApplicable,
+ "branch.loop.iteration": notApplicable,
"branch.switchCase": notApplicable,
"branch.switchCase.iteration": notApplicable,
"branch.ternary": notApplicable,
+ "branch.ternary.iteration": notApplicable,
"branch.try": notApplicable,
"branch.try.iteration": notApplicable,
class: notApplicable,
@@ -137,6 +139,7 @@ export const yamlScopeSupport: LanguageScopeSupportFacetMap = {
"name.assignment": notApplicable,
"name.assignment.pattern": notApplicable,
"name.class": notApplicable,
+ "name.namespace": notApplicable,
"name.constructor": notApplicable,
"name.field": notApplicable,
"name.foreach": notApplicable,
@@ -209,4 +212,6 @@ export const yamlScopeSupport: LanguageScopeSupportFacetMap = {
"value.variable": notApplicable,
"value.variable.pattern": notApplicable,
"value.yield": notApplicable,
+ selector: notApplicable,
+ unit: notApplicable,
};
diff --git a/packages/cursorless-org-docs/src/docs/contributing/MissingLanguageScopes.tsx b/packages/cursorless-org-docs/src/docs/contributing/MissingLanguageScopes.tsx
index cf6e328049..dd7ef16a07 100644
--- a/packages/cursorless-org-docs/src/docs/contributing/MissingLanguageScopes.tsx
+++ b/packages/cursorless-org-docs/src/docs/contributing/MissingLanguageScopes.tsx
@@ -7,7 +7,7 @@ import {
type ScopeType,
type SimpleScopeTypeType,
} from "@cursorless/common";
-import React, { useEffect, useState } from "react";
+import React, { useState } from "react";
export function MissingLanguageScopes(): React.JSX.Element {
const [showPrivate, setShowPrivate] = useState(false);
@@ -25,7 +25,11 @@ export function MissingLanguageScopes(): React.JSX.Element {
{languageIds.map((languageId) => (
-
+
))}
>
);
@@ -46,6 +50,7 @@ function Language({
const unspecifiedFacets = scopeSupportFacets.filter(
(facet) => scopeSupport[facet] == null,
);
+
const unsupportedScopes = facetsToScopes(unsupportedFacets, showPrivate);
const unspecifiedScopes = facetsToScopes(unspecifiedFacets, showPrivate);
@@ -73,11 +78,7 @@ function renderFacets(
title: string,
scopes: string[],
): React.JSX.Element | null {
- const [open, setOpen] = useState(false);
-
- useEffect(() => {
- setOpen(scopes.length < 4);
- }, [scopes]);
+ const [open, setOpen] = useState(scopes.length < 4);
if (scopes.length === 0) {
return null;
diff --git a/queries/c.scm b/queries/c.scm
index edc12b7e2e..47956df039 100644
--- a/queries/c.scm
+++ b/queries/c.scm
@@ -400,7 +400,7 @@
;;! ^^^^
(conditional_expression
condition: (_) @condition @interior
-) @condition.domain
+) @condition.domain @branch.iteration
;;!! true ? 0 : 1
;;! ^
diff --git a/queries/csharp.scm b/queries/csharp.scm
index 8ce523b471..3c89d4caeb 100644
--- a/queries/csharp.scm
+++ b/queries/csharp.scm
@@ -48,8 +48,6 @@
(yield_statement)
] @statement
-(if_statement) @ifStatement
-
(
(compilation_unit) @statement.iteration @class.iteration @className.iteration
(#document-range! @statement.iteration @class.iteration @className.iteration)
@@ -67,6 +65,10 @@
)
)
+;;!! if () {}
+;;! ^^^^^^^^
+(if_statement) @ifStatement
+
;;!! if () {}
;;! ^^^^^^^^
(
@@ -75,7 +77,7 @@
consequence: (_) @branch.end.endOf @branch.removal.end.endOf
alternative: (_)? @branch.removal.end.startOf
) @branch.start.startOf @branch.removal.start.startOf @condition.domain
- (#not-parent-type? @condition.domain "if_statement")
+ (#not-parent-type? @condition.domain if_statement)
)
(
(if_statement
@@ -84,7 +86,7 @@
"}" @interior.end.startOf
) @interior.domain.end.endOf
) @interior.domain.start.startOf
- (#not-parent-type? @interior.domain.start.startOf "if_statement")
+ (#not-parent-type? @interior.domain.start.startOf if_statement)
)
;;!! else if () {}
@@ -114,7 +116,7 @@
;;! ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
(
(if_statement) @branch.iteration
- (#not-parent-type? @branch.iteration "if_statement")
+ (#not-parent-type? @branch.iteration if_statement)
)
;;!! try () {}
@@ -162,10 +164,12 @@
;;! ^ ^
(conditional_expression
condition: (_) @condition @interior
-) @condition.domain
+) @condition.domain @branch.iteration
+
(conditional_expression
consequence: (_) @branch @interior
)
+
(conditional_expression
alternative: (_) @branch @interior
)
@@ -290,7 +294,9 @@
(_
condition: (_) @condition
+ (#not-parent-type? @condition if_statement)
) @_.domain
+
(while_statement
.
(_) @condition
diff --git a/queries/javascript.core.scm b/queries/javascript.core.scm
index eb8883811a..40d597a380 100644
--- a/queries/javascript.core.scm
+++ b/queries/javascript.core.scm
@@ -575,8 +575,7 @@
;;! -------------
(ternary_expression
condition: (_) @condition @interior
- consequence: (_) @branch
-) @condition.domain
+) @condition.domain @branch.iteration
(ternary_expression
consequence: (_) @branch @interior