diff --git a/.gitignore b/.gitignore
index fa67b4db01..50b4aceec7 100644
--- a/.gitignore
+++ b/.gitignore
@@ -16,3 +16,7 @@ node_modules/
*.vsix
.DS_Store
.luacheckcache
+
+# Neovim symlinks
+/packages/app-neovim/cursorless.nvim/node/cursorless-neovim
+/packages/app-neovim/cursorless.nvim/node/test-runner
diff --git a/packages/app-web-docs/src/docs/contributing/private-scopes/disqualifyDelimiter.mdx b/packages/app-web-docs/src/docs/contributing/private-scopes/disqualifyDelimiter.mdx
index c9e404166d..b8f18aef36 100644
--- a/packages/app-web-docs/src/docs/contributing/private-scopes/disqualifyDelimiter.mdx
+++ b/packages/app-web-docs/src/docs/contributing/private-scopes/disqualifyDelimiter.mdx
@@ -109,6 +109,10 @@ The following are internal scopes. They are not intended for user interaction or
+##### Swift
+
+
+
##### TypeScript
diff --git a/packages/app-web-docs/src/docs/contributing/private-scopes/fixtures/disqualifyDelimiter.json b/packages/app-web-docs/src/docs/contributing/private-scopes/fixtures/disqualifyDelimiter.json
index 4dacaa16e0..82fcae2903 100644
--- a/packages/app-web-docs/src/docs/contributing/private-scopes/fixtures/disqualifyDelimiter.json
+++ b/packages/app-web-docs/src/docs/contributing/private-scopes/fixtures/disqualifyDelimiter.json
@@ -1250,6 +1250,133 @@
}
]
},
+ {
+ "name": "scopes/swift/disqualifyDelimiter",
+ "languageId": "swift",
+ "facet": "disqualifyDelimiter",
+ "code": "1 < 2\n1 > 2\n1 <= 2\n1 >= 2\na << 2\na >> 2\na <<= 2\na >>= 2\na &<< 2\na &>> 2\na &<<= 2\na &>>= 2\na <~ 2\na >~ 2\n0..<2\n..<2\nlet foo: () -> Int",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:2-0:3"
+ }
+ ]
+ },
+ {
+ "targets": [
+ {
+ "content": "1:2-1:3"
+ }
+ ]
+ },
+ {
+ "targets": [
+ {
+ "content": "2:2-2:4"
+ }
+ ]
+ },
+ {
+ "targets": [
+ {
+ "content": "3:2-3:4"
+ }
+ ]
+ },
+ {
+ "targets": [
+ {
+ "content": "4:2-4:4"
+ }
+ ]
+ },
+ {
+ "targets": [
+ {
+ "content": "5:2-5:4"
+ }
+ ]
+ },
+ {
+ "targets": [
+ {
+ "content": "6:2-6:5"
+ }
+ ]
+ },
+ {
+ "targets": [
+ {
+ "content": "7:2-7:5"
+ }
+ ]
+ },
+ {
+ "targets": [
+ {
+ "content": "8:2-8:5"
+ }
+ ]
+ },
+ {
+ "targets": [
+ {
+ "content": "9:2-9:5"
+ }
+ ]
+ },
+ {
+ "targets": [
+ {
+ "content": "10:2-10:6"
+ }
+ ]
+ },
+ {
+ "targets": [
+ {
+ "content": "11:2-11:6"
+ }
+ ]
+ },
+ {
+ "targets": [
+ {
+ "content": "12:2-12:4"
+ }
+ ]
+ },
+ {
+ "targets": [
+ {
+ "content": "13:2-13:4"
+ }
+ ]
+ },
+ {
+ "targets": [
+ {
+ "content": "14:1-14:4"
+ }
+ ]
+ },
+ {
+ "targets": [
+ {
+ "content": "15:0-15:3"
+ }
+ ]
+ },
+ {
+ "targets": [
+ {
+ "content": "16:12-16:14"
+ }
+ ]
+ }
+ ]
+ },
{
"name": "scopes/typescript.core/disqualifyDelimiter",
"languageId": "typescript.core",
diff --git a/packages/app-web-docs/src/docs/contributing/private-scopes/fixtures/string.json b/packages/app-web-docs/src/docs/contributing/private-scopes/fixtures/string.json
index a075ba5b65..e47c695016 100644
--- a/packages/app-web-docs/src/docs/contributing/private-scopes/fixtures/string.json
+++ b/packages/app-web-docs/src/docs/contributing/private-scopes/fixtures/string.json
@@ -628,6 +628,57 @@
}
]
},
+ {
+ "name": "scopes/swift/string.multiLine",
+ "languageId": "swift",
+ "facet": "string.multiLine",
+ "code": "\"\"\"\nHello\nworld\n\"\"\"",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-3:3",
+ "removal": "0:0-3:3"
+ }
+ ],
+ "domain": "0:0-3:3"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/string.singleLine",
+ "languageId": "swift",
+ "facet": "string.singleLine",
+ "code": "\"Hello world\"",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-0:13",
+ "removal": "0:0-0:13"
+ }
+ ],
+ "domain": "0:0-0:13"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/string.singleLine2",
+ "languageId": "swift",
+ "facet": "string.singleLine",
+ "code": "#\"Hello world\"#",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-0:15",
+ "removal": "0:0-0:15"
+ }
+ ],
+ "domain": "0:0-0:15"
+ }
+ ]
+ },
{
"name": "scopes/talon/string.singleLine",
"languageId": "talon",
diff --git a/packages/app-web-docs/src/docs/contributing/private-scopes/fixtures/textFragment.json b/packages/app-web-docs/src/docs/contributing/private-scopes/fixtures/textFragment.json
index 1ea8d96bd6..7d0777a43c 100644
--- a/packages/app-web-docs/src/docs/contributing/private-scopes/fixtures/textFragment.json
+++ b/packages/app-web-docs/src/docs/contributing/private-scopes/fixtures/textFragment.json
@@ -1479,6 +1479,125 @@
}
]
},
+ {
+ "name": "scopes/swift/textFragment/textFragment.comment.block",
+ "languageId": "swift",
+ "facet": "textFragment.comment.block",
+ "code": "/* Hello world */",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-0:17",
+ "removal": "0:0-0:17"
+ }
+ ],
+ "domain": "0:0-0:17"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/textFragment/textFragment.comment.line",
+ "languageId": "swift",
+ "facet": "textFragment.comment.line",
+ "code": "// Hello world",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-0:14",
+ "removal": "0:0-0:14"
+ }
+ ],
+ "domain": "0:0-0:14"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/textFragment/textFragment.regularExpression",
+ "languageId": "swift",
+ "facet": "textFragment.regularExpression",
+ "code": "/\\d+$/",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:1-0:5",
+ "removal": "0:1-0:5"
+ }
+ ],
+ "domain": "0:1-0:5"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/textFragment/textFragment.string.multiLine",
+ "languageId": "swift",
+ "facet": "textFragment.string.multiLine",
+ "code": "\"\"\"\nHello\nworld\n\"\"\"",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:3-3:0",
+ "removal": "0:3-3:0"
+ }
+ ],
+ "domain": "0:3-3:0"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/textFragment/textFragment.string.singleLine",
+ "languageId": "swift",
+ "facet": "textFragment.string.singleLine",
+ "code": "\"Hello world\"",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:1-0:12",
+ "removal": "0:1-0:12"
+ }
+ ],
+ "domain": "0:1-0:12"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/textFragment/textFragment.string.singleLine2",
+ "languageId": "swift",
+ "facet": "textFragment.string.singleLine",
+ "code": "#\"Hello world\"#",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:2-0:13",
+ "removal": "0:2-0:13"
+ }
+ ],
+ "domain": "0:2-0:13"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/textFragment/textFragment.string.singleLine3",
+ "languageId": "swift",
+ "facet": "textFragment.string.singleLine",
+ "code": "###\"Hello world\"###",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:4-0:15",
+ "removal": "0:4-0:15"
+ }
+ ],
+ "domain": "0:4-0:15"
+ }
+ ]
+ },
{
"name": "scopes/talon/textFragment.comment.line",
"languageId": "talon",
diff --git a/packages/app-web-docs/src/docs/contributing/private-scopes/string.mdx b/packages/app-web-docs/src/docs/contributing/private-scopes/string.mdx
index 1f541ccf32..8c56ad7058 100644
--- a/packages/app-web-docs/src/docs/contributing/private-scopes/string.mdx
+++ b/packages/app-web-docs/src/docs/contributing/private-scopes/string.mdx
@@ -93,6 +93,10 @@ The following are internal scopes. They are not intended for user interaction or
+##### Swift
+
+
+
##### YAML
@@ -185,6 +189,12 @@ The following are internal scopes. They are not intended for user interaction or
+##### Swift
+
+
+
+
+
##### Talon list
diff --git a/packages/app-web-docs/src/docs/contributing/private-scopes/textFragment.mdx b/packages/app-web-docs/src/docs/contributing/private-scopes/textFragment.mdx
index f109683831..2d9d7fac35 100644
--- a/packages/app-web-docs/src/docs/contributing/private-scopes/textFragment.mdx
+++ b/packages/app-web-docs/src/docs/contributing/private-scopes/textFragment.mdx
@@ -107,6 +107,10 @@ The following are internal scopes. They are not intended for user interaction or
+##### Swift
+
+
+
##### XML
@@ -199,6 +203,10 @@ The following are internal scopes. They are not intended for user interaction or
+##### Swift
+
+
+
##### Talon list
@@ -253,6 +261,10 @@ The following are internal scopes. They are not intended for user interaction or
+##### Swift
+
+
+
### Text fragment: String multi line
Internally used text fragment consisting of a multi-line string
@@ -317,6 +329,10 @@ The following are internal scopes. They are not intended for user interaction or
+##### Swift
+
+
+
##### YAML
@@ -409,6 +425,14 @@ The following are internal scopes. They are not intended for user interaction or
+##### Swift
+
+
+
+
+
+
+
##### Talon list
diff --git a/packages/app-web-docs/src/docs/user/languages/README.md b/packages/app-web-docs/src/docs/user/languages/README.md
index 6a3a17ae2a..1f8f404151 100644
--- a/packages/app-web-docs/src/docs/user/languages/README.md
+++ b/packages/app-web-docs/src/docs/user/languages/README.md
@@ -33,6 +33,7 @@ sidebar_position: 4
- [Tree-sitter query (SCM)](./scm.mdx)
- [SCSS](./scss.mdx)
- [Shell Script](./shellscript.mdx)
+- [Swift](./swift.mdx)
- [Talon](./talon.mdx)
- [Talon list](./talon-list.mdx)
- [TypeScript](./typescript.mdx)
diff --git a/packages/app-web-docs/src/docs/user/languages/fixtures/swift.json b/packages/app-web-docs/src/docs/user/languages/fixtures/swift.json
new file mode 100644
index 0000000000..a1dee08496
--- /dev/null
+++ b/packages/app-web-docs/src/docs/user/languages/fixtures/swift.json
@@ -0,0 +1,5577 @@
+[
+ {
+ "name": "scopes/swift/anonymousFunction",
+ "languageId": "swift",
+ "facet": "anonymousFunction",
+ "code": "{ () in 0 }",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-0:11",
+ "removal": "0:0-0:11"
+ }
+ ],
+ "domain": "0:0-0:11"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/argument/argument.actual.constructor.iteration",
+ "languageId": "swift",
+ "facet": "argument.actual.constructor.iteration",
+ "code": "Foo(aaa, bbb)",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:4-0:12"
+ }
+ ],
+ "domain": "0:0-0:13"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/argument/argument.actual.constructor.multiLine",
+ "languageId": "swift",
+ "facet": "argument.actual.constructor.multiLine",
+ "code": "Foo(\n aaa,\n bbb\n)",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "1:4-1:7",
+ "removal": "1:4-2:4"
+ }
+ ],
+ "domain": "1:4-1:7"
+ },
+ {
+ "targets": [
+ {
+ "content": "2:4-2:7",
+ "removal": "1:7-2:7"
+ }
+ ],
+ "domain": "2:4-2:7"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/argument/argument.actual.constructor.singleLine",
+ "languageId": "swift",
+ "facet": "argument.actual.constructor.singleLine",
+ "code": "Foo(aaa, bbb)",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:4-0:7",
+ "removal": "0:4-0:9"
+ }
+ ],
+ "domain": "0:4-0:7"
+ },
+ {
+ "targets": [
+ {
+ "content": "0:9-0:12",
+ "removal": "0:7-0:12"
+ }
+ ],
+ "domain": "0:9-0:12"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/argument/argument.actual.iteration",
+ "languageId": "swift",
+ "facet": "argument.actual.iteration",
+ "code": "foo(aaa, bbb)",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:4-0:12"
+ }
+ ],
+ "domain": "0:0-0:13"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/argument/argument.actual.method.iteration",
+ "languageId": "swift",
+ "facet": "argument.actual.method.iteration",
+ "code": "foo.bar(aaa, bbb)",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:8-0:16"
+ }
+ ],
+ "domain": "0:0-0:17"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/argument/argument.actual.method.multiLine",
+ "languageId": "swift",
+ "facet": "argument.actual.method.multiLine",
+ "code": "foo.bar(\n aaa,\n bbb\n)",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "1:4-1:7",
+ "removal": "1:4-2:4"
+ }
+ ],
+ "domain": "1:4-1:7"
+ },
+ {
+ "targets": [
+ {
+ "content": "2:4-2:7",
+ "removal": "1:7-2:7"
+ }
+ ],
+ "domain": "2:4-2:7"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/argument/argument.actual.method.singleLine",
+ "languageId": "swift",
+ "facet": "argument.actual.method.singleLine",
+ "code": "foo.bar(aaa, bbb)",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:8-0:11",
+ "removal": "0:8-0:13"
+ }
+ ],
+ "domain": "0:8-0:11"
+ },
+ {
+ "targets": [
+ {
+ "content": "0:13-0:16",
+ "removal": "0:11-0:16"
+ }
+ ],
+ "domain": "0:13-0:16"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/argument/argument.actual.multiLine",
+ "languageId": "swift",
+ "facet": "argument.actual.multiLine",
+ "code": "foo(\n aaa,\n bbb\n)",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "1:4-1:7",
+ "removal": "1:4-2:4"
+ }
+ ],
+ "domain": "1:4-1:7"
+ },
+ {
+ "targets": [
+ {
+ "content": "2:4-2:7",
+ "removal": "1:7-2:7"
+ }
+ ],
+ "domain": "2:4-2:7"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/argument/argument.actual.singleLine",
+ "languageId": "swift",
+ "facet": "argument.actual.singleLine",
+ "code": "foo(aaa, bbb)",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:4-0:7",
+ "removal": "0:4-0:9"
+ }
+ ],
+ "domain": "0:4-0:7"
+ },
+ {
+ "targets": [
+ {
+ "content": "0:9-0:12",
+ "removal": "0:7-0:12"
+ }
+ ],
+ "domain": "0:9-0:12"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/argument/argument.formal.catch",
+ "languageId": "swift",
+ "facet": "argument.formal.catch",
+ "code": "do {}\ncatch let e as Error {}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "1:6-1:20",
+ "removal": "1:6-1:21"
+ }
+ ],
+ "domain": "1:6-1:20"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/argument/argument.formal.catch2",
+ "languageId": "swift",
+ "facet": "argument.formal.catch",
+ "code": "do {}\ncatch let e {}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "1:6-1:11",
+ "removal": "1:6-1:12"
+ }
+ ],
+ "domain": "1:6-1:11"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/argument/argument.formal.constructor.iteration",
+ "languageId": "swift",
+ "facet": "argument.formal.constructor.iteration",
+ "code": "struct Foo {\n init(aaa: Int, bbb: Int) {}\n}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "1:7-1:25"
+ }
+ ],
+ "domain": "1:2-1:29"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/argument/argument.formal.constructor.multiLine",
+ "languageId": "swift",
+ "facet": "argument.formal.constructor.multiLine",
+ "code": "struct Foo {\n init(\n aaa: Int,\n bbb: Int\n ) {}\n}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "2:8-2:16",
+ "removal": "2:8-3:8"
+ }
+ ],
+ "domain": "2:8-2:16"
+ },
+ {
+ "targets": [
+ {
+ "content": "3:8-3:16",
+ "removal": "2:16-3:16"
+ }
+ ],
+ "domain": "3:8-3:16"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/argument/argument.formal.constructor.singleLine",
+ "languageId": "swift",
+ "facet": "argument.formal.constructor.singleLine",
+ "code": "struct Foo {\n init(aaa: Int, bbb: Int) {}\n}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "1:9-1:17",
+ "removal": "1:9-1:19"
+ }
+ ],
+ "domain": "1:9-1:17"
+ },
+ {
+ "targets": [
+ {
+ "content": "1:19-1:27",
+ "removal": "1:17-1:27"
+ }
+ ],
+ "domain": "1:19-1:27"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/argument/argument.formal.iteration",
+ "languageId": "swift",
+ "facet": "argument.formal.iteration",
+ "code": "func foo(aaa: Int, bbb: Int) {}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:9-0:27"
+ }
+ ],
+ "domain": "0:0-0:31"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/argument/argument.formal.lambda.iteration",
+ "languageId": "swift",
+ "facet": "argument.formal.lambda.iteration",
+ "code": "{ (aaa, bbb: Int) in }",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:3-0:16"
+ }
+ ],
+ "domain": "0:0-0:22"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/argument/argument.formal.lambda.multiLine",
+ "languageId": "swift",
+ "facet": "argument.formal.lambda.multiLine",
+ "code": "{ (\n aaa,\n bbb: Int\n) in }",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "1:4-1:7",
+ "removal": "1:4-2:4"
+ }
+ ],
+ "domain": "1:4-1:7"
+ },
+ {
+ "targets": [
+ {
+ "content": "2:4-2:12",
+ "removal": "1:7-2:12"
+ }
+ ],
+ "domain": "2:4-2:12"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/argument/argument.formal.lambda.singleLine",
+ "languageId": "swift",
+ "facet": "argument.formal.lambda.singleLine",
+ "code": "{ (aaa, bbb: Int) in }",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:3-0:6",
+ "removal": "0:3-0:8"
+ }
+ ],
+ "domain": "0:3-0:6"
+ },
+ {
+ "targets": [
+ {
+ "content": "0:8-0:16",
+ "removal": "0:6-0:16"
+ }
+ ],
+ "domain": "0:8-0:16"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/argument/argument.formal.method.iteration",
+ "languageId": "swift",
+ "facet": "argument.formal.method.iteration",
+ "code": "struct Foo {\n func bar(aaa: Int, bbb: Int) {}\n}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "1:13-1:31"
+ }
+ ],
+ "domain": "1:4-1:35"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/argument/argument.formal.method.multiLine",
+ "languageId": "swift",
+ "facet": "argument.formal.method.multiLine",
+ "code": "struct Foo {\n func bar(\n aaa: Int,\n bbb: Int\n ) {}\n}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "2:8-2:16",
+ "removal": "2:8-3:8"
+ }
+ ],
+ "domain": "2:8-2:16"
+ },
+ {
+ "targets": [
+ {
+ "content": "3:8-3:16",
+ "removal": "2:16-3:16"
+ }
+ ],
+ "domain": "3:8-3:16"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/argument/argument.formal.method.singleLine",
+ "languageId": "swift",
+ "facet": "argument.formal.method.singleLine",
+ "code": "struct Foo {\n func bar(aaa: Int, bbb: Int) {}\n}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "1:13-1:21",
+ "removal": "1:13-1:23"
+ }
+ ],
+ "domain": "1:13-1:21"
+ },
+ {
+ "targets": [
+ {
+ "content": "1:23-1:31",
+ "removal": "1:21-1:31"
+ }
+ ],
+ "domain": "1:23-1:31"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/argument/argument.formal.multiLine",
+ "languageId": "swift",
+ "facet": "argument.formal.multiLine",
+ "code": "func foo(\n aaa: Int,\n bbb: Int\n) {}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "1:4-1:12",
+ "removal": "1:4-2:4"
+ }
+ ],
+ "domain": "1:4-1:12"
+ },
+ {
+ "targets": [
+ {
+ "content": "2:4-2:12",
+ "removal": "1:12-2:12"
+ }
+ ],
+ "domain": "2:4-2:12"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/argument/argument.formal.singleLine",
+ "languageId": "swift",
+ "facet": "argument.formal.singleLine",
+ "code": "func foo(aaa: Int, bbb: Int) {}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:9-0:17",
+ "removal": "0:9-0:19"
+ }
+ ],
+ "domain": "0:9-0:17"
+ },
+ {
+ "targets": [
+ {
+ "content": "0:19-0:27",
+ "removal": "0:17-0:27"
+ }
+ ],
+ "domain": "0:19-0:27"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/argumentList/argumentList.actual.constructor.empty",
+ "languageId": "swift",
+ "facet": "argumentList.actual.constructor.empty",
+ "code": "Foo()",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:4-0:4",
+ "removal": "0:4-0:4"
+ }
+ ],
+ "domain": "0:0-0:5"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/argumentList/argumentList.actual.constructor.multiLine",
+ "languageId": "swift",
+ "facet": "argumentList.actual.constructor.multiLine",
+ "code": "Foo(\n aaa,\n bbb\n)",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "1:2-2:5",
+ "removal": "0:4-3:0"
+ }
+ ],
+ "domain": "0:0-3:1"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/argumentList/argumentList.actual.constructor.singleLine",
+ "languageId": "swift",
+ "facet": "argumentList.actual.constructor.singleLine",
+ "code": "Foo(aaa, bbb)",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:4-0:12",
+ "removal": "0:4-0:12"
+ }
+ ],
+ "domain": "0:0-0:13"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/argumentList/argumentList.actual.empty",
+ "languageId": "swift",
+ "facet": "argumentList.actual.empty",
+ "code": "foo()",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:4-0:4",
+ "removal": "0:4-0:4"
+ }
+ ],
+ "domain": "0:0-0:5"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/argumentList/argumentList.actual.method.empty",
+ "languageId": "swift",
+ "facet": "argumentList.actual.method.empty",
+ "code": "foo.bar()",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:8-0:8",
+ "removal": "0:8-0:8"
+ }
+ ],
+ "domain": "0:0-0:9"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/argumentList/argumentList.actual.method.multiLine",
+ "languageId": "swift",
+ "facet": "argumentList.actual.method.multiLine",
+ "code": "foo.bar(\n aaa,\n bbb\n)",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "1:2-2:5",
+ "removal": "0:8-3:0"
+ }
+ ],
+ "domain": "0:0-3:1"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/argumentList/argumentList.actual.method.singleLine",
+ "languageId": "swift",
+ "facet": "argumentList.actual.method.singleLine",
+ "code": "foo.bar(aaa, bbb)",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:8-0:16",
+ "removal": "0:8-0:16"
+ }
+ ],
+ "domain": "0:0-0:17"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/argumentList/argumentList.actual.multiLine",
+ "languageId": "swift",
+ "facet": "argumentList.actual.multiLine",
+ "code": "foo(\n aaa,\n bbb\n)",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "1:2-2:5",
+ "removal": "0:4-3:0"
+ }
+ ],
+ "domain": "0:0-3:1"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/argumentList/argumentList.actual.singleLine",
+ "languageId": "swift",
+ "facet": "argumentList.actual.singleLine",
+ "code": "foo(aaa, bbb)",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:4-0:12",
+ "removal": "0:4-0:12"
+ }
+ ],
+ "domain": "0:0-0:13"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/argumentList/argumentList.formal.constructor.empty",
+ "languageId": "swift",
+ "facet": "argumentList.formal.constructor.empty",
+ "code": "struct Foo {\n init() {}\n}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "1:7-1:7",
+ "removal": "1:7-1:7"
+ }
+ ],
+ "domain": "1:2-1:11"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/argumentList/argumentList.formal.constructor.multiLine",
+ "languageId": "swift",
+ "facet": "argumentList.formal.constructor.multiLine",
+ "code": "struct Foo {\n init(\n aaa: Int,\n bbb: Int\n ) {}\n}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "2:4-3:12",
+ "removal": "1:7-4:2"
+ }
+ ],
+ "domain": "1:2-4:6"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/argumentList/argumentList.formal.constructor.singleLine",
+ "languageId": "swift",
+ "facet": "argumentList.formal.constructor.singleLine",
+ "code": "struct Foo {\n init(aaa: Int, bbb: Int) {}\n}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "1:7-1:25",
+ "removal": "1:7-1:25"
+ }
+ ],
+ "domain": "1:2-1:29"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/argumentList/argumentList.formal.empty",
+ "languageId": "swift",
+ "facet": "argumentList.formal.empty",
+ "code": "func foo() {}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:9-0:9",
+ "removal": "0:9-0:9"
+ }
+ ],
+ "domain": "0:0-0:13"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/argumentList/argumentList.formal.lambda.empty",
+ "languageId": "swift",
+ "facet": "argumentList.formal.lambda.empty",
+ "code": "{ () in }",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:3-0:3",
+ "removal": "0:3-0:3"
+ }
+ ],
+ "domain": "0:0-0:9"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/argumentList/argumentList.formal.lambda.multiLine",
+ "languageId": "swift",
+ "facet": "argumentList.formal.lambda.multiLine",
+ "code": "{ (\n aaa,\n bbb: Int\n) in }",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "1:2-2:10",
+ "removal": "0:3-3:0"
+ }
+ ],
+ "domain": "0:0-3:6"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/argumentList/argumentList.formal.lambda.singleLine",
+ "languageId": "swift",
+ "facet": "argumentList.formal.lambda.singleLine",
+ "code": "{ (aaa, bbb: Int) in }",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:3-0:16",
+ "removal": "0:3-0:16"
+ }
+ ],
+ "domain": "0:0-0:22"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/argumentList/argumentList.formal.method.empty",
+ "languageId": "swift",
+ "facet": "argumentList.formal.method.empty",
+ "code": "struct Foo {\n func bar() {}\n}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "1:11-1:11",
+ "removal": "1:11-1:11"
+ }
+ ],
+ "domain": "1:2-1:15"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/argumentList/argumentList.formal.method.multiLine",
+ "languageId": "swift",
+ "facet": "argumentList.formal.method.multiLine",
+ "code": "struct Foo {\n func bar(\n aaa: Int,\n bbb: Int\n ) {}\n}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "2:4-3:12",
+ "removal": "1:11-4:2"
+ }
+ ],
+ "domain": "1:2-4:6"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/argumentList/argumentList.formal.method.singleLine",
+ "languageId": "swift",
+ "facet": "argumentList.formal.method.singleLine",
+ "code": "struct Foo {\n func bar(aaa: Int, bbb: Int) {}\n}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "1:11-1:29",
+ "removal": "1:11-1:29"
+ }
+ ],
+ "domain": "1:2-1:33"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/argumentList/argumentList.formal.multiLine",
+ "languageId": "swift",
+ "facet": "argumentList.formal.multiLine",
+ "code": "func foo(\n aaa: Int,\n bbb: Int\n) {}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "1:2-2:10",
+ "removal": "0:9-3:0"
+ }
+ ],
+ "domain": "0:0-3:4"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/argumentList/argumentList.formal.singleLine",
+ "languageId": "swift",
+ "facet": "argumentList.formal.singleLine",
+ "code": "func foo(aaa: Int, bbb: Int) {}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:9-0:27",
+ "removal": "0:9-0:27"
+ }
+ ],
+ "domain": "0:0-0:31"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/branch/branch.if.elif.else",
+ "languageId": "swift",
+ "facet": "branch.if.elif.else",
+ "code": "if foo {}\nelse if bar {}\nelse {}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-0:9",
+ "removal": "0:0-1:5"
+ }
+ ],
+ "domain": "0:0-0:9"
+ },
+ {
+ "targets": [
+ {
+ "content": "1:0-1:14",
+ "removal": "1:0-2:0"
+ }
+ ],
+ "domain": "1:0-1:14"
+ },
+ {
+ "targets": [
+ {
+ "content": "2:0-2:7",
+ "removal": "1:14-2:7"
+ }
+ ],
+ "domain": "2:0-2:7"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/branch/branch.if.else",
+ "languageId": "swift",
+ "facet": "branch.if.else",
+ "code": "if true {}\nelse {}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-0:10",
+ "removal": "0:0-1:0"
+ }
+ ],
+ "domain": "0:0-0:10"
+ },
+ {
+ "targets": [
+ {
+ "content": "1:0-1:7",
+ "removal": "0:10-1:7"
+ }
+ ],
+ "domain": "1:0-1:7"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/branch/branch.if.iteration",
+ "languageId": "swift",
+ "facet": "branch.if.iteration",
+ "code": "if true {}\nelse if false {}\nelse {}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-2:7"
+ }
+ ],
+ "domain": "0:0-2:7"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/branch/branch.if",
+ "languageId": "swift",
+ "facet": "branch.if",
+ "code": "if true {}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-0:10",
+ "removal": "0:0-0:10"
+ }
+ ],
+ "domain": "0:0-0:10"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/branch/branch.switchCase.iteration",
+ "languageId": "swift",
+ "facet": "branch.switchCase.iteration",
+ "code": "switch value { }",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:14-0:15"
+ }
+ ],
+ "domain": "0:14-0:15"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/branch/branch.switchCase",
+ "languageId": "swift",
+ "facet": "branch.switchCase",
+ "code": "switch value {\n case 0:\n break\n}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "1:4-3:0",
+ "removal": "1:0-3:0"
+ }
+ ],
+ "domain": "1:4-3:0"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/branch/branch.switchCase2",
+ "languageId": "swift",
+ "facet": "branch.switchCase",
+ "code": "switch value {\n default:\n break\n}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "1:4-3:0",
+ "removal": "1:0-3:0"
+ }
+ ],
+ "domain": "1:4-3:0"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/branch/branch.ternary.iteration",
+ "languageId": "swift",
+ "facet": "branch.ternary.iteration",
+ "code": "foo ? 0 : 1",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-0:11"
+ }
+ ],
+ "domain": "0:0-0:11"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/branch/branch.ternary",
+ "languageId": "swift",
+ "facet": "branch.ternary",
+ "code": "foo ? 0 : 1",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:6-0:7",
+ "removal": "0:6-0:8"
+ }
+ ],
+ "domain": "0:6-0:7"
+ },
+ {
+ "targets": [
+ {
+ "content": "0:10-0:11",
+ "removal": "0:9-0:11"
+ }
+ ],
+ "domain": "0:10-0:11"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/branch/branch.try.iteration",
+ "languageId": "swift",
+ "facet": "branch.try.iteration",
+ "code": "do {}\ncatch {}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-1:8"
+ }
+ ],
+ "domain": "0:0-1:8"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/branch/branch.try",
+ "languageId": "swift",
+ "facet": "branch.try",
+ "code": "do {}\ncatch {}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-0:5",
+ "removal": "0:0-1:0"
+ }
+ ],
+ "domain": "0:0-0:5"
+ },
+ {
+ "targets": [
+ {
+ "content": "1:0-1:8",
+ "removal": "0:5-1:8"
+ }
+ ],
+ "domain": "1:0-1:8"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/class.iteration.class",
+ "languageId": "swift",
+ "facet": "class.iteration.class",
+ "code": "class Foo { }",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-0:13"
+ }
+ ],
+ "domain": "0:0-0:13"
+ },
+ {
+ "targets": [
+ {
+ "content": "0:11-0:12"
+ }
+ ],
+ "domain": "0:11-0:12"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/class.iteration.document",
+ "languageId": "swift",
+ "facet": "class.iteration.document",
+ "code": "\nstruct Foo {}\n",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-2:0"
+ }
+ ],
+ "domain": "0:0-2:0"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/class",
+ "languageId": "swift",
+ "facet": "class",
+ "code": "struct Foo {}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-0:13",
+ "removal": "0:0-0:13"
+ }
+ ],
+ "domain": "0:0-0:13"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/comment.block",
+ "languageId": "swift",
+ "facet": "comment.block",
+ "code": "/* Hello world */",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-0:17",
+ "removal": "0:0-0:17"
+ }
+ ],
+ "domain": "0:0-0:17"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/comment.line",
+ "languageId": "swift",
+ "facet": "comment.line",
+ "code": "// Hello world",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-0:14",
+ "removal": "0:0-0:14"
+ }
+ ],
+ "domain": "0:0-0:14"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/condition/condition.doWhile",
+ "languageId": "swift",
+ "facet": "condition.doWhile",
+ "code": "repeat {} while true",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:16-0:20",
+ "removal": "0:15-0:20"
+ }
+ ],
+ "domain": "0:0-0:20"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/condition/condition.if",
+ "languageId": "swift",
+ "facet": "condition.if",
+ "code": "if true {}\nelse if false {}\nelse {}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:3-0:7",
+ "removal": "0:3-0:8"
+ }
+ ],
+ "domain": "0:0-2:7"
+ },
+ {
+ "targets": [
+ {
+ "content": "1:8-1:13",
+ "removal": "1:8-1:14"
+ }
+ ],
+ "domain": "1:0-1:16"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/condition/condition.switchCase.iteration",
+ "languageId": "swift",
+ "facet": "condition.switchCase.iteration",
+ "code": "switch value { }",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:14-0:15"
+ }
+ ],
+ "domain": "0:14-0:15"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/condition/condition.switchCase",
+ "languageId": "swift",
+ "facet": "condition.switchCase",
+ "code": "switch value {\n case 0: break\n}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "1:9-1:10",
+ "removal": "1:8-1:10"
+ }
+ ],
+ "domain": "1:4-2:0"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/condition/condition.switchCase2",
+ "languageId": "swift",
+ "facet": "condition.switchCase",
+ "code": "switch value {\n case 0, 1: break\n}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "1:9-1:13",
+ "removal": "1:8-1:13"
+ }
+ ],
+ "domain": "1:4-2:0"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/condition/condition.ternary",
+ "languageId": "swift",
+ "facet": "condition.ternary",
+ "code": "foo ? 0 : 1",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-0:3",
+ "removal": "0:0-0:4"
+ }
+ ],
+ "domain": "0:0-0:11"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/condition/condition.while",
+ "languageId": "swift",
+ "facet": "condition.while",
+ "code": "while foo {}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:6-0:9",
+ "removal": "0:6-0:10"
+ }
+ ],
+ "domain": "0:0-0:12"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/disqualifyDelimiter",
+ "languageId": "swift",
+ "facet": "disqualifyDelimiter",
+ "code": "1 < 2\n1 > 2\n1 <= 2\n1 >= 2\na << 2\na >> 2\na <<= 2\na >>= 2\na &<< 2\na &>> 2\na &<<= 2\na &>>= 2\na <~ 2\na >~ 2\n0..<2\n..<2\nlet foo: () -> Int",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:2-0:3"
+ }
+ ]
+ },
+ {
+ "targets": [
+ {
+ "content": "1:2-1:3"
+ }
+ ]
+ },
+ {
+ "targets": [
+ {
+ "content": "2:2-2:4"
+ }
+ ]
+ },
+ {
+ "targets": [
+ {
+ "content": "3:2-3:4"
+ }
+ ]
+ },
+ {
+ "targets": [
+ {
+ "content": "4:2-4:4"
+ }
+ ]
+ },
+ {
+ "targets": [
+ {
+ "content": "5:2-5:4"
+ }
+ ]
+ },
+ {
+ "targets": [
+ {
+ "content": "6:2-6:5"
+ }
+ ]
+ },
+ {
+ "targets": [
+ {
+ "content": "7:2-7:5"
+ }
+ ]
+ },
+ {
+ "targets": [
+ {
+ "content": "8:2-8:5"
+ }
+ ]
+ },
+ {
+ "targets": [
+ {
+ "content": "9:2-9:5"
+ }
+ ]
+ },
+ {
+ "targets": [
+ {
+ "content": "10:2-10:6"
+ }
+ ]
+ },
+ {
+ "targets": [
+ {
+ "content": "11:2-11:6"
+ }
+ ]
+ },
+ {
+ "targets": [
+ {
+ "content": "12:2-12:4"
+ }
+ ]
+ },
+ {
+ "targets": [
+ {
+ "content": "13:2-13:4"
+ }
+ ]
+ },
+ {
+ "targets": [
+ {
+ "content": "14:1-14:4"
+ }
+ ]
+ },
+ {
+ "targets": [
+ {
+ "content": "15:0-15:3"
+ }
+ ]
+ },
+ {
+ "targets": [
+ {
+ "content": "16:12-16:14"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/functionCall/functionCall.chain",
+ "languageId": "swift",
+ "facet": "functionCall.chain",
+ "code": "foo().bar()",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-0:5",
+ "removal": "0:0-0:5"
+ }
+ ],
+ "domain": "0:0-0:5"
+ },
+ {
+ "targets": [
+ {
+ "content": "0:0-0:11",
+ "removal": "0:0-0:11"
+ }
+ ],
+ "domain": "0:0-0:11"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/functionCall/functionCall.constructor",
+ "languageId": "swift",
+ "facet": "functionCall.constructor",
+ "code": "Foo()",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-0:5",
+ "removal": "0:0-0:5"
+ }
+ ],
+ "domain": "0:0-0:5"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/functionCall/functionCall.method",
+ "languageId": "swift",
+ "facet": "functionCall.method",
+ "code": "foo.bar()",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-0:9",
+ "removal": "0:0-0:9"
+ }
+ ],
+ "domain": "0:0-0:9"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/functionCall/functionCall",
+ "languageId": "swift",
+ "facet": "functionCall",
+ "code": "foo()",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-0:5",
+ "removal": "0:0-0:5"
+ }
+ ],
+ "domain": "0:0-0:5"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/functionCallee/functionCallee.chain",
+ "languageId": "swift",
+ "facet": "functionCallee.chain",
+ "code": "foo().bar()",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-0:3",
+ "removal": "0:0-0:3"
+ }
+ ],
+ "domain": "0:0-0:5"
+ },
+ {
+ "targets": [
+ {
+ "content": "0:0-0:9",
+ "removal": "0:0-0:9"
+ }
+ ],
+ "domain": "0:0-0:11"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/functionCallee/functionCallee.constructor",
+ "languageId": "swift",
+ "facet": "functionCallee.constructor",
+ "code": "Foo()",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-0:3",
+ "removal": "0:0-0:3"
+ }
+ ],
+ "domain": "0:0-0:5"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/functionCallee/functionCallee.method",
+ "languageId": "swift",
+ "facet": "functionCallee.method",
+ "code": "foo.bar()",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-0:7",
+ "removal": "0:0-0:7"
+ }
+ ],
+ "domain": "0:0-0:9"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/functionCallee/functionCallee",
+ "languageId": "swift",
+ "facet": "functionCallee",
+ "code": "foo()",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-0:3",
+ "removal": "0:0-0:3"
+ }
+ ],
+ "domain": "0:0-0:5"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/ifStatement",
+ "languageId": "swift",
+ "facet": "ifStatement",
+ "code": "if true {}\nelse if false {}\nelse {}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-2:7",
+ "removal": "0:0-2:7"
+ }
+ ],
+ "domain": "0:0-2:7"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/interior/interior.class",
+ "languageId": "swift",
+ "facet": "interior.class",
+ "code": "class Foo { }",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:11-0:12",
+ "removal": "0:11-0:12"
+ }
+ ],
+ "domain": "0:11-0:12"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/interior/interior.constructor",
+ "languageId": "swift",
+ "facet": "interior.constructor",
+ "code": "struct Foo {\n init() { }\n}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "1:2-1:12",
+ "removal": "0:12-2:0"
+ }
+ ],
+ "domain": "0:12-2:0"
+ },
+ {
+ "targets": [
+ {
+ "content": "1:10-1:11",
+ "removal": "1:10-1:11"
+ }
+ ],
+ "domain": "1:10-1:11"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/interior/interior.doWhile",
+ "languageId": "swift",
+ "facet": "interior.doWhile",
+ "code": "repeat { } while foo",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:8-0:9",
+ "removal": "0:8-0:9"
+ }
+ ],
+ "domain": "0:8-0:9"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/interior/interior.enum",
+ "languageId": "swift",
+ "facet": "interior.enum",
+ "code": "enum Foo { }",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:10-0:11",
+ "removal": "0:10-0:11"
+ }
+ ],
+ "domain": "0:10-0:11"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/interior/interior.foreach",
+ "languageId": "swift",
+ "facet": "interior.foreach",
+ "code": "for v in values { }",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:17-0:18",
+ "removal": "0:17-0:18"
+ }
+ ],
+ "domain": "0:17-0:18"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/interior/interior.function",
+ "languageId": "swift",
+ "facet": "interior.function",
+ "code": "func foo() { }",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:12-0:13",
+ "removal": "0:12-0:13"
+ }
+ ],
+ "domain": "0:12-0:13"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/interior/interior.if",
+ "languageId": "swift",
+ "facet": "interior.if",
+ "code": "if (true) { }\nelse if (false) { }\nelse { }",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:11-0:12",
+ "removal": "0:11-0:12"
+ }
+ ],
+ "domain": "0:11-0:12"
+ },
+ {
+ "targets": [
+ {
+ "content": "1:17-1:18",
+ "removal": "1:17-1:18"
+ }
+ ],
+ "domain": "1:17-1:18"
+ },
+ {
+ "targets": [
+ {
+ "content": "2:6-2:7",
+ "removal": "2:6-2:7"
+ }
+ ],
+ "domain": "2:6-2:7"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/interior/interior.if2",
+ "languageId": "swift",
+ "facet": "interior.if",
+ "code": "if (true) { }",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:11-0:12",
+ "removal": "0:11-0:12"
+ }
+ ],
+ "domain": "0:11-0:12"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/interior/interior.if3",
+ "languageId": "swift",
+ "facet": "interior.if",
+ "code": "if (true) { }\nelse { }",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:11-0:12",
+ "removal": "0:11-0:12"
+ }
+ ],
+ "domain": "0:11-0:12"
+ },
+ {
+ "targets": [
+ {
+ "content": "1:6-1:7",
+ "removal": "1:6-1:7"
+ }
+ ],
+ "domain": "1:6-1:7"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/interior/interior.if4",
+ "languageId": "swift",
+ "facet": "interior.if",
+ "code": "if (true) { }\nelse if (false) { }",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:11-0:12",
+ "removal": "0:11-0:12"
+ }
+ ],
+ "domain": "0:11-0:12"
+ },
+ {
+ "targets": [
+ {
+ "content": "1:17-1:18",
+ "removal": "1:17-1:18"
+ }
+ ],
+ "domain": "1:17-1:18"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/interior/interior.interface",
+ "languageId": "swift",
+ "facet": "interior.interface",
+ "code": "protocol Foo { }",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:14-0:15",
+ "removal": "0:14-0:15"
+ }
+ ],
+ "domain": "0:14-0:15"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/interior/interior.lambda",
+ "languageId": "swift",
+ "facet": "interior.lambda",
+ "code": "{ () in 0 }",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:8-0:9",
+ "removal": "0:8-0:9"
+ }
+ ],
+ "domain": "0:8-0:9"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/interior/interior.method",
+ "languageId": "swift",
+ "facet": "interior.method",
+ "code": "struct Foo {\n func bar() { }\n}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "1:2-1:16",
+ "removal": "0:12-2:0"
+ }
+ ],
+ "domain": "0:12-2:0"
+ },
+ {
+ "targets": [
+ {
+ "content": "1:14-1:15",
+ "removal": "1:14-1:15"
+ }
+ ],
+ "domain": "1:14-1:15"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/interior/interior.switch",
+ "languageId": "swift",
+ "facet": "interior.switch",
+ "code": "switch value { }",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:14-0:15",
+ "removal": "0:14-0:15"
+ }
+ ],
+ "domain": "0:14-0:15"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/interior/interior.switchCase",
+ "languageId": "swift",
+ "facet": "interior.switchCase",
+ "code": "switch value {\n case 0:\n bar\n break\n default:\n bar\n break\n}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "1:4-6:13",
+ "removal": "0:14-7:0"
+ }
+ ],
+ "domain": "0:14-7:0"
+ },
+ {
+ "targets": [
+ {
+ "content": "2:8-3:13",
+ "removal": "1:11-3:13"
+ }
+ ],
+ "domain": "1:11-3:13"
+ },
+ {
+ "targets": [
+ {
+ "content": "5:8-6:13",
+ "removal": "4:12-7:0"
+ }
+ ],
+ "domain": "4:12-7:0"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/interior/interior.try",
+ "languageId": "swift",
+ "facet": "interior.try",
+ "code": "do { }\ncatch { }",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:4-0:5",
+ "removal": "0:4-0:5"
+ }
+ ],
+ "domain": "0:4-0:5"
+ },
+ {
+ "targets": [
+ {
+ "content": "1:7-1:8",
+ "removal": "1:7-1:8"
+ }
+ ],
+ "domain": "1:7-1:8"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/interior/interior.while",
+ "languageId": "swift",
+ "facet": "interior.while",
+ "code": "while foo { }",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:11-0:12",
+ "removal": "0:11-0:12"
+ }
+ ],
+ "domain": "0:11-0:12"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/key.mapPair.iteration",
+ "languageId": "swift",
+ "facet": "key.mapPair.iteration",
+ "code": "[foo: 0, bar: 1]",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:1-0:15"
+ }
+ ],
+ "domain": "0:1-0:15"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/key.mapPair",
+ "languageId": "swift",
+ "facet": "key.mapPair",
+ "code": "[foo: 0, bar: 1]",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:1-0:4",
+ "removal": "0:1-0:6"
+ }
+ ],
+ "domain": "0:1-0:7"
+ },
+ {
+ "targets": [
+ {
+ "content": "0:9-0:12",
+ "removal": "0:9-0:14"
+ }
+ ],
+ "domain": "0:9-0:15"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/list",
+ "languageId": "swift",
+ "facet": "list",
+ "code": "[aaa, bbb]",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-0:10",
+ "removal": "0:0-0:10"
+ }
+ ],
+ "domain": "0:0-0:10"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/map",
+ "languageId": "swift",
+ "facet": "map",
+ "code": "[aaa: 0, bbb: 1]",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-0:16",
+ "removal": "0:0-0:16"
+ }
+ ],
+ "domain": "0:0-0:16"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/name/name.argument.actual.iteration",
+ "languageId": "swift",
+ "facet": "name.argument.actual.iteration",
+ "code": "foo(aaa: 0, bbb: 1)",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-0:19"
+ }
+ ],
+ "domain": "0:0-0:19"
+ },
+ {
+ "targets": [
+ {
+ "content": "0:4-0:18"
+ }
+ ],
+ "domain": "0:4-0:18"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/name/name.argument.actual",
+ "languageId": "swift",
+ "facet": "name.argument.actual",
+ "code": "foo(aaa: 0, bbb: 1)",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:4-0:7",
+ "removal": "0:4-0:9"
+ }
+ ],
+ "domain": "0:4-0:10"
+ },
+ {
+ "targets": [
+ {
+ "content": "0:12-0:15",
+ "removal": "0:12-0:17"
+ }
+ ],
+ "domain": "0:12-0:18"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/name/name.argument.catch",
+ "languageId": "swift",
+ "facet": "name.argument.catch",
+ "code": "do {}\ncatch let e as Error {}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "1:10-1:11",
+ "removal": "1:10-1:12"
+ }
+ ],
+ "domain": "1:6-1:20"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/name/name.argument.catch2",
+ "languageId": "swift",
+ "facet": "name.argument.catch",
+ "code": "do {}\ncatch let e {}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "1:10-1:11",
+ "removal": "1:10-1:12"
+ }
+ ],
+ "domain": "1:6-1:11"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/name/name.argument.formal.constructor.iteration",
+ "languageId": "swift",
+ "facet": "name.argument.formal.constructor.iteration",
+ "code": "struct Foo {\n init(aaa: Int, bbb: Int = 0) {}\n}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-2:1"
+ }
+ ],
+ "domain": "0:0-2:1"
+ },
+ {
+ "targets": [
+ {
+ "content": "0:12-2:0"
+ }
+ ],
+ "domain": "0:12-2:0"
+ },
+ {
+ "targets": [
+ {
+ "content": "1:9-1:31"
+ }
+ ],
+ "domain": "1:9-1:31"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/name/name.argument.formal.constructor",
+ "languageId": "swift",
+ "facet": "name.argument.formal.constructor",
+ "code": "struct Foo {\n init(aaa: Int, bbb: Int = 0) {}\n}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:7-0:10",
+ "removal": "0:7-0:11"
+ }
+ ],
+ "domain": "0:0-2:1"
+ },
+ {
+ "targets": [
+ {
+ "content": "1:4-1:8",
+ "removal": "1:4-1:8"
+ }
+ ],
+ "domain": "1:4-1:35"
+ },
+ {
+ "targets": [
+ {
+ "content": "1:9-1:12",
+ "removal": "1:9-1:12"
+ }
+ ],
+ "domain": "1:9-1:17"
+ },
+ {
+ "targets": [
+ {
+ "content": "1:19-1:22",
+ "removal": "1:18-1:22"
+ }
+ ],
+ "domain": "1:19-1:31"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/name/name.argument.formal.iteration",
+ "languageId": "swift",
+ "facet": "name.argument.formal.iteration",
+ "code": "func foo(aaa: Int, bbb: Int = 0) {}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-0:35"
+ }
+ ],
+ "domain": "0:0-0:35"
+ },
+ {
+ "targets": [
+ {
+ "content": "0:9-0:31"
+ }
+ ],
+ "domain": "0:9-0:31"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/name/name.argument.formal.lambda.iteration",
+ "languageId": "swift",
+ "facet": "name.argument.formal.lambda.iteration",
+ "code": "{ (aaa, bbb: Int) in }",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-0:22"
+ }
+ ],
+ "domain": "0:0-0:22"
+ },
+ {
+ "targets": [
+ {
+ "content": "0:3-0:16"
+ }
+ ],
+ "domain": "0:3-0:16"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/name/name.argument.formal.lambda",
+ "languageId": "swift",
+ "facet": "name.argument.formal.lambda",
+ "code": "{ (aaa, bbb: Int) in }",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:3-0:6",
+ "removal": "0:3-0:6"
+ }
+ ],
+ "domain": "0:3-0:6"
+ },
+ {
+ "targets": [
+ {
+ "content": "0:8-0:11",
+ "removal": "0:7-0:11"
+ }
+ ],
+ "domain": "0:8-0:11"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/name/name.argument.formal.method.iteration",
+ "languageId": "swift",
+ "facet": "name.argument.formal.method.iteration",
+ "code": "struct Foo {\n func bar(aaa: Int, bbb: Int = 0) {}\n}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-2:1"
+ }
+ ],
+ "domain": "0:0-2:1"
+ },
+ {
+ "targets": [
+ {
+ "content": "0:12-2:0"
+ }
+ ],
+ "domain": "0:12-2:0"
+ },
+ {
+ "targets": [
+ {
+ "content": "1:13-1:35"
+ }
+ ],
+ "domain": "1:13-1:35"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/name/name.argument.formal.method",
+ "languageId": "swift",
+ "facet": "name.argument.formal.method",
+ "code": "struct Foo {\n func bar(aaa: Int, bbb: Int) {}\n}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:7-0:10",
+ "removal": "0:7-0:11"
+ }
+ ],
+ "domain": "0:0-2:1"
+ },
+ {
+ "targets": [
+ {
+ "content": "1:9-1:12",
+ "removal": "1:9-1:12"
+ }
+ ],
+ "domain": "1:4-1:35"
+ },
+ {
+ "targets": [
+ {
+ "content": "1:13-1:16",
+ "removal": "1:13-1:16"
+ }
+ ],
+ "domain": "1:13-1:21"
+ },
+ {
+ "targets": [
+ {
+ "content": "1:23-1:26",
+ "removal": "1:22-1:26"
+ }
+ ],
+ "domain": "1:23-1:31"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/name/name.argument.formal",
+ "languageId": "swift",
+ "facet": "name.argument.formal",
+ "code": "func foo(aaa: Int, bbb: Int = 0) {}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:5-0:8",
+ "removal": "0:5-0:8"
+ }
+ ],
+ "domain": "0:0-0:35"
+ },
+ {
+ "targets": [
+ {
+ "content": "0:9-0:12",
+ "removal": "0:9-0:12"
+ }
+ ],
+ "domain": "0:9-0:17"
+ },
+ {
+ "targets": [
+ {
+ "content": "0:19-0:22",
+ "removal": "0:18-0:22"
+ }
+ ],
+ "domain": "0:19-0:31"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/name/name.assignment.compound",
+ "languageId": "swift",
+ "facet": "name.assignment.compound",
+ "code": "foo += 0",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-0:3",
+ "removal": "0:0-0:4"
+ }
+ ],
+ "domain": "0:0-0:8"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/name/name.assignment.destructuring",
+ "languageId": "swift",
+ "facet": "name.assignment.destructuring",
+ "code": "(foo, bar) = (0, 1)",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-0:10",
+ "removal": "0:0-0:11"
+ }
+ ],
+ "domain": "0:0-0:19"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/name/name.assignment",
+ "languageId": "swift",
+ "facet": "name.assignment",
+ "code": "foo = 0",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-0:3",
+ "removal": "0:0-0:4"
+ }
+ ],
+ "domain": "0:0-0:7"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/name/name.class",
+ "languageId": "swift",
+ "facet": "name.class",
+ "code": "class Foo {}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:6-0:9",
+ "removal": "0:6-0:10"
+ }
+ ],
+ "domain": "0:0-0:12"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/name/name.constant",
+ "languageId": "swift",
+ "facet": "name.constant",
+ "code": "let foo = 0",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:4-0:7",
+ "removal": "0:4-0:8"
+ }
+ ],
+ "domain": "0:0-0:11"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/name/name.constructor",
+ "languageId": "swift",
+ "facet": "name.constructor",
+ "code": "struct Foo {\n init() {}\n}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:7-0:10",
+ "removal": "0:7-0:11"
+ }
+ ],
+ "domain": "0:0-2:1"
+ },
+ {
+ "targets": [
+ {
+ "content": "1:2-1:6",
+ "removal": "1:2-1:6"
+ }
+ ],
+ "domain": "1:2-1:11"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/name/name.enum",
+ "languageId": "swift",
+ "facet": "name.enum",
+ "code": "enum Foo {}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:5-0:8",
+ "removal": "0:5-0:9"
+ }
+ ],
+ "domain": "0:0-0:11"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/name/name.field.class",
+ "languageId": "swift",
+ "facet": "name.field.class",
+ "code": "struct Foo {\n var bar: Int\n var baz: Int = 0\n}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:7-0:10",
+ "removal": "0:7-0:11"
+ }
+ ],
+ "domain": "0:0-3:1"
+ },
+ {
+ "targets": [
+ {
+ "content": "1:8-1:11",
+ "removal": "1:7-1:11"
+ }
+ ],
+ "domain": "1:4-1:16"
+ },
+ {
+ "targets": [
+ {
+ "content": "2:8-2:11",
+ "removal": "2:7-2:11"
+ }
+ ],
+ "domain": "2:4-2:20"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/name/name.field.enum",
+ "languageId": "swift",
+ "facet": "name.field.enum",
+ "code": "enum Foo: Int {\n case bar = 0\n case baz = 1\n}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:5-0:8",
+ "removal": "0:4-0:8"
+ }
+ ],
+ "domain": "0:0-3:1"
+ },
+ {
+ "targets": [
+ {
+ "content": "1:7-1:10",
+ "removal": "1:7-1:11"
+ }
+ ],
+ "domain": "1:2-1:14"
+ },
+ {
+ "targets": [
+ {
+ "content": "2:7-2:10",
+ "removal": "2:7-2:11"
+ }
+ ],
+ "domain": "2:2-2:14"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/name/name.field.interface",
+ "languageId": "swift",
+ "facet": "name.field.interface",
+ "code": "protocol Foo {\n var bar: Int { get set }\n}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:9-0:12",
+ "removal": "0:9-0:13"
+ }
+ ],
+ "domain": "0:0-2:1"
+ },
+ {
+ "targets": [
+ {
+ "content": "1:6-1:9",
+ "removal": "1:5-1:9"
+ }
+ ],
+ "domain": "1:2-1:26"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/name/name.foreach",
+ "languageId": "swift",
+ "facet": "name.foreach",
+ "code": "for v in values {}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:4-0:5",
+ "removal": "0:4-0:6"
+ }
+ ],
+ "domain": "0:0-0:18"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/name/name.function",
+ "languageId": "swift",
+ "facet": "name.function",
+ "code": "func foo() {}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:5-0:8",
+ "removal": "0:5-0:8"
+ }
+ ],
+ "domain": "0:0-0:13"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/name/name.interface",
+ "languageId": "swift",
+ "facet": "name.interface",
+ "code": "protocol Foo {}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:9-0:12",
+ "removal": "0:9-0:13"
+ }
+ ],
+ "domain": "0:0-0:15"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/name/name.iteration.block",
+ "languageId": "swift",
+ "facet": "name.iteration.block",
+ "code": "struct Foo {\n func bar() { }\n}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-2:1"
+ }
+ ],
+ "domain": "0:0-2:1"
+ },
+ {
+ "targets": [
+ {
+ "content": "0:12-2:0"
+ }
+ ],
+ "domain": "0:12-2:0"
+ },
+ {
+ "targets": [
+ {
+ "content": "1:16-1:17"
+ }
+ ],
+ "domain": "1:16-1:17"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/name/name.iteration.block2",
+ "languageId": "swift",
+ "facet": "name.iteration.block",
+ "code": "func foo() { }",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-0:14"
+ }
+ ],
+ "domain": "0:0-0:14"
+ },
+ {
+ "targets": [
+ {
+ "content": "0:12-0:13"
+ }
+ ],
+ "domain": "0:12-0:13"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/name/name.iteration.block3",
+ "languageId": "swift",
+ "facet": "name.iteration.block",
+ "code": "if true { }\nelse if false { }\nelse { }",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-2:8"
+ }
+ ],
+ "domain": "0:0-2:8"
+ },
+ {
+ "targets": [
+ {
+ "content": "0:9-0:10"
+ }
+ ],
+ "domain": "0:9-0:10"
+ },
+ {
+ "targets": [
+ {
+ "content": "1:15-1:16"
+ }
+ ],
+ "domain": "1:15-1:16"
+ },
+ {
+ "targets": [
+ {
+ "content": "2:6-2:7"
+ }
+ ],
+ "domain": "2:6-2:7"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/name/name.iteration.block4",
+ "languageId": "swift",
+ "facet": "name.iteration.block",
+ "code": "while true { }",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-0:14"
+ }
+ ],
+ "domain": "0:0-0:14"
+ },
+ {
+ "targets": [
+ {
+ "content": "0:12-0:13"
+ }
+ ],
+ "domain": "0:12-0:13"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/name/name.iteration.class",
+ "languageId": "swift",
+ "facet": "name.iteration.class",
+ "code": "class Foo { }",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-0:13"
+ }
+ ],
+ "domain": "0:0-0:13"
+ },
+ {
+ "targets": [
+ {
+ "content": "0:11-0:12"
+ }
+ ],
+ "domain": "0:11-0:12"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/name/name.iteration.document",
+ "languageId": "swift",
+ "facet": "name.iteration.document",
+ "code": "\nlet foo = 0\nlet bar = 1\n",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-3:0"
+ }
+ ],
+ "domain": "0:0-3:0"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/name/name.iteration.enum",
+ "languageId": "swift",
+ "facet": "name.iteration.enum",
+ "code": "enum Foo { }",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-0:12"
+ }
+ ],
+ "domain": "0:0-0:12"
+ },
+ {
+ "targets": [
+ {
+ "content": "0:10-0:11"
+ }
+ ],
+ "domain": "0:10-0:11"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/name/name.iteration.interface",
+ "languageId": "swift",
+ "facet": "name.iteration.interface",
+ "code": "protocol Foo { }",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-0:16"
+ }
+ ],
+ "domain": "0:0-0:16"
+ },
+ {
+ "targets": [
+ {
+ "content": "0:14-0:15"
+ }
+ ],
+ "domain": "0:14-0:15"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/name/name.method.interface",
+ "languageId": "swift",
+ "facet": "name.method.interface",
+ "code": "protocol Foo {\n func bar()\n}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:9-0:12",
+ "removal": "0:9-0:13"
+ }
+ ],
+ "domain": "0:0-2:1"
+ },
+ {
+ "targets": [
+ {
+ "content": "1:7-1:10",
+ "removal": "1:7-1:10"
+ }
+ ],
+ "domain": "1:2-1:12"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/name/name.method",
+ "languageId": "swift",
+ "facet": "name.method",
+ "code": "struct Foo {\n func bar() {}\n}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:7-0:10",
+ "removal": "0:7-0:11"
+ }
+ ],
+ "domain": "0:0-2:1"
+ },
+ {
+ "targets": [
+ {
+ "content": "1:7-1:10",
+ "removal": "1:7-1:10"
+ }
+ ],
+ "domain": "1:2-1:15"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/name/name.typeAlias",
+ "languageId": "swift",
+ "facet": "name.typeAlias",
+ "code": "typealias Foo = Int",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:10-0:13",
+ "removal": "0:10-0:14"
+ }
+ ],
+ "domain": "0:0-0:19"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/name/name.variable.destructuring",
+ "languageId": "swift",
+ "facet": "name.variable.destructuring",
+ "code": "let (foo, bar) = (0, 1)",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:4-0:14",
+ "removal": "0:4-0:15"
+ }
+ ],
+ "domain": "0:0-0:23"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/name/name.variable.initialized",
+ "languageId": "swift",
+ "facet": "name.variable.initialized",
+ "code": "var foo = 0",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:4-0:7",
+ "removal": "0:4-0:8"
+ }
+ ],
+ "domain": "0:0-0:11"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/name/name.variable.uninitialized",
+ "languageId": "swift",
+ "facet": "name.variable.uninitialized",
+ "code": "var foo: Int",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:4-0:7",
+ "removal": "0:3-0:7"
+ }
+ ],
+ "domain": "0:0-0:12"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/namedFunction/namedFunction.constructor",
+ "languageId": "swift",
+ "facet": "namedFunction.constructor",
+ "code": "struct Foo {\n init() {}\n}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "1:2-1:11",
+ "removal": "1:0-2:0"
+ }
+ ],
+ "domain": "1:2-1:11"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/namedFunction/namedFunction.iteration.class",
+ "languageId": "swift",
+ "facet": "namedFunction.iteration.class",
+ "code": "struct Foo { }",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-0:14"
+ }
+ ],
+ "domain": "0:0-0:14"
+ },
+ {
+ "targets": [
+ {
+ "content": "0:12-0:13"
+ }
+ ],
+ "domain": "0:12-0:13"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/namedFunction/namedFunction.iteration.document",
+ "languageId": "swift",
+ "facet": "namedFunction.iteration.document",
+ "code": "\nfunc foo() {}\n",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-2:0"
+ }
+ ],
+ "domain": "0:0-2:0"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/namedFunction/namedFunction.method",
+ "languageId": "swift",
+ "facet": "namedFunction.method",
+ "code": "struct Foo {\n func bar() {}\n}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "1:2-1:15",
+ "removal": "1:0-2:0"
+ }
+ ],
+ "domain": "1:2-1:15"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/namedFunction/namedFunction",
+ "languageId": "swift",
+ "facet": "namedFunction",
+ "code": "func foo() {}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-0:13",
+ "removal": "0:0-0:13"
+ }
+ ],
+ "domain": "0:0-0:13"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/regularExpression",
+ "languageId": "swift",
+ "facet": "regularExpression",
+ "code": "/\\d+$/",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-0:6",
+ "removal": "0:0-0:6"
+ }
+ ],
+ "domain": "0:0-0:6"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/statement/statement.assignment.compound",
+ "languageId": "swift",
+ "facet": "statement.assignment.compound",
+ "code": "foo += 0",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-0:8",
+ "removal": "0:0-0:8"
+ }
+ ],
+ "domain": "0:0-0:8"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/statement/statement.assignment.destructuring",
+ "languageId": "swift",
+ "facet": "statement.assignment.destructuring",
+ "code": "(foo, bar) = (0, 1)",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-0:19",
+ "removal": "0:0-0:19"
+ }
+ ],
+ "domain": "0:0-0:19"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/statement/statement.assignment",
+ "languageId": "swift",
+ "facet": "statement.assignment",
+ "code": "foo = 0",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-0:7",
+ "removal": "0:0-0:7"
+ }
+ ],
+ "domain": "0:0-0:7"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/statement/statement.break",
+ "languageId": "swift",
+ "facet": "statement.break",
+ "code": "while true {\n break\n}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-2:1",
+ "removal": "0:0-2:1"
+ }
+ ],
+ "domain": "0:0-2:1"
+ },
+ {
+ "targets": [
+ {
+ "content": "1:4-1:9",
+ "removal": "1:0-2:0"
+ }
+ ],
+ "domain": "1:4-1:9"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/statement/statement.class",
+ "languageId": "swift",
+ "facet": "statement.class",
+ "code": "class Foo {}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-0:12",
+ "removal": "0:0-0:12"
+ }
+ ],
+ "domain": "0:0-0:12"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/statement/statement.constant",
+ "languageId": "swift",
+ "facet": "statement.constant",
+ "code": "let foo = 0",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-0:11",
+ "removal": "0:0-0:11"
+ }
+ ],
+ "domain": "0:0-0:11"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/statement/statement.constructor",
+ "languageId": "swift",
+ "facet": "statement.constructor",
+ "code": "struct Foo {\n init() {}\n}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-2:1",
+ "removal": "0:0-2:1"
+ }
+ ],
+ "domain": "0:0-2:1"
+ },
+ {
+ "targets": [
+ {
+ "content": "1:2-1:11",
+ "removal": "1:0-2:0"
+ }
+ ],
+ "domain": "1:2-1:11"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/statement/statement.continue",
+ "languageId": "swift",
+ "facet": "statement.continue",
+ "code": "while true {\n continue\n}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-2:1",
+ "removal": "0:0-2:1"
+ }
+ ],
+ "domain": "0:0-2:1"
+ },
+ {
+ "targets": [
+ {
+ "content": "1:4-1:12",
+ "removal": "1:0-2:0"
+ }
+ ],
+ "domain": "1:4-1:12"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/statement/statement.doWhile",
+ "languageId": "swift",
+ "facet": "statement.doWhile",
+ "code": "repeat {} while foo",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-0:19",
+ "removal": "0:0-0:19"
+ }
+ ],
+ "domain": "0:0-0:19"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/statement/statement.enum",
+ "languageId": "swift",
+ "facet": "statement.enum",
+ "code": "enum Foo {}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-0:11",
+ "removal": "0:0-0:11"
+ }
+ ],
+ "domain": "0:0-0:11"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/statement/statement.field.class",
+ "languageId": "swift",
+ "facet": "statement.field.class",
+ "code": "struct Foo {\n var bar = 0\n}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-2:1",
+ "removal": "0:0-2:1"
+ }
+ ],
+ "domain": "0:0-2:1"
+ },
+ {
+ "targets": [
+ {
+ "content": "1:2-1:13",
+ "removal": "1:0-2:0"
+ }
+ ],
+ "domain": "1:2-1:13"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/statement/statement.field.interface",
+ "languageId": "swift",
+ "facet": "statement.field.interface",
+ "code": "protocol Foo {\n var bar: Int { get set }\n}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-2:1",
+ "removal": "0:0-2:1"
+ }
+ ],
+ "domain": "0:0-2:1"
+ },
+ {
+ "targets": [
+ {
+ "content": "1:2-1:26",
+ "removal": "1:0-2:0"
+ }
+ ],
+ "domain": "1:2-1:26"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/statement/statement.foreach",
+ "languageId": "swift",
+ "facet": "statement.foreach",
+ "code": "for v in values {}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-0:18",
+ "removal": "0:0-0:18"
+ }
+ ],
+ "domain": "0:0-0:18"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/statement/statement.function",
+ "languageId": "swift",
+ "facet": "statement.function",
+ "code": "func foo() {}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-0:13",
+ "removal": "0:0-0:13"
+ }
+ ],
+ "domain": "0:0-0:13"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/statement/statement.functionCall",
+ "languageId": "swift",
+ "facet": "statement.functionCall",
+ "code": "foo()",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-0:5",
+ "removal": "0:0-0:5"
+ }
+ ],
+ "domain": "0:0-0:5"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/statement/statement.if",
+ "languageId": "swift",
+ "facet": "statement.if",
+ "code": "if true {}\nelse if false {}\nelse {}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-2:7",
+ "removal": "0:0-2:7"
+ }
+ ],
+ "domain": "0:0-2:7"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/statement/statement.import",
+ "languageId": "swift",
+ "facet": "statement.import",
+ "code": "import Foo",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-0:10",
+ "removal": "0:0-0:10"
+ }
+ ],
+ "domain": "0:0-0:10"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/statement/statement.interface",
+ "languageId": "swift",
+ "facet": "statement.interface",
+ "code": "protocol Foo {}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-0:15",
+ "removal": "0:0-0:15"
+ }
+ ],
+ "domain": "0:0-0:15"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/statement/statement.iteration.block",
+ "languageId": "swift",
+ "facet": "statement.iteration.block",
+ "code": "struct Foo {\n func bar() { }\n}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-2:1"
+ }
+ ],
+ "domain": "0:0-2:1"
+ },
+ {
+ "targets": [
+ {
+ "content": "0:12-2:0"
+ }
+ ],
+ "domain": "0:12-2:0"
+ },
+ {
+ "targets": [
+ {
+ "content": "1:16-1:17"
+ }
+ ],
+ "domain": "1:16-1:17"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/statement/statement.iteration.block2",
+ "languageId": "swift",
+ "facet": "statement.iteration.block",
+ "code": "func foo() { }",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-0:14"
+ }
+ ],
+ "domain": "0:0-0:14"
+ },
+ {
+ "targets": [
+ {
+ "content": "0:12-0:13"
+ }
+ ],
+ "domain": "0:12-0:13"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/statement/statement.iteration.block3",
+ "languageId": "swift",
+ "facet": "statement.iteration.block",
+ "code": "if true { }\nelse if false { }\nelse { }",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-2:8"
+ }
+ ],
+ "domain": "0:0-2:8"
+ },
+ {
+ "targets": [
+ {
+ "content": "0:9-0:10"
+ }
+ ],
+ "domain": "0:9-0:10"
+ },
+ {
+ "targets": [
+ {
+ "content": "1:15-1:16"
+ }
+ ],
+ "domain": "1:15-1:16"
+ },
+ {
+ "targets": [
+ {
+ "content": "2:6-2:7"
+ }
+ ],
+ "domain": "2:6-2:7"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/statement/statement.iteration.block4",
+ "languageId": "swift",
+ "facet": "statement.iteration.block",
+ "code": "while true { }",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-0:14"
+ }
+ ],
+ "domain": "0:0-0:14"
+ },
+ {
+ "targets": [
+ {
+ "content": "0:12-0:13"
+ }
+ ],
+ "domain": "0:12-0:13"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/statement/statement.iteration.class",
+ "languageId": "swift",
+ "facet": "statement.iteration.class",
+ "code": "class Foo { }",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-0:13"
+ }
+ ],
+ "domain": "0:0-0:13"
+ },
+ {
+ "targets": [
+ {
+ "content": "0:11-0:12"
+ }
+ ],
+ "domain": "0:11-0:12"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/statement/statement.iteration.document",
+ "languageId": "swift",
+ "facet": "statement.iteration.document",
+ "code": "\nvar foo: Int\n",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-2:0"
+ }
+ ],
+ "domain": "0:0-2:0"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/statement/statement.iteration.interface",
+ "languageId": "swift",
+ "facet": "statement.iteration.interface",
+ "code": "protocol Foo { }",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-0:16"
+ }
+ ],
+ "domain": "0:0-0:16"
+ },
+ {
+ "targets": [
+ {
+ "content": "0:14-0:15"
+ }
+ ],
+ "domain": "0:14-0:15"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/statement/statement.method.interface",
+ "languageId": "swift",
+ "facet": "statement.method.interface",
+ "code": "protocol Foo {\n func bar()\n}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-2:1",
+ "removal": "0:0-2:1"
+ }
+ ],
+ "domain": "0:0-2:1"
+ },
+ {
+ "targets": [
+ {
+ "content": "1:2-1:12",
+ "removal": "1:0-2:0"
+ }
+ ],
+ "domain": "1:2-1:12"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/statement/statement.method",
+ "languageId": "swift",
+ "facet": "statement.method",
+ "code": "struct Foo {\n func bar() {}\n}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-2:1",
+ "removal": "0:0-2:1"
+ }
+ ],
+ "domain": "0:0-2:1"
+ },
+ {
+ "targets": [
+ {
+ "content": "1:2-1:15",
+ "removal": "1:0-2:0"
+ }
+ ],
+ "domain": "1:2-1:15"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/statement/statement.return",
+ "languageId": "swift",
+ "facet": "statement.return",
+ "code": "func foo() {\n return 0\n}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-2:1",
+ "removal": "0:0-2:1"
+ }
+ ],
+ "domain": "0:0-2:1"
+ },
+ {
+ "targets": [
+ {
+ "content": "1:4-1:12",
+ "removal": "1:0-2:0"
+ }
+ ],
+ "domain": "1:4-1:12"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/statement/statement.switch",
+ "languageId": "swift",
+ "facet": "statement.switch",
+ "code": "switch value {}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-0:15",
+ "removal": "0:0-0:15"
+ }
+ ],
+ "domain": "0:0-0:15"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/statement/statement.throw",
+ "languageId": "swift",
+ "facet": "statement.throw",
+ "code": "func foo() throws {\n throw Error\n}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-2:1",
+ "removal": "0:0-2:1"
+ }
+ ],
+ "domain": "0:0-2:1"
+ },
+ {
+ "targets": [
+ {
+ "content": "1:4-1:15",
+ "removal": "1:0-2:0"
+ }
+ ],
+ "domain": "1:4-1:15"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/statement/statement.try",
+ "languageId": "swift",
+ "facet": "statement.try",
+ "code": "do {}\ncatch {}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-1:8",
+ "removal": "0:0-1:8"
+ }
+ ],
+ "domain": "0:0-1:8"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/statement/statement.typeAlias",
+ "languageId": "swift",
+ "facet": "statement.typeAlias",
+ "code": "typealias Foo = Int",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-0:19",
+ "removal": "0:0-0:19"
+ }
+ ],
+ "domain": "0:0-0:19"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/statement/statement.variable.destructuring",
+ "languageId": "swift",
+ "facet": "statement.variable.destructuring",
+ "code": "let (foo, bar) = (0, 1)",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-0:23",
+ "removal": "0:0-0:23"
+ }
+ ],
+ "domain": "0:0-0:23"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/statement/statement.variable.initialized",
+ "languageId": "swift",
+ "facet": "statement.variable.initialized",
+ "code": "var foo = 0",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-0:11",
+ "removal": "0:0-0:11"
+ }
+ ],
+ "domain": "0:0-0:11"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/statement/statement.variable.uninitialized",
+ "languageId": "swift",
+ "facet": "statement.variable.uninitialized",
+ "code": "var foo: Int",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-0:12",
+ "removal": "0:0-0:12"
+ }
+ ],
+ "domain": "0:0-0:12"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/statement/statement.while",
+ "languageId": "swift",
+ "facet": "statement.while",
+ "code": "while true {}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-0:13",
+ "removal": "0:0-0:13"
+ }
+ ],
+ "domain": "0:0-0:13"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/statement/statement.yield",
+ "languageId": "swift",
+ "facet": "statement.yield",
+ "code": "var foo: Int {\n _read {\n yield 0\n }\n}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-4:1",
+ "removal": "0:0-4:1"
+ }
+ ],
+ "domain": "0:0-4:1"
+ },
+ {
+ "targets": [
+ {
+ "content": "1:4-3:5",
+ "removal": "1:0-4:0"
+ }
+ ],
+ "domain": "1:4-3:5"
+ },
+ {
+ "targets": [
+ {
+ "content": "2:8-2:15",
+ "removal": "2:0-3:0"
+ }
+ ],
+ "domain": "2:8-2:15"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/string.multiLine",
+ "languageId": "swift",
+ "facet": "string.multiLine",
+ "code": "\"\"\"\nHello\nworld\n\"\"\"",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-3:3",
+ "removal": "0:0-3:3"
+ }
+ ],
+ "domain": "0:0-3:3"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/string.singleLine",
+ "languageId": "swift",
+ "facet": "string.singleLine",
+ "code": "\"Hello world\"",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-0:13",
+ "removal": "0:0-0:13"
+ }
+ ],
+ "domain": "0:0-0:13"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/string.singleLine2",
+ "languageId": "swift",
+ "facet": "string.singleLine",
+ "code": "#\"Hello world\"#",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-0:15",
+ "removal": "0:0-0:15"
+ }
+ ],
+ "domain": "0:0-0:15"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/textFragment/textFragment.comment.block",
+ "languageId": "swift",
+ "facet": "textFragment.comment.block",
+ "code": "/* Hello world */",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-0:17",
+ "removal": "0:0-0:17"
+ }
+ ],
+ "domain": "0:0-0:17"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/textFragment/textFragment.comment.line",
+ "languageId": "swift",
+ "facet": "textFragment.comment.line",
+ "code": "// Hello world",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-0:14",
+ "removal": "0:0-0:14"
+ }
+ ],
+ "domain": "0:0-0:14"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/textFragment/textFragment.regularExpression",
+ "languageId": "swift",
+ "facet": "textFragment.regularExpression",
+ "code": "/\\d+$/",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:1-0:5",
+ "removal": "0:1-0:5"
+ }
+ ],
+ "domain": "0:1-0:5"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/textFragment/textFragment.string.multiLine",
+ "languageId": "swift",
+ "facet": "textFragment.string.multiLine",
+ "code": "\"\"\"\nHello\nworld\n\"\"\"",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:3-3:0",
+ "removal": "0:3-3:0"
+ }
+ ],
+ "domain": "0:3-3:0"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/textFragment/textFragment.string.singleLine",
+ "languageId": "swift",
+ "facet": "textFragment.string.singleLine",
+ "code": "\"Hello world\"",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:1-0:12",
+ "removal": "0:1-0:12"
+ }
+ ],
+ "domain": "0:1-0:12"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/textFragment/textFragment.string.singleLine2",
+ "languageId": "swift",
+ "facet": "textFragment.string.singleLine",
+ "code": "#\"Hello world\"#",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:2-0:13",
+ "removal": "0:2-0:13"
+ }
+ ],
+ "domain": "0:2-0:13"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/textFragment/textFragment.string.singleLine3",
+ "languageId": "swift",
+ "facet": "textFragment.string.singleLine",
+ "code": "###\"Hello world\"###",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:4-0:15",
+ "removal": "0:4-0:15"
+ }
+ ],
+ "domain": "0:4-0:15"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/type/type.alias",
+ "languageId": "swift",
+ "facet": "type.alias",
+ "code": "typealias Foo = Int",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-0:19",
+ "removal": "0:0-0:19"
+ }
+ ],
+ "domain": "0:0-0:19"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/type/type.argument.catch",
+ "languageId": "swift",
+ "facet": "type.argument.catch",
+ "code": "do {}\ncatch let e as Error {}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "1:15-1:20",
+ "removal": "1:15-1:21"
+ }
+ ],
+ "domain": "1:6-1:20"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/type/type.argument.formal.constructor.iteration",
+ "languageId": "swift",
+ "facet": "type.argument.formal.constructor.iteration",
+ "code": "struct Foo {\n init(aaa: Int, bbb: Int = 0) {}\n}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-2:1"
+ }
+ ],
+ "domain": "0:0-2:1"
+ },
+ {
+ "targets": [
+ {
+ "content": "0:12-2:0"
+ }
+ ],
+ "domain": "0:12-2:0"
+ },
+ {
+ "targets": [
+ {
+ "content": "1:9-1:31"
+ }
+ ],
+ "domain": "1:9-1:31"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/type/type.argument.formal.constructor",
+ "languageId": "swift",
+ "facet": "type.argument.formal.constructor",
+ "code": "struct Foo {\n init(aaa: Int, bbb: Int = 0) {}\n}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-2:1",
+ "removal": "0:0-2:1"
+ }
+ ],
+ "domain": "0:0-2:1"
+ },
+ {
+ "targets": [
+ {
+ "content": "1:14-1:17",
+ "removal": "1:12-1:17"
+ }
+ ],
+ "domain": "1:9-1:17"
+ },
+ {
+ "targets": [
+ {
+ "content": "1:24-1:27",
+ "removal": "1:22-1:27"
+ }
+ ],
+ "domain": "1:19-1:31"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/type/type.argument.formal.iteration",
+ "languageId": "swift",
+ "facet": "type.argument.formal.iteration",
+ "code": "func foo(aaa: Int, bbb: Int = 0) {}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-0:35"
+ }
+ ],
+ "domain": "0:0-0:35"
+ },
+ {
+ "targets": [
+ {
+ "content": "0:9-0:31"
+ }
+ ],
+ "domain": "0:9-0:31"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/type/type.argument.formal.lambda.iteration",
+ "languageId": "swift",
+ "facet": "type.argument.formal.lambda.iteration",
+ "code": "{ (aaa: Int, bbb: Int) in }",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-0:27"
+ }
+ ],
+ "domain": "0:0-0:27"
+ },
+ {
+ "targets": [
+ {
+ "content": "0:3-0:21"
+ }
+ ],
+ "domain": "0:3-0:21"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/type/type.argument.formal.lambda",
+ "languageId": "swift",
+ "facet": "type.argument.formal.lambda",
+ "code": "{ (aaa: Int, bbb: Int) in }",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:8-0:11",
+ "removal": "0:6-0:11"
+ }
+ ],
+ "domain": "0:8-0:11"
+ },
+ {
+ "targets": [
+ {
+ "content": "0:18-0:21",
+ "removal": "0:16-0:21"
+ }
+ ],
+ "domain": "0:18-0:21"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/type/type.argument.formal.method.iteration",
+ "languageId": "swift",
+ "facet": "type.argument.formal.method.iteration",
+ "code": "struct Foo {\n func bar(aaa: Int, bbb: Int = 0) {}\n}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-2:1"
+ }
+ ],
+ "domain": "0:0-2:1"
+ },
+ {
+ "targets": [
+ {
+ "content": "0:12-2:0"
+ }
+ ],
+ "domain": "0:12-2:0"
+ },
+ {
+ "targets": [
+ {
+ "content": "1:13-1:35"
+ }
+ ],
+ "domain": "1:13-1:35"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/type/type.argument.formal.method",
+ "languageId": "swift",
+ "facet": "type.argument.formal.method",
+ "code": "struct Foo {\n func bar(aaa: Int, bbb: Int = 0) {}\n}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-2:1",
+ "removal": "0:0-2:1"
+ }
+ ],
+ "domain": "0:0-2:1"
+ },
+ {
+ "targets": [
+ {
+ "content": "1:18-1:21",
+ "removal": "1:16-1:21"
+ }
+ ],
+ "domain": "1:13-1:21"
+ },
+ {
+ "targets": [
+ {
+ "content": "1:28-1:31",
+ "removal": "1:26-1:31"
+ }
+ ],
+ "domain": "1:23-1:35"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/type/type.argument.formal",
+ "languageId": "swift",
+ "facet": "type.argument.formal",
+ "code": "func foo(aaa: Int, bbb: Int = 0) {}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:14-0:17",
+ "removal": "0:12-0:17"
+ }
+ ],
+ "domain": "0:9-0:17"
+ },
+ {
+ "targets": [
+ {
+ "content": "0:24-0:27",
+ "removal": "0:22-0:27"
+ }
+ ],
+ "domain": "0:19-0:31"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/type/type.cast",
+ "languageId": "swift",
+ "facet": "type.cast",
+ "code": "foo as Int",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:7-0:10",
+ "removal": "0:3-0:10"
+ }
+ ],
+ "domain": "0:0-0:10"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/type/type.class",
+ "languageId": "swift",
+ "facet": "type.class",
+ "code": "class Foo: Bar {}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-0:17",
+ "removal": "0:0-0:17"
+ }
+ ],
+ "domain": "0:0-0:17"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/type/type.constant",
+ "languageId": "swift",
+ "facet": "type.constant",
+ "code": "let foo: Int = 0",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:9-0:12",
+ "removal": "0:7-0:12"
+ }
+ ],
+ "domain": "0:0-0:16"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/type/type.enum",
+ "languageId": "swift",
+ "facet": "type.enum",
+ "code": "enum Foo {}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-0:11",
+ "removal": "0:0-0:11"
+ }
+ ],
+ "domain": "0:0-0:11"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/type/type.field.class",
+ "languageId": "swift",
+ "facet": "type.field.class",
+ "code": "struct Foo {\n var bar: Int\n var baz: Int = 0\n}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-3:1",
+ "removal": "0:0-3:1"
+ }
+ ],
+ "domain": "0:0-3:1"
+ },
+ {
+ "targets": [
+ {
+ "content": "1:13-1:16",
+ "removal": "1:11-1:16"
+ }
+ ],
+ "domain": "1:4-1:16"
+ },
+ {
+ "targets": [
+ {
+ "content": "2:13-2:16",
+ "removal": "2:11-2:16"
+ }
+ ],
+ "domain": "2:4-2:20"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/type/type.field.interface",
+ "languageId": "swift",
+ "facet": "type.field.interface",
+ "code": "protocol Foo {\n var foo: Int { get set }\n}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-2:1",
+ "removal": "0:0-2:1"
+ }
+ ],
+ "domain": "0:0-2:1"
+ },
+ {
+ "targets": [
+ {
+ "content": "1:13-1:16",
+ "removal": "1:11-1:16"
+ }
+ ],
+ "domain": "1:4-1:28"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/type/type.foreach",
+ "languageId": "swift",
+ "facet": "type.foreach",
+ "code": "for v: Int in values {}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:7-0:10",
+ "removal": "0:5-0:10"
+ }
+ ],
+ "domain": "0:0-0:23"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/type/type.interface",
+ "languageId": "swift",
+ "facet": "type.interface",
+ "code": "protocol Foo {}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-0:15",
+ "removal": "0:0-0:15"
+ }
+ ],
+ "domain": "0:0-0:15"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/type/type.iteration.block",
+ "languageId": "swift",
+ "facet": "type.iteration.block",
+ "code": "struct Foo {\n func bar() { }\n}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-2:1"
+ }
+ ],
+ "domain": "0:0-2:1"
+ },
+ {
+ "targets": [
+ {
+ "content": "0:12-2:0"
+ }
+ ],
+ "domain": "0:12-2:0"
+ },
+ {
+ "targets": [
+ {
+ "content": "1:16-1:17"
+ }
+ ],
+ "domain": "1:16-1:17"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/type/type.iteration.block2",
+ "languageId": "swift",
+ "facet": "type.iteration.block",
+ "code": "func foo() { }",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-0:14"
+ }
+ ],
+ "domain": "0:0-0:14"
+ },
+ {
+ "targets": [
+ {
+ "content": "0:12-0:13"
+ }
+ ],
+ "domain": "0:12-0:13"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/type/type.iteration.block3",
+ "languageId": "swift",
+ "facet": "type.iteration.block",
+ "code": "if true { }\nelse if false { }\nelse { }",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-2:8"
+ }
+ ],
+ "domain": "0:0-2:8"
+ },
+ {
+ "targets": [
+ {
+ "content": "0:9-0:10"
+ }
+ ],
+ "domain": "0:9-0:10"
+ },
+ {
+ "targets": [
+ {
+ "content": "1:15-1:16"
+ }
+ ],
+ "domain": "1:15-1:16"
+ },
+ {
+ "targets": [
+ {
+ "content": "2:6-2:7"
+ }
+ ],
+ "domain": "2:6-2:7"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/type/type.iteration.block4",
+ "languageId": "swift",
+ "facet": "type.iteration.block",
+ "code": "while true { }",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-0:14"
+ }
+ ],
+ "domain": "0:0-0:14"
+ },
+ {
+ "targets": [
+ {
+ "content": "0:12-0:13"
+ }
+ ],
+ "domain": "0:12-0:13"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/type/type.iteration.class",
+ "languageId": "swift",
+ "facet": "type.iteration.class",
+ "code": "class Foo { }",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-0:13"
+ }
+ ],
+ "domain": "0:0-0:13"
+ },
+ {
+ "targets": [
+ {
+ "content": "0:11-0:12"
+ }
+ ],
+ "domain": "0:11-0:12"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/type/type.iteration.document",
+ "languageId": "swift",
+ "facet": "type.iteration.document",
+ "code": "\nlet foo: Int\n",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-2:0"
+ }
+ ],
+ "domain": "0:0-2:0"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/type/type.iteration.interface",
+ "languageId": "swift",
+ "facet": "type.iteration.interface",
+ "code": "protocol Foo { }",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-0:16"
+ }
+ ],
+ "domain": "0:0-0:16"
+ },
+ {
+ "targets": [
+ {
+ "content": "0:14-0:15"
+ }
+ ],
+ "domain": "0:14-0:15"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/type/type.return.lambda",
+ "languageId": "swift",
+ "facet": "type.return.lambda",
+ "code": "{ () -> Int in 0 }",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:8-0:11",
+ "removal": "0:4-0:11"
+ }
+ ],
+ "domain": "0:8-0:11"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/type/type.return.method",
+ "languageId": "swift",
+ "facet": "type.return.method",
+ "code": "struct Foo {\n func bar() -> Int {}\n}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-2:1",
+ "removal": "0:0-2:1"
+ }
+ ],
+ "domain": "0:0-2:1"
+ },
+ {
+ "targets": [
+ {
+ "content": "1:18-1:21",
+ "removal": "1:14-1:21"
+ }
+ ],
+ "domain": "1:4-1:24"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/type/type.return",
+ "languageId": "swift",
+ "facet": "type.return",
+ "code": "func foo() -> Int {}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:14-0:17",
+ "removal": "0:10-0:17"
+ }
+ ],
+ "domain": "0:0-0:20"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/type/type.typeArgument.iteration",
+ "languageId": "swift",
+ "facet": "type.typeArgument.iteration",
+ "code": "let foo: Map",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-0:22"
+ }
+ ],
+ "domain": "0:0-0:22"
+ },
+ {
+ "targets": [
+ {
+ "content": "0:13-0:21"
+ }
+ ],
+ "domain": "0:13-0:21"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/type/type.typeArgument",
+ "languageId": "swift",
+ "facet": "type.typeArgument",
+ "code": "let foo: Map",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:9-0:22",
+ "removal": "0:7-0:22"
+ }
+ ],
+ "domain": "0:0-0:22"
+ },
+ {
+ "targets": [
+ {
+ "content": "0:13-0:16",
+ "removal": "0:13-0:18"
+ }
+ ],
+ "domain": "0:13-0:16"
+ },
+ {
+ "targets": [
+ {
+ "content": "0:18-0:21",
+ "removal": "0:16-0:21"
+ }
+ ],
+ "domain": "0:18-0:21"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/type/type.variable.initialized",
+ "languageId": "swift",
+ "facet": "type.variable.initialized",
+ "code": "var foo: Int = 0",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:9-0:12",
+ "removal": "0:7-0:12"
+ }
+ ],
+ "domain": "0:0-0:16"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/type/type.variable.uninitialized",
+ "languageId": "swift",
+ "facet": "type.variable.uninitialized",
+ "code": "var foo: Int",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:9-0:12",
+ "removal": "0:7-0:12"
+ }
+ ],
+ "domain": "0:0-0:12"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/value/value.argument.actual.iteration",
+ "languageId": "swift",
+ "facet": "value.argument.actual.iteration",
+ "code": "foo(aaa: 0, bbb: 1)",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-0:19"
+ }
+ ],
+ "domain": "0:0-0:19"
+ },
+ {
+ "targets": [
+ {
+ "content": "0:4-0:18"
+ }
+ ],
+ "domain": "0:4-0:18"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/value/value.argument.actual",
+ "languageId": "swift",
+ "facet": "value.argument.actual",
+ "code": "foo(aaa: 0, bbb: 1)",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:9-0:10",
+ "removal": "0:7-0:10"
+ }
+ ],
+ "domain": "0:4-0:10"
+ },
+ {
+ "targets": [
+ {
+ "content": "0:17-0:18",
+ "removal": "0:15-0:18"
+ }
+ ],
+ "domain": "0:12-0:18"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/value/value.argument.formal.constructor.iteration",
+ "languageId": "swift",
+ "facet": "value.argument.formal.constructor.iteration",
+ "code": "struct Foo {\n init(aaa: Int = 0, bbb: Int = 1) {}\n}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-2:1"
+ }
+ ],
+ "domain": "0:0-2:1"
+ },
+ {
+ "targets": [
+ {
+ "content": "0:12-2:0"
+ }
+ ],
+ "domain": "0:12-2:0"
+ },
+ {
+ "targets": [
+ {
+ "content": "1:9-1:35"
+ }
+ ],
+ "domain": "1:9-1:35"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/value/value.argument.formal.constructor",
+ "languageId": "swift",
+ "facet": "value.argument.formal.constructor",
+ "code": "struct Foo {\n init(aaa: Int = 0, bbb: Int = 1) {}\n}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "1:20-1:21",
+ "removal": "1:17-1:21"
+ }
+ ],
+ "domain": "1:9-1:21"
+ },
+ {
+ "targets": [
+ {
+ "content": "1:34-1:35",
+ "removal": "1:31-1:35"
+ }
+ ],
+ "domain": "1:23-1:35"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/value/value.argument.formal.iteration",
+ "languageId": "swift",
+ "facet": "value.argument.formal.iteration",
+ "code": "func foo(aaa: Int = 0, bbb: Int = 1) {}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-0:39"
+ }
+ ],
+ "domain": "0:0-0:39"
+ },
+ {
+ "targets": [
+ {
+ "content": "0:9-0:35"
+ }
+ ],
+ "domain": "0:9-0:35"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/value/value.argument.formal.method.iteration",
+ "languageId": "swift",
+ "facet": "value.argument.formal.method.iteration",
+ "code": "struct Foo {\n func bar(aaa: Int = 0, bbb: Int = 1) {}\n}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-2:1"
+ }
+ ],
+ "domain": "0:0-2:1"
+ },
+ {
+ "targets": [
+ {
+ "content": "0:12-2:0"
+ }
+ ],
+ "domain": "0:12-2:0"
+ },
+ {
+ "targets": [
+ {
+ "content": "1:13-1:39"
+ }
+ ],
+ "domain": "1:13-1:39"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/value/value.argument.formal.method",
+ "languageId": "swift",
+ "facet": "value.argument.formal.method",
+ "code": "struct Foo {\n func bar(aaa: Int = 0, bbb: Int = 1) {}\n}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "1:24-1:25",
+ "removal": "1:21-1:25"
+ }
+ ],
+ "domain": "1:13-1:25"
+ },
+ {
+ "targets": [
+ {
+ "content": "1:38-1:39",
+ "removal": "1:35-1:39"
+ }
+ ],
+ "domain": "1:27-1:39"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/value/value.argument.formal",
+ "languageId": "swift",
+ "facet": "value.argument.formal",
+ "code": "func foo(aaa: Int = 0, bbb: Int = 1) {}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:20-0:21",
+ "removal": "0:17-0:21"
+ }
+ ],
+ "domain": "0:9-0:21"
+ },
+ {
+ "targets": [
+ {
+ "content": "0:34-0:35",
+ "removal": "0:31-0:35"
+ }
+ ],
+ "domain": "0:23-0:35"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/value/value.assignment.compound",
+ "languageId": "swift",
+ "facet": "value.assignment.compound",
+ "code": "foo += 0",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:7-0:8",
+ "removal": "0:3-0:8"
+ }
+ ],
+ "domain": "0:0-0:8"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/value/value.assignment.destructuring",
+ "languageId": "swift",
+ "facet": "value.assignment.destructuring",
+ "code": "(foo, bar) = (0, 1)",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:13-0:19",
+ "removal": "0:10-0:19"
+ }
+ ],
+ "domain": "0:0-0:19"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/value/value.assignment",
+ "languageId": "swift",
+ "facet": "value.assignment",
+ "code": "foo = 0",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:6-0:7",
+ "removal": "0:3-0:7"
+ }
+ ],
+ "domain": "0:0-0:7"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/value/value.constant",
+ "languageId": "swift",
+ "facet": "value.constant",
+ "code": "let foo = 0",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:10-0:11",
+ "removal": "0:7-0:11"
+ }
+ ],
+ "domain": "0:0-0:11"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/value/value.field.class",
+ "languageId": "swift",
+ "facet": "value.field.class",
+ "code": "struct Foo {\n var bar = 0\n var baz: Int = 0\n}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "1:12-1:13",
+ "removal": "1:9-1:13"
+ }
+ ],
+ "domain": "1:2-1:13"
+ },
+ {
+ "targets": [
+ {
+ "content": "2:17-2:18",
+ "removal": "2:14-2:18"
+ }
+ ],
+ "domain": "2:2-2:18"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/value/value.field.enum",
+ "languageId": "swift",
+ "facet": "value.field.enum",
+ "code": "enum Foo: Int {\n case bar = 0\n}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "1:13-1:14",
+ "removal": "1:10-1:14"
+ }
+ ],
+ "domain": "1:2-1:14"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/value/value.foreach",
+ "languageId": "swift",
+ "facet": "value.foreach",
+ "code": "for v in values {}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:9-0:15",
+ "removal": "0:9-0:16"
+ }
+ ],
+ "domain": "0:0-0:18"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/value/value.iteration.block",
+ "languageId": "swift",
+ "facet": "value.iteration.block",
+ "code": "struct Foo {\n func bar() { }\n}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-2:1"
+ }
+ ],
+ "domain": "0:0-2:1"
+ },
+ {
+ "targets": [
+ {
+ "content": "0:12-2:0"
+ }
+ ],
+ "domain": "0:12-2:0"
+ },
+ {
+ "targets": [
+ {
+ "content": "1:16-1:17"
+ }
+ ],
+ "domain": "1:16-1:17"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/value/value.iteration.block2",
+ "languageId": "swift",
+ "facet": "value.iteration.block",
+ "code": "func foo() { }",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-0:14"
+ }
+ ],
+ "domain": "0:0-0:14"
+ },
+ {
+ "targets": [
+ {
+ "content": "0:12-0:13"
+ }
+ ],
+ "domain": "0:12-0:13"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/value/value.iteration.block3",
+ "languageId": "swift",
+ "facet": "value.iteration.block",
+ "code": "if true { }\nelse if false { }\nelse { }",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-2:8"
+ }
+ ],
+ "domain": "0:0-2:8"
+ },
+ {
+ "targets": [
+ {
+ "content": "0:9-0:10"
+ }
+ ],
+ "domain": "0:9-0:10"
+ },
+ {
+ "targets": [
+ {
+ "content": "1:15-1:16"
+ }
+ ],
+ "domain": "1:15-1:16"
+ },
+ {
+ "targets": [
+ {
+ "content": "2:6-2:7"
+ }
+ ],
+ "domain": "2:6-2:7"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/value/value.iteration.block4",
+ "languageId": "swift",
+ "facet": "value.iteration.block",
+ "code": "while true { }",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-0:14"
+ }
+ ],
+ "domain": "0:0-0:14"
+ },
+ {
+ "targets": [
+ {
+ "content": "0:12-0:13"
+ }
+ ],
+ "domain": "0:12-0:13"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/value/value.iteration.class",
+ "languageId": "swift",
+ "facet": "value.iteration.class",
+ "code": "struct Foo { }",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-0:14"
+ }
+ ],
+ "domain": "0:0-0:14"
+ },
+ {
+ "targets": [
+ {
+ "content": "0:12-0:13"
+ }
+ ],
+ "domain": "0:12-0:13"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/value/value.iteration.document",
+ "languageId": "swift",
+ "facet": "value.iteration.document",
+ "code": "\nvar foo: Int\n",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-2:0"
+ }
+ ],
+ "domain": "0:0-2:0"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/value/value.iteration.enum",
+ "languageId": "swift",
+ "facet": "value.iteration.enum",
+ "code": "enum Foo { }",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-0:12"
+ }
+ ],
+ "domain": "0:0-0:12"
+ },
+ {
+ "targets": [
+ {
+ "content": "0:10-0:11"
+ }
+ ],
+ "domain": "0:10-0:11"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/value/value.mapPair.iteration",
+ "languageId": "swift",
+ "facet": "value.mapPair.iteration",
+ "code": "[foo: 0, bar: 1]",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-0:16"
+ }
+ ],
+ "domain": "0:0-0:16"
+ },
+ {
+ "targets": [
+ {
+ "content": "0:1-0:15"
+ }
+ ],
+ "domain": "0:1-0:15"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/value/value.mapPair",
+ "languageId": "swift",
+ "facet": "value.mapPair",
+ "code": "[aaa: 0, bbb: 1]",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:6-0:7",
+ "removal": "0:4-0:7"
+ }
+ ],
+ "domain": "0:1-0:7"
+ },
+ {
+ "targets": [
+ {
+ "content": "0:14-0:15",
+ "removal": "0:12-0:15"
+ }
+ ],
+ "domain": "0:9-0:15"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/value/value.return.lambda",
+ "languageId": "swift",
+ "facet": "value.return.lambda",
+ "code": "{ () -> Int in 0 }",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:15-0:16",
+ "removal": "0:15-0:17"
+ }
+ ],
+ "domain": "0:0-0:18"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/value/value.return",
+ "languageId": "swift",
+ "facet": "value.return",
+ "code": "func foo() {\n return 0\n}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "1:11-1:12",
+ "removal": "1:10-1:12"
+ }
+ ],
+ "domain": "1:4-1:12"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/value/value.switch",
+ "languageId": "swift",
+ "facet": "value.switch",
+ "code": "switch value {}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:7-0:12",
+ "removal": "0:7-0:13"
+ }
+ ],
+ "domain": "0:0-0:15"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/value/value.throw",
+ "languageId": "swift",
+ "facet": "value.throw",
+ "code": "func foo() throws {\n throw Error\n}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "1:10-1:15",
+ "removal": "1:9-1:15"
+ }
+ ],
+ "domain": "1:4-1:15"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/value/value.typeAlias",
+ "languageId": "swift",
+ "facet": "value.typeAlias",
+ "code": "typealias Foo = Int",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:16-0:19",
+ "removal": "0:13-0:19"
+ }
+ ],
+ "domain": "0:0-0:19"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/value/value.variable.destructuring",
+ "languageId": "swift",
+ "facet": "value.variable.destructuring",
+ "code": "let (foo, bar) = (0, 1)",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:17-0:23",
+ "removal": "0:14-0:23"
+ }
+ ],
+ "domain": "0:0-0:23"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/value/value.variable",
+ "languageId": "swift",
+ "facet": "value.variable",
+ "code": "var foo = 0",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:10-0:11",
+ "removal": "0:7-0:11"
+ }
+ ],
+ "domain": "0:0-0:11"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/value/value.yield",
+ "languageId": "swift",
+ "facet": "value.yield",
+ "code": "var foo: Int {\n _read {\n yield 0\n }\n}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "2:14-2:15",
+ "removal": "2:13-2:15"
+ }
+ ],
+ "domain": "2:8-2:15"
+ }
+ ]
+ }
+]
diff --git a/packages/app-web-docs/src/docs/user/languages/swift.mdx b/packages/app-web-docs/src/docs/user/languages/swift.mdx
new file mode 100644
index 0000000000..a8eadd1dc1
--- /dev/null
+++ b/packages/app-web-docs/src/docs/user/languages/swift.mdx
@@ -0,0 +1,1506 @@
+import { ScopeVisualizer, ScopeVisualizerOptions, ScopeVisualizerProvider } from "@site/src/docs/components/ScopeVisualizer";
+import scopeTests from "./fixtures/swift.json";
+
+# Swift
+
+
+
+Below are visualizations of all our scope tests for this language. These were created primarily for testing purposes rather than as documentation. There are quite a few, and they may feel a bit overwhelming from a documentation standpoint.
+
+## Scopes
+
+
+
+### Anonymous function
+
+#### 1. Anonymous function
+
+An anonymous function, eg a lambda function, an arrow function, etc.
+
+
+
+### Argument list
+
+#### 1. Argument list: Actual constructor empty
+
+An empty list of arguments in a constructor call. Insertion delimiter should be empty.
+
+
+
+#### 2. Argument list: Actual constructor multi line
+
+A multi-line list of arguments in a constructor call. Insertion delimiter should include a newline.
+
+
+
+#### 3. Argument list: Actual constructor single line
+
+A single-line list of arguments in a constructor call
+
+
+
+#### 4. Argument list: Actual empty
+
+An empty list of arguments in a function call. Insertion delimiter should be empty.
+
+
+
+#### 5. Argument list: Actual method empty
+
+An empty list of arguments in a method call. Insertion delimiter should be empty.
+
+
+
+#### 6. Argument list: Actual method multi line
+
+A multi-line list of arguments in a method call. Insertion delimiter should include a newline.
+
+
+
+#### 7. Argument list: Actual method single line
+
+A single-line list of arguments in a method call
+
+
+
+#### 8. Argument list: Actual multi line
+
+A multi-line list of arguments in a function call. Insertion delimiter should include a newline.
+
+
+
+#### 9. Argument list: Actual single line
+
+A single-line list of arguments in a function call
+
+
+
+#### 10. Argument list: Formal constructor empty
+
+An empty list of parameters in a constructor declaration. Insertion delimiter should be empty.
+
+
+
+#### 11. Argument list: Formal constructor multi line
+
+A multi-line list of parameters in a constructor declaration. Insertion delimiter should include a newline.
+
+
+
+#### 12. Argument list: Formal constructor single line
+
+A single-line list of parameters in a constructor declaration
+
+
+
+#### 13. Argument list: Formal empty
+
+An empty list of parameters in a function declaration. Insertion delimiter should be empty.
+
+
+
+#### 14. Argument list: Formal lambda empty
+
+An empty list of parameters in an anonymous function. Insertion delimiter should be empty.
+
+
+
+#### 15. Argument list: Formal lambda multi line
+
+A multi-line list of parameters in an anonymous function. Insertion delimiter should include a newline.
+
+
+
+#### 16. Argument list: Formal lambda single line
+
+A single-line list of parameters in an anonymous function
+
+
+
+#### 17. Argument list: Formal method empty
+
+An empty list of parameters in a method declaration. Insertion delimiter should be empty.
+
+
+
+#### 18. Argument list: Formal method multi line
+
+A multi-line list of parameters in a method declaration. Insertion delimiter should include a newline.
+
+
+
+#### 19. Argument list: Formal method single line
+
+A single-line list of parameters in a method declaration
+
+
+
+#### 20. Argument list: Formal multi line
+
+A multi-line list of parameters in a function declaration. Insertion delimiter should include a newline.
+
+
+
+#### 21. Argument list: Formal single line
+
+A single-line list of parameters in a function declaration
+
+
+
+### Argument or parameter
+
+#### 1. Argument: Actual constructor multi line
+
+A multi-line argument in a constructor call. Insertion delimiter should include a newline.
+
+
+
+#### 2. Argument: Actual constructor single line
+
+A single-line argument in a constructor call
+
+
+
+#### 3. Argument: Actual method multi line
+
+A multi-line argument in a method call. Insertion delimiter should include a newline.
+
+
+
+#### 4. Argument: Actual method single line
+
+A single-line argument in a method call
+
+
+
+#### 5. Argument: Actual multi line
+
+A multi-line argument in a function call. Insertion delimiter should include a newline.
+
+
+
+#### 6. Argument: Actual single line
+
+A single-line argument in a function call
+
+
+
+#### 7. Argument: Formal catch
+
+A parameter in a catch clause
+
+
+
+
+
+#### 8. Argument: Formal constructor multi line
+
+A multi-line parameter in a constructor declaration. Insertion delimiter should include a newline.
+
+
+
+#### 9. Argument: Formal constructor single line
+
+A single-line parameter in a constructor declaration
+
+
+
+#### 10. Argument: Formal lambda multi line
+
+A multi-line parameter in an anonymous function. Insertion delimiter should include a newline.
+
+
+
+#### 11. Argument: Formal lambda single line
+
+A single-line parameter in an anonymous function
+
+
+
+#### 12. Argument: Formal method multi line
+
+A multi-line parameter in a method declaration. Insertion delimiter should include a newline.
+
+
+
+#### 13. Argument: Formal method single line
+
+A single-line parameter in a method declaration
+
+
+
+#### 14. Argument: Formal multi line
+
+A multi-line parameter in a function declaration. Insertion delimiter should include a newline.
+
+
+
+#### 15. Argument: Formal single line
+
+A single-line parameter in a function declaration
+
+
+
+#### 16. Argument: Actual (iteration)
+
+Iteration scope for arguments in a function call: the argument list. The domain should be the entire function call.
+
+
+
+#### 17. Argument: Actual constructor (iteration)
+
+Iteration scope for arguments in a constructor call: the argument list. The domain should be the entire constructor call..
+
+
+
+#### 18. Argument: Actual method (iteration)
+
+Iteration scope for arguments in a method call: the argument list. The domain should be the entire method call.
+
+
+
+#### 19. Argument: Formal (iteration)
+
+Iteration scope for parameters in a function declaration: the parameter list. The domain should be the entire function.
+
+
+
+#### 20. Argument: Formal constructor (iteration)
+
+Iteration scope for parameters in a constructor declaration: the parameter list. The domain should be the entire constructor.
+
+
+
+#### 21. Argument: Formal lambda (iteration)
+
+Iteration scope for parameters in an anonymous function: the parameter list. The domain should be the entire anonymous function.
+
+
+
+#### 22. Argument: Formal method (iteration)
+
+Iteration scope for parameters in a method declaration: the parameter list. The domain should be the entire method.
+
+
+
+### Branch
+
+#### 1. Branch: If
+
+An if branch
+
+
+
+#### 2. Branch: If elif else
+
+An if-elif-else branch. The removal range for the if branch should include the trailing `else` keyword.
+
+
+
+#### 3. Branch: If else
+
+An if-else branch
+
+
+
+#### 4. Branch: Switch case
+
+A case/default branch in a switch statement
+
+
+
+
+
+#### 5. Branch: Ternary
+
+A branch in a ternary expression
+
+
+
+#### 6. Branch: Try
+
+A try/catch/finally branch
+
+
+
+#### 7. Branch: If (iteration)
+
+Iteration scope for if/elif/else branches: the if/elif/else statement.
+
+
+
+#### 8. Branch: Switch case (iteration)
+
+Iteration scope for case/default branches in a switch statement: the switch statement body.
+
+
+
+#### 9. Branch: Ternary (iteration)
+
+Iteration scope for ternary expression branches: the ternary expression.
+
+
+
+#### 10. Branch: Try (iteration)
+
+Iteration scope for try/catch/finally branches: the try/catch/finally statement.
+
+
+
+### Class
+
+#### 1. Class
+
+A class/struct declaration
+
+
+
+#### 2. Class (iteration class)
+
+Iteration scope for classes: class bodies.
+
+
+
+#### 3. Class (iteration document)
+
+Iteration scope for classes: the entire document including leading and trailing empty lines.
+
+
+
+### Collection key
+
+#### 1. Key: Map pair
+
+Key (LHS) of a key-value pair in a map
+
+
+
+#### 2. Key: Map pair (iteration)
+
+Iteration scope for keys of key-value pairs in a map: should be between the braces.
+
+
+
+### Comment
+
+#### 1. Comment: Block
+
+A block comment
+
+
+
+#### 2. Comment: Line
+
+A line comment
+
+
+
+### Condition
+
+#### 1. Condition: Do while
+
+A condition in a do-while loop
+
+
+
+#### 2. Condition: If
+
+A condition in an if statement
+
+
+
+#### 3. Condition: Switch case
+
+A condition in a switch statement
+
+
+
+
+
+#### 4. Condition: Ternary
+
+A condition in a ternary expression
+
+
+
+#### 5. Condition: While
+
+A condition in a while loop
+
+
+
+#### 6. Condition: Switch case (iteration)
+
+Iteration scope for conditions in a switch statement: the switch statement body.
+
+
+
+### Function call
+
+#### 1. Function call
+
+A function call
+
+
+
+#### 2. Function call: Chain
+
+A chain of function calls, eg `foo().bar()`
+
+
+
+#### 3. Function call: Constructor
+
+A constructor call
+
+
+
+#### 4. Function call: Method
+
+A method call
+
+
+
+### Function callee
+
+#### 1. Function callee
+
+The function being called in a function call
+
+
+
+#### 2. Function callee: Chain
+
+The function being called in a chain of function calls, including parent objects.
+
+
+
+#### 3. Function callee: Constructor
+
+The class being constructed in a class instantiation, including the `new` keyword.
+
+
+
+#### 4. Function callee: Method
+
+The function being called in a method call, including parent objects.
+
+
+
+### If statement
+
+#### 1. If statement
+
+An if statement
+
+
+
+### Interior
+
+#### 1. Interior: Class
+
+The body of a class/struct declaration
+
+
+
+#### 2. Interior: Constructor
+
+The body of a constructor declaration
+
+
+
+#### 3. Interior: Do while
+
+The body of a do-while loop
+
+
+
+#### 4. Interior: Enum
+
+The body of an enum declaration
+
+
+
+#### 5. Interior: Foreach
+
+The body of a for-each loop
+
+
+
+#### 6. Interior: Function
+
+The body of a function declaration
+
+
+
+#### 7. Interior: If
+
+The body of an if/elif/else branch
+
+
+
+
+
+
+
+
+
+#### 8. Interior: Interface
+
+The body of an interface declaration
+
+
+
+#### 9. Interior: Lambda
+
+The block body of an anonymous function
+
+
+
+#### 10. Interior: Method
+
+The body of a method declaration
+
+
+
+#### 11. Interior: Switch
+
+The body of a switch statement
+
+
+
+#### 12. Interior: Switch case
+
+The body of a case/default branch in a switch statement
+
+
+
+#### 13. Interior: Try
+
+The body of a try/catch/finally branch
+
+
+
+#### 14. Interior: While
+
+The body of a while loop
+
+
+
+### List
+
+#### 1. List
+
+A list/array
+
+
+
+### Map
+
+#### 1. Map
+
+A map/dictionary
+
+
+
+### Name
+
+#### 1. Name: Argument actual
+
+Name of a (keyword) argument in a function call
+
+
+
+#### 2. Name: Argument catch
+
+Name of a parameter in a catch clause
+
+
+
+
+
+#### 3. Name: Argument formal
+
+Name of a parameter in a function declaration
+
+
+
+#### 4. Name: Argument formal constructor
+
+Name of a parameter in a constructor declaration
+
+
+
+#### 5. Name: Argument formal lambda
+
+Name of a parameter in an anonymous function
+
+
+
+#### 6. Name: Argument formal method
+
+Name of a parameter in a method declaration
+
+
+
+#### 7. Name: Assignment
+
+Name (LHS) of an assignment statement
+
+
+
+#### 8. Name: Assignment compound
+
+Name (LHS) of a compound assignment statement, eg +=/-=
+
+
+
+#### 9. Name: Assignment destructuring
+
+Name (LHS) of an assignment statement using a destructuring pattern
+
+
+
+#### 10. Name: Class
+
+Name of a class/struct declaration
+
+
+
+#### 11. Name: Constant
+
+Name (LHS) of a constant declaration
+
+
+
+#### 12. Name: Constructor
+
+Name of a constructor declaration
+
+
+
+#### 13. Name: Enum
+
+Name of an enum declaration
+
+
+
+#### 14. Name: Field class
+
+Name (LHS) of a field declaration in a class/struct
+
+
+
+#### 15. Name: Field enum
+
+Name (LHS) of a field declaration in an enum
+
+
+
+#### 16. Name: Field interface
+
+Name (LHS) of a field declaration in an interface
+
+
+
+#### 17. Name: Foreach
+
+Iteration variable name in a for-each loop
+
+
+
+#### 18. Name: Function
+
+Name of a function declaration
+
+
+
+#### 19. Name: Interface
+
+Name of an interface declaration
+
+
+
+#### 20. Name: Method
+
+Name of a method declaration
+
+
+
+#### 21. Name: Method interface
+
+Name of a method declaration in an interface
+
+
+
+#### 22. Name: Type alias
+
+Name (LHS) of a type alias declaration
+
+
+
+#### 23. Name: Variable destructuring
+
+Name (LHS) of a variable declaration using a destructuring pattern
+
+
+
+#### 24. Name: Variable initialized
+
+Name (LHS) of an initialized variable declaration
+
+
+
+#### 25. Name: Variable uninitialized
+
+Name (LHS) of an uninitialized variable declaration
+
+
+
+#### 26. Name (iteration block)
+
+Iteration scope for names: statement blocks (body of functions/if-statements/for-loops/etc).
+
+
+
+
+
+
+
+
+
+#### 27. Name (iteration class)
+
+Iteration scope for names: class bodies.
+
+
+
+#### 28. Name (iteration document)
+
+Iteration scope for names: the entire document including leading and trailing empty lines.
+
+
+
+#### 29. Name (iteration enum)
+
+Iteration scope for names: enum bodies.
+
+
+
+#### 30. Name (iteration interface)
+
+Iteration scope for names: interface bodies.
+
+
+
+#### 31. Name: Argument actual (iteration)
+
+Iteration scope for names of (keyword) arguments in a function call: the argument list.
+
+
+
+#### 32. Name: Argument formal (iteration)
+
+Iteration scope for names of parameters in a function declaration: the parameter list.
+
+
+
+#### 33. Name: Argument formal constructor (iteration)
+
+Iteration scope for names of parameters in a constructor declaration: the parameter list.
+
+
+
+#### 34. Name: Argument formal lambda (iteration)
+
+Iteration scope for names of parameters in an anonymous function: the parameter list.
+
+
+
+#### 35. Name: Argument formal method (iteration)
+
+Iteration scope for names of parameters in a method declaration: the parameter list.
+
+
+
+### Named function
+
+#### 1. Named function
+
+A named function declaration
+
+
+
+#### 2. Named function: Constructor
+
+A constructor declaration
+
+
+
+#### 3. Named function: Method
+
+A method declaration
+
+
+
+#### 4. Named function (iteration class)
+
+Iteration scope for named functions: class bodies.
+
+
+
+#### 5. Named function (iteration document)
+
+Iteration scope for named functions: the entire document including leading and trailing empty lines.
+
+
+
+### Regular expression
+
+#### 1. Regular expression
+
+A regular expression
+
+
+
+### Statement
+
+#### 1. Statement: Assignment
+
+An assignment statement
+
+
+
+#### 2. Statement: Assignment compound
+
+A compound assignment statement, eg +=/-=
+
+
+
+#### 3. Statement: Assignment destructuring
+
+An assignment statement using a destructuring pattern
+
+
+
+#### 4. Statement: Break
+
+A break statement
+
+
+
+#### 5. Statement: Class
+
+A class/struct declaration
+
+
+
+#### 6. Statement: Constant
+
+A constant declaration
+
+
+
+#### 7. Statement: Constructor
+
+A constructor declaration
+
+
+
+#### 8. Statement: Continue
+
+A continue statement
+
+
+
+#### 9. Statement: Do while
+
+A do-while loop
+
+
+
+#### 10. Statement: Enum
+
+An enum declaration
+
+
+
+#### 11. Statement: Field class
+
+A field declaration in a class/struct
+
+
+
+#### 12. Statement: Field interface
+
+A field declaration in an interface
+
+
+
+#### 13. Statement: Foreach
+
+A for-each loop
+
+
+
+#### 14. Statement: Function
+
+A named function declaration
+
+
+
+#### 15. Statement: Function call
+
+A function call statement
+
+
+
+#### 16. Statement: If
+
+An if/elif/else statement
+
+
+
+#### 17. Statement: Import
+
+An import statement
+
+
+
+#### 18. Statement: Interface
+
+An interface declaration
+
+
+
+#### 19. Statement: Method
+
+A method declaration
+
+
+
+#### 20. Statement: Method interface
+
+A method declaration in an interface
+
+
+
+#### 21. Statement: Return
+
+A return statement
+
+
+
+#### 22. Statement: Switch
+
+A switch statement
+
+
+
+#### 23. Statement: Throw
+
+A throw statement
+
+
+
+#### 24. Statement: Try
+
+A try/catch/finally statement
+
+
+
+#### 25. Statement: Type alias
+
+A type alias declaration
+
+
+
+#### 26. Statement: Variable destructuring
+
+A variable declaration using a destructuring pattern, eg `const { x, y } = point`
+
+
+
+#### 27. Statement: Variable initialized
+
+An initialized variable declaration
+
+
+
+#### 28. Statement: Variable uninitialized
+
+An uninitialized variable declaration
+
+
+
+#### 29. Statement: While
+
+A while loop
+
+
+
+#### 30. Statement: Yield
+
+A yield statement
+
+
+
+#### 31. Statement (iteration block)
+
+Iteration scope for statements: statement blocks (body of functions/if-statements/for-loops/etc).
+
+
+
+
+
+
+
+
+
+#### 32. Statement (iteration class)
+
+Iteration scope for statements: class bodies.
+
+
+
+#### 33. Statement (iteration document)
+
+Iteration scope for statements: the entire document including leading and trailing empty lines.
+
+
+
+#### 34. Statement (iteration interface)
+
+Iteration scope for statements: interface bodies.
+
+
+
+### Type
+
+#### 1. Type: Alias
+
+A type alias declaration
+
+
+
+#### 2. Type: Argument catch
+
+Type of a parameter in a catch clause
+
+
+
+#### 3. Type: Argument formal
+
+Type of a parameter in a function declaration
+
+
+
+#### 4. Type: Argument formal constructor
+
+Type of a parameter in a constructor declaration
+
+
+
+#### 5. Type: Argument formal lambda
+
+Type of a parameter in an anonymous function
+
+
+
+#### 6. Type: Argument formal method
+
+Type of a parameter in a method declaration
+
+
+
+#### 7. Type: Cast
+
+A type cast
+
+
+
+#### 8. Type: Class
+
+A class/struct declaration
+
+
+
+#### 9. Type: Constant
+
+Type of a constant declaration
+
+
+
+#### 10. Type: Enum
+
+An enum declaration
+
+
+
+#### 11. Type: Field class
+
+Type of a field declaration in a class/struct
+
+
+
+#### 12. Type: Field interface
+
+Type of a field declaration in an interface
+
+
+
+#### 13. Type: Foreach
+
+Type of a variable in a for-each loop
+
+
+
+#### 14. Type: Interface
+
+An interface declaration
+
+
+
+#### 15. Type: Return
+
+Type of a return value in a function declaration
+
+
+
+#### 16. Type: Return lambda
+
+Type of a return value in an anonymous function
+
+
+
+#### 17. Type: Return method
+
+Type of a return value in a method declaration
+
+
+
+#### 18. Type: Type argument
+
+Type argument to a generic / parametrized type
+
+
+
+#### 19. Type: Variable initialized
+
+Type of an initialized variable declaration
+
+
+
+#### 20. Type: Variable uninitialized
+
+Type of an uninitialized variable declaration
+
+
+
+#### 21. Type (iteration block)
+
+Iteration scope for types: statement blocks (body of functions/if-statements/for-loops/etc).
+
+
+
+
+
+
+
+
+
+#### 22. Type (iteration class)
+
+Iteration scope for types: class bodies.
+
+
+
+#### 23. Type (iteration document)
+
+Iteration scope for types: the entire document including leading and trailing empty lines.
+
+
+
+#### 24. Type (iteration interface)
+
+Iteration scope for types: interface bodies.
+
+
+
+#### 25. Type: Argument formal (iteration)
+
+Iteration scope for types of parameters in a function declaration: the parameter list.
+
+
+
+#### 26. Type: Argument formal constructor (iteration)
+
+Iteration scope for types of parameters in a constructor declaration: the parameter list.
+
+
+
+#### 27. Type: Argument formal lambda (iteration)
+
+Iteration scope for types of parameters in an anonymous function: the parameter list.
+
+
+
+#### 28. Type: Argument formal method (iteration)
+
+Iteration scope for types of parameters in a method declaration: the parameter list.
+
+
+
+#### 29. Type: Type argument (iteration)
+
+Iteration scope for type arguments to a generic / parametrized type: the type argument list.
+
+
+
+### Value
+
+#### 1. Value: Argument actual
+
+Value of a (keyword) argument in a function call
+
+
+
+#### 2. Value: Argument formal
+
+Default value of a parameter in a function declaration
+
+
+
+#### 3. Value: Argument formal constructor
+
+Default value of a parameter in a constructor declaration
+
+
+
+#### 4. Value: Argument formal method
+
+Default value of a parameter in a method declaration
+
+
+
+#### 5. Value: Assignment
+
+Value (RHS) of an assignment statement
+
+
+
+#### 6. Value: Assignment compound
+
+Value (RHS) of a compound assignment statement, eg +=/-=
+
+
+
+#### 7. Value: Assignment destructuring
+
+Value (RHS) of an assignment statement using a destructuring pattern
+
+
+
+#### 8. Value: Constant
+
+Value (RHS) of a constant declaration
+
+
+
+#### 9. Value: Field class
+
+Value (RHS) of a field declaration in a class/struct
+
+
+
+#### 10. Value: Field enum
+
+Value (RHS) of a field declaration in an enum
+
+
+
+#### 11. Value: Foreach
+
+Iterable in a for-each loop
+
+
+
+#### 12. Value: Map pair
+
+Value (RHS) of a key-value pair in a map
+
+
+
+#### 13. Value: Return
+
+Return value of a function
+
+
+
+#### 14. Value: Return lambda
+
+Implicit return value of an anonymous function
+
+
+
+#### 15. Value: Switch
+
+Value / subject of a switch statement
+
+
+
+#### 16. Value: Throw
+
+Value of a throw statement
+
+
+
+#### 17. Value: Type alias
+
+Type expression (RHS) of a type alias declaration
+
+
+
+#### 18. Value: Variable
+
+Value (RHS) of a variable declaration
+
+
+
+#### 19. Value: Variable destructuring
+
+Value (RHS) of a variable declaration using a destructuring pattern
+
+
+
+#### 20. Value: Yield
+
+Value of a yield statement
+
+
+
+#### 21. Value (iteration block)
+
+Iteration scope for values: statement blocks (body of functions/if-statements/for-loops/etc).
+
+
+
+
+
+
+
+
+
+#### 22. Value (iteration class)
+
+Iteration scope for values: class bodies.
+
+
+
+#### 23. Value (iteration document)
+
+Iteration scope for values: the entire document including leading and trailing empty lines.
+
+
+
+#### 24. Value (iteration enum)
+
+Iteration scope for values: enum bodies.
+
+
+
+#### 25. Value: Argument actual (iteration)
+
+Iteration scope for values of (keyword) arguments in a function call: the argument list.
+
+
+
+#### 26. Value: Argument formal (iteration)
+
+Iteration scope for default values of parameters in a function declaration: the parameter list.
+
+
+
+#### 27. Value: Argument formal constructor (iteration)
+
+Iteration scope for default values of parameters in a constructor declaration: the parameter list.
+
+
+
+#### 28. Value: Argument formal method (iteration)
+
+Iteration scope for default values of parameters in a method declaration: the parameter list.
+
+
+
+#### 29. Value: Map pair (iteration)
+
+Iteration scope for values of key-value pairs in a map: should be between the braces.
+
+
+
+## Internal scopes
+
+The following are internal scopes. They are not intended for user interaction or spoken use. These scopes exist solely for internal Cursorless functionality.
+
+### Disqualify delimiter
+
+#### 1. Disqualify delimiter
+
+Internally used to disqualify a token from being treated as a surrounding pair delimiter. This will usually be operators containing `>` or `<`, eg `<`, `<=`, `->`, etc.
+
+
+
+### String
+
+#### 1. String: Multi line
+
+A multi-line string
+
+
+
+#### 2. String: Single line
+
+A single-line string
+
+
+
+
+
+### Text fragment
+
+#### 1. Text fragment: Comment block
+
+Internally used text fragment consisting of a block comment
+
+
+
+#### 2. Text fragment: Comment line
+
+Internally used text fragment consisting of a line comment
+
+
+
+#### 3. Text fragment: Regular expression
+
+Internally used text fragment consisting of a regular expression literal pattern
+
+
+
+#### 4. Text fragment: String multi line
+
+Internally used text fragment consisting of a multi-line string
+
+
+
+#### 5. Text fragment: String single line
+
+Internally used text fragment consisting of a single-line string
+
+
+
+
+
+
+
+
diff --git a/packages/app-web-docs/src/docs/user/scopes/anonymousFunction.mdx b/packages/app-web-docs/src/docs/user/scopes/anonymousFunction.mdx
index 3885f0c0d0..b89b7f4460 100644
--- a/packages/app-web-docs/src/docs/user/scopes/anonymousFunction.mdx
+++ b/packages/app-web-docs/src/docs/user/scopes/anonymousFunction.mdx
@@ -123,4 +123,8 @@ Default: `lambda`
+##### Swift
+
+
+
diff --git a/packages/app-web-docs/src/docs/user/scopes/argumentList.mdx b/packages/app-web-docs/src/docs/user/scopes/argumentList.mdx
index 965e17ad88..e9b6497a97 100644
--- a/packages/app-web-docs/src/docs/user/scopes/argumentList.mdx
+++ b/packages/app-web-docs/src/docs/user/scopes/argumentList.mdx
@@ -69,6 +69,10 @@ Default: `arg list`
+##### Swift
+
+
+
### Argument list: Actual constructor multi line
A multi-line list of arguments in a constructor call. Insertion delimiter should include a newline.
@@ -111,6 +115,10 @@ Default: `arg list`
+##### Swift
+
+
+
### Argument list: Actual constructor single line
A single-line list of arguments in a constructor call
@@ -153,6 +161,10 @@ Default: `arg list`
+##### Swift
+
+
+
### Argument list: Actual empty
An empty list of arguments in a function call. Insertion delimiter should be empty.
@@ -229,6 +241,10 @@ Default: `arg list`
+##### Swift
+
+
+
##### Talon
@@ -353,6 +369,10 @@ Default: `arg list`
+##### Swift
+
+
+
##### Talon
@@ -417,6 +437,10 @@ Default: `arg list`
+##### Swift
+
+
+
### Argument list: Actual method single line
A single-line list of arguments in a method call
@@ -477,6 +501,10 @@ Default: `arg list`
+##### Swift
+
+
+
##### Talon
@@ -557,6 +585,10 @@ Default: `arg list`
+##### Swift
+
+
+
### Argument list: Actual single line
A single-line list of arguments in a function call
@@ -635,6 +667,10 @@ Default: `arg list`
+##### Swift
+
+
+
##### Talon
@@ -683,6 +719,10 @@ Default: `arg list`
+##### Swift
+
+
+
##### TypeScript
@@ -729,6 +769,10 @@ Default: `arg list`
+##### Swift
+
+
+
### Argument list: Formal constructor single line
A single-line list of parameters in a constructor declaration
@@ -771,6 +815,10 @@ Default: `arg list`
+##### Swift
+
+
+
### Argument list: Formal empty
An empty list of parameters in a function declaration. Insertion delimiter should be empty.
@@ -859,6 +907,10 @@ Default: `arg list`
+##### Swift
+
+
+
##### TypeScript
@@ -929,6 +981,10 @@ Default: `arg list`
+##### Swift
+
+
+
### Argument list: Formal lambda multi line
A multi-line list of parameters in an anonymous function. Insertion delimiter should include a newline.
@@ -989,6 +1045,10 @@ Default: `arg list`
+##### Swift
+
+
+
### Argument list: Formal lambda single line
A single-line list of parameters in an anonymous function
@@ -1053,6 +1113,10 @@ Default: `arg list`
+##### Swift
+
+
+
### Argument list: Formal method empty
An empty list of parameters in a method declaration. Insertion delimiter should be empty.
@@ -1123,6 +1187,10 @@ Default: `arg list`
+##### Swift
+
+
+
##### TypeScript
@@ -1185,6 +1253,10 @@ Default: `arg list`
+##### Swift
+
+
+
### Argument list: Formal method single line
A single-line list of parameters in a method declaration
@@ -1241,6 +1313,10 @@ Default: `arg list`
+##### Swift
+
+
+
### Argument list: Formal multi line
A multi-line list of parameters in a function declaration. Insertion delimiter should include a newline.
@@ -1301,6 +1377,10 @@ Default: `arg list`
+##### Swift
+
+
+
### Argument list: Formal single line
A single-line list of parameters in a function declaration
@@ -1361,4 +1441,8 @@ Default: `arg list`
+##### Swift
+
+
+
diff --git a/packages/app-web-docs/src/docs/user/scopes/argumentOrParameter.mdx b/packages/app-web-docs/src/docs/user/scopes/argumentOrParameter.mdx
index 211f1783b1..b287b92e27 100644
--- a/packages/app-web-docs/src/docs/user/scopes/argumentOrParameter.mdx
+++ b/packages/app-web-docs/src/docs/user/scopes/argumentOrParameter.mdx
@@ -69,6 +69,10 @@ Default: `arg`
+##### Swift
+
+
+
### Argument: Actual constructor single line
A single-line argument in a constructor call
@@ -111,6 +115,10 @@ Default: `arg`
+##### Swift
+
+
+
### Argument: Actual enum multi line
A multi-line argument in an enum constructor call. Insertion delimiter should include a newline.
@@ -211,6 +219,10 @@ Default: `arg`
+##### Swift
+
+
+
### Argument: Actual method single line
A single-line argument in a method call
@@ -271,6 +283,10 @@ Default: `arg`
+##### Swift
+
+
+
### Argument: Actual multi line
A multi-line argument in a function call. Insertion delimiter should include a newline.
@@ -357,6 +373,10 @@ Default: `arg`
+##### Swift
+
+
+
### Argument: Actual single line
A single-line argument in a function call
@@ -453,6 +473,10 @@ Default: `arg`
+##### Swift
+
+
+
##### Talon
@@ -501,6 +525,12 @@ Default: `arg`
+##### Swift
+
+
+
+
+
##### TypeScript
@@ -547,6 +577,10 @@ Default: `arg`
+##### Swift
+
+
+
### Argument: Formal constructor single line
A single-line parameter in a constructor declaration
@@ -589,6 +623,10 @@ Default: `arg`
+##### Swift
+
+
+
### Argument: Formal lambda multi line
A multi-line parameter in an anonymous function. Insertion delimiter should include a newline.
@@ -647,6 +685,10 @@ Default: `arg`
+##### Swift
+
+
+
### Argument: Formal lambda single line
A single-line parameter in an anonymous function
@@ -711,6 +753,10 @@ Default: `arg`
+##### Swift
+
+
+
### Argument: Formal method multi line
A multi-line parameter in a method declaration. Insertion delimiter should include a newline.
@@ -767,6 +813,10 @@ Default: `arg`
+##### Swift
+
+
+
### Argument: Formal method single line
A single-line parameter in a method declaration
@@ -825,6 +875,10 @@ Default: `arg`
+##### Swift
+
+
+
### Argument: Formal multi line
A multi-line parameter in a function declaration. Insertion delimiter should include a newline.
@@ -881,6 +935,10 @@ Default: `arg`
+##### Swift
+
+
+
### Argument: Formal single line
A single-line parameter in a function declaration
@@ -937,6 +995,10 @@ Default: `arg`
+##### Swift
+
+
+
### Argument: Actual (iteration)
Iteration scope for arguments in a function call: the argument list. The domain should be the entire function call.
@@ -1025,6 +1087,10 @@ Default: `arg`
+##### Swift
+
+
+
##### Talon
@@ -1075,6 +1141,10 @@ Default: `arg`
+##### Swift
+
+
+
### Argument: Actual enum (iteration)
Iteration scope for arguments in an enum constructor call: the argument list. The domain should be the entire enum constructor call..
@@ -1155,6 +1225,10 @@ Default: `arg`
+##### Swift
+
+
+
### Argument: Formal (iteration)
Iteration scope for parameters in a function declaration: the parameter list. The domain should be the entire function.
@@ -1239,6 +1313,10 @@ Default: `arg`
+##### Swift
+
+
+
### Argument: Formal constructor (iteration)
Iteration scope for parameters in a constructor declaration: the parameter list. The domain should be the entire constructor.
@@ -1281,6 +1359,10 @@ Default: `arg`
+##### Swift
+
+
+
##### TypeScript
@@ -1349,6 +1431,10 @@ Default: `arg`
+##### Swift
+
+
+
### Argument: Formal method (iteration)
Iteration scope for parameters in a method declaration: the parameter list. The domain should be the entire method.
@@ -1421,4 +1507,8 @@ Default: `arg`
+##### Swift
+
+
+
diff --git a/packages/app-web-docs/src/docs/user/scopes/branch.mdx b/packages/app-web-docs/src/docs/user/scopes/branch.mdx
index 896554cdc0..24adc67668 100644
--- a/packages/app-web-docs/src/docs/user/scopes/branch.mdx
+++ b/packages/app-web-docs/src/docs/user/scopes/branch.mdx
@@ -95,6 +95,10 @@ Default: `branch`
+##### Swift
+
+
+
### Branch: If elif else
An if-elif-else branch. The removal range for the if branch should include the trailing `else` keyword.
@@ -163,6 +167,10 @@ Default: `branch`
+##### Swift
+
+
+
### Branch: If else
An if-else branch
@@ -231,6 +239,10 @@ Default: `branch`
+##### Swift
+
+
+
### Branch: 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.
@@ -335,6 +347,12 @@ Default: `branch`
+##### Swift
+
+
+
+
+
### Branch: Ternary
A branch in a ternary expression
@@ -379,6 +397,10 @@ Default: `branch`
+##### Swift
+
+
+
### Branch: Try
A try/catch/finally branch
@@ -429,6 +451,10 @@ Default: `branch`
+##### Swift
+
+
+
### Branch: If (iteration)
Iteration scope for if/elif/else branches: the if/elif/else statement.
@@ -497,6 +523,10 @@ Default: `branch`
+##### Swift
+
+
+
### Branch: Loop (iteration)
Iteration scope for loop branches: the loop statement.
@@ -571,6 +601,10 @@ Default: `branch`
+##### Swift
+
+
+
### Branch: Ternary (iteration)
Iteration scope for ternary expression branches: the ternary expression.
@@ -615,6 +649,10 @@ Default: `branch`
+##### Swift
+
+
+
### Branch: Try (iteration)
Iteration scope for try/catch/finally branches: the try/catch/finally statement.
@@ -663,4 +701,8 @@ Default: `branch`
+##### Swift
+
+
+
diff --git a/packages/app-web-docs/src/docs/user/scopes/class.mdx b/packages/app-web-docs/src/docs/user/scopes/class.mdx
index ff74cb5a05..49ba1a9d0e 100644
--- a/packages/app-web-docs/src/docs/user/scopes/class.mdx
+++ b/packages/app-web-docs/src/docs/user/scopes/class.mdx
@@ -111,6 +111,10 @@ Default: `class`
+##### Swift
+
+
+
##### TypeScript
@@ -147,6 +151,10 @@ Default: `class`
+##### Swift
+
+
+
### Class (iteration document)
Iteration scope for classes: the entire document including leading and trailing empty lines.
@@ -199,4 +207,8 @@ Default: `class`
+##### Swift
+
+
+
diff --git a/packages/app-web-docs/src/docs/user/scopes/collectionKey.mdx b/packages/app-web-docs/src/docs/user/scopes/collectionKey.mdx
index 9066712469..d7a3c5f36a 100644
--- a/packages/app-web-docs/src/docs/user/scopes/collectionKey.mdx
+++ b/packages/app-web-docs/src/docs/user/scopes/collectionKey.mdx
@@ -115,6 +115,10 @@ Default: `key`
+##### Swift
+
+
+
##### Talon list
@@ -195,6 +199,10 @@ Default: `key`
+##### Swift
+
+
+
##### Talon list
diff --git a/packages/app-web-docs/src/docs/user/scopes/comment.mdx b/packages/app-web-docs/src/docs/user/scopes/comment.mdx
index 61fb07c692..8ba8d6888f 100644
--- a/packages/app-web-docs/src/docs/user/scopes/comment.mdx
+++ b/packages/app-web-docs/src/docs/user/scopes/comment.mdx
@@ -105,6 +105,10 @@ Default: `comment`
+##### Swift
+
+
+
##### XML
@@ -199,6 +203,10 @@ Default: `comment`
+##### Swift
+
+
+
##### Talon list
diff --git a/packages/app-web-docs/src/docs/user/scopes/condition.mdx b/packages/app-web-docs/src/docs/user/scopes/condition.mdx
index 21c811de61..4d1519428a 100644
--- a/packages/app-web-docs/src/docs/user/scopes/condition.mdx
+++ b/packages/app-web-docs/src/docs/user/scopes/condition.mdx
@@ -67,6 +67,10 @@ Default: `condition`
+##### Swift
+
+
+
### Condition: For
A condition in a for loop
@@ -179,6 +183,10 @@ Default: `condition`
+##### Swift
+
+
+
##### Talon
@@ -269,6 +277,12 @@ Default: `condition`
+##### Swift
+
+
+
+
+
### Condition: Ternary
A condition in a ternary expression
@@ -313,6 +327,10 @@ Default: `condition`
+##### Swift
+
+
+
### Condition: While
A condition in a while loop
@@ -375,6 +393,10 @@ Default: `condition`
+##### Swift
+
+
+
### Condition: Switch case (iteration)
Iteration scope for conditions in a switch statement: the switch statement body.
@@ -439,4 +461,8 @@ Default: `condition`
+##### Swift
+
+
+
diff --git a/packages/app-web-docs/src/docs/user/scopes/fixtures/anonymousFunction.json b/packages/app-web-docs/src/docs/user/scopes/fixtures/anonymousFunction.json
index cf176f0d9e..0611449357 100644
--- a/packages/app-web-docs/src/docs/user/scopes/fixtures/anonymousFunction.json
+++ b/packages/app-web-docs/src/docs/user/scopes/fixtures/anonymousFunction.json
@@ -525,5 +525,22 @@
"domain": "0:0-0:7"
}
]
+ },
+ {
+ "name": "scopes/swift/anonymousFunction",
+ "languageId": "swift",
+ "facet": "anonymousFunction",
+ "code": "{ () in 0 }",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-0:11",
+ "removal": "0:0-0:11"
+ }
+ ],
+ "domain": "0:0-0:11"
+ }
+ ]
}
]
diff --git a/packages/app-web-docs/src/docs/user/scopes/fixtures/argumentList.json b/packages/app-web-docs/src/docs/user/scopes/fixtures/argumentList.json
index 95b14d421d..78d7e90023 100644
--- a/packages/app-web-docs/src/docs/user/scopes/fixtures/argumentList.json
+++ b/packages/app-web-docs/src/docs/user/scopes/fixtures/argumentList.json
@@ -5466,6 +5466,363 @@
}
]
},
+ {
+ "name": "scopes/swift/argumentList/argumentList.actual.constructor.empty",
+ "languageId": "swift",
+ "facet": "argumentList.actual.constructor.empty",
+ "code": "Foo()",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:4-0:4",
+ "removal": "0:4-0:4"
+ }
+ ],
+ "domain": "0:0-0:5"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/argumentList/argumentList.actual.constructor.multiLine",
+ "languageId": "swift",
+ "facet": "argumentList.actual.constructor.multiLine",
+ "code": "Foo(\n aaa,\n bbb\n)",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "1:2-2:5",
+ "removal": "0:4-3:0"
+ }
+ ],
+ "domain": "0:0-3:1"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/argumentList/argumentList.actual.constructor.singleLine",
+ "languageId": "swift",
+ "facet": "argumentList.actual.constructor.singleLine",
+ "code": "Foo(aaa, bbb)",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:4-0:12",
+ "removal": "0:4-0:12"
+ }
+ ],
+ "domain": "0:0-0:13"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/argumentList/argumentList.actual.empty",
+ "languageId": "swift",
+ "facet": "argumentList.actual.empty",
+ "code": "foo()",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:4-0:4",
+ "removal": "0:4-0:4"
+ }
+ ],
+ "domain": "0:0-0:5"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/argumentList/argumentList.actual.method.empty",
+ "languageId": "swift",
+ "facet": "argumentList.actual.method.empty",
+ "code": "foo.bar()",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:8-0:8",
+ "removal": "0:8-0:8"
+ }
+ ],
+ "domain": "0:0-0:9"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/argumentList/argumentList.actual.method.multiLine",
+ "languageId": "swift",
+ "facet": "argumentList.actual.method.multiLine",
+ "code": "foo.bar(\n aaa,\n bbb\n)",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "1:2-2:5",
+ "removal": "0:8-3:0"
+ }
+ ],
+ "domain": "0:0-3:1"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/argumentList/argumentList.actual.method.singleLine",
+ "languageId": "swift",
+ "facet": "argumentList.actual.method.singleLine",
+ "code": "foo.bar(aaa, bbb)",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:8-0:16",
+ "removal": "0:8-0:16"
+ }
+ ],
+ "domain": "0:0-0:17"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/argumentList/argumentList.actual.multiLine",
+ "languageId": "swift",
+ "facet": "argumentList.actual.multiLine",
+ "code": "foo(\n aaa,\n bbb\n)",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "1:2-2:5",
+ "removal": "0:4-3:0"
+ }
+ ],
+ "domain": "0:0-3:1"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/argumentList/argumentList.actual.singleLine",
+ "languageId": "swift",
+ "facet": "argumentList.actual.singleLine",
+ "code": "foo(aaa, bbb)",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:4-0:12",
+ "removal": "0:4-0:12"
+ }
+ ],
+ "domain": "0:0-0:13"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/argumentList/argumentList.formal.constructor.empty",
+ "languageId": "swift",
+ "facet": "argumentList.formal.constructor.empty",
+ "code": "struct Foo {\n init() {}\n}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "1:7-1:7",
+ "removal": "1:7-1:7"
+ }
+ ],
+ "domain": "1:2-1:11"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/argumentList/argumentList.formal.constructor.multiLine",
+ "languageId": "swift",
+ "facet": "argumentList.formal.constructor.multiLine",
+ "code": "struct Foo {\n init(\n aaa: Int,\n bbb: Int\n ) {}\n}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "2:4-3:12",
+ "removal": "1:7-4:2"
+ }
+ ],
+ "domain": "1:2-4:6"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/argumentList/argumentList.formal.constructor.singleLine",
+ "languageId": "swift",
+ "facet": "argumentList.formal.constructor.singleLine",
+ "code": "struct Foo {\n init(aaa: Int, bbb: Int) {}\n}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "1:7-1:25",
+ "removal": "1:7-1:25"
+ }
+ ],
+ "domain": "1:2-1:29"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/argumentList/argumentList.formal.empty",
+ "languageId": "swift",
+ "facet": "argumentList.formal.empty",
+ "code": "func foo() {}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:9-0:9",
+ "removal": "0:9-0:9"
+ }
+ ],
+ "domain": "0:0-0:13"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/argumentList/argumentList.formal.lambda.empty",
+ "languageId": "swift",
+ "facet": "argumentList.formal.lambda.empty",
+ "code": "{ () in }",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:3-0:3",
+ "removal": "0:3-0:3"
+ }
+ ],
+ "domain": "0:0-0:9"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/argumentList/argumentList.formal.lambda.multiLine",
+ "languageId": "swift",
+ "facet": "argumentList.formal.lambda.multiLine",
+ "code": "{ (\n aaa,\n bbb: Int\n) in }",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "1:2-2:10",
+ "removal": "0:3-3:0"
+ }
+ ],
+ "domain": "0:0-3:6"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/argumentList/argumentList.formal.lambda.singleLine",
+ "languageId": "swift",
+ "facet": "argumentList.formal.lambda.singleLine",
+ "code": "{ (aaa, bbb: Int) in }",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:3-0:16",
+ "removal": "0:3-0:16"
+ }
+ ],
+ "domain": "0:0-0:22"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/argumentList/argumentList.formal.method.empty",
+ "languageId": "swift",
+ "facet": "argumentList.formal.method.empty",
+ "code": "struct Foo {\n func bar() {}\n}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "1:11-1:11",
+ "removal": "1:11-1:11"
+ }
+ ],
+ "domain": "1:2-1:15"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/argumentList/argumentList.formal.method.multiLine",
+ "languageId": "swift",
+ "facet": "argumentList.formal.method.multiLine",
+ "code": "struct Foo {\n func bar(\n aaa: Int,\n bbb: Int\n ) {}\n}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "2:4-3:12",
+ "removal": "1:11-4:2"
+ }
+ ],
+ "domain": "1:2-4:6"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/argumentList/argumentList.formal.method.singleLine",
+ "languageId": "swift",
+ "facet": "argumentList.formal.method.singleLine",
+ "code": "struct Foo {\n func bar(aaa: Int, bbb: Int) {}\n}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "1:11-1:29",
+ "removal": "1:11-1:29"
+ }
+ ],
+ "domain": "1:2-1:33"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/argumentList/argumentList.formal.multiLine",
+ "languageId": "swift",
+ "facet": "argumentList.formal.multiLine",
+ "code": "func foo(\n aaa: Int,\n bbb: Int\n) {}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "1:2-2:10",
+ "removal": "0:9-3:0"
+ }
+ ],
+ "domain": "0:0-3:4"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/argumentList/argumentList.formal.singleLine",
+ "languageId": "swift",
+ "facet": "argumentList.formal.singleLine",
+ "code": "func foo(aaa: Int, bbb: Int) {}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:9-0:27",
+ "removal": "0:9-0:27"
+ }
+ ],
+ "domain": "0:0-0:31"
+ }
+ ]
+ },
{
"name": "scopes/talon/argumentList/argumentList.actual.empty",
"languageId": "talon",
diff --git a/packages/app-web-docs/src/docs/user/scopes/fixtures/argumentOrParameter.json b/packages/app-web-docs/src/docs/user/scopes/fixtures/argumentOrParameter.json
index f89c2c6ff9..b98b7d1e4f 100644
--- a/packages/app-web-docs/src/docs/user/scopes/fixtures/argumentOrParameter.json
+++ b/packages/app-web-docs/src/docs/user/scopes/fixtures/argumentOrParameter.json
@@ -7726,6 +7726,516 @@
}
]
},
+ {
+ "name": "scopes/swift/argument/argument.actual.constructor.iteration",
+ "languageId": "swift",
+ "facet": "argument.actual.constructor.iteration",
+ "code": "Foo(aaa, bbb)",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:4-0:12"
+ }
+ ],
+ "domain": "0:0-0:13"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/argument/argument.actual.constructor.multiLine",
+ "languageId": "swift",
+ "facet": "argument.actual.constructor.multiLine",
+ "code": "Foo(\n aaa,\n bbb\n)",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "1:4-1:7",
+ "removal": "1:4-2:4"
+ }
+ ],
+ "domain": "1:4-1:7"
+ },
+ {
+ "targets": [
+ {
+ "content": "2:4-2:7",
+ "removal": "1:7-2:7"
+ }
+ ],
+ "domain": "2:4-2:7"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/argument/argument.actual.constructor.singleLine",
+ "languageId": "swift",
+ "facet": "argument.actual.constructor.singleLine",
+ "code": "Foo(aaa, bbb)",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:4-0:7",
+ "removal": "0:4-0:9"
+ }
+ ],
+ "domain": "0:4-0:7"
+ },
+ {
+ "targets": [
+ {
+ "content": "0:9-0:12",
+ "removal": "0:7-0:12"
+ }
+ ],
+ "domain": "0:9-0:12"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/argument/argument.actual.iteration",
+ "languageId": "swift",
+ "facet": "argument.actual.iteration",
+ "code": "foo(aaa, bbb)",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:4-0:12"
+ }
+ ],
+ "domain": "0:0-0:13"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/argument/argument.actual.method.iteration",
+ "languageId": "swift",
+ "facet": "argument.actual.method.iteration",
+ "code": "foo.bar(aaa, bbb)",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:8-0:16"
+ }
+ ],
+ "domain": "0:0-0:17"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/argument/argument.actual.method.multiLine",
+ "languageId": "swift",
+ "facet": "argument.actual.method.multiLine",
+ "code": "foo.bar(\n aaa,\n bbb\n)",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "1:4-1:7",
+ "removal": "1:4-2:4"
+ }
+ ],
+ "domain": "1:4-1:7"
+ },
+ {
+ "targets": [
+ {
+ "content": "2:4-2:7",
+ "removal": "1:7-2:7"
+ }
+ ],
+ "domain": "2:4-2:7"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/argument/argument.actual.method.singleLine",
+ "languageId": "swift",
+ "facet": "argument.actual.method.singleLine",
+ "code": "foo.bar(aaa, bbb)",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:8-0:11",
+ "removal": "0:8-0:13"
+ }
+ ],
+ "domain": "0:8-0:11"
+ },
+ {
+ "targets": [
+ {
+ "content": "0:13-0:16",
+ "removal": "0:11-0:16"
+ }
+ ],
+ "domain": "0:13-0:16"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/argument/argument.actual.multiLine",
+ "languageId": "swift",
+ "facet": "argument.actual.multiLine",
+ "code": "foo(\n aaa,\n bbb\n)",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "1:4-1:7",
+ "removal": "1:4-2:4"
+ }
+ ],
+ "domain": "1:4-1:7"
+ },
+ {
+ "targets": [
+ {
+ "content": "2:4-2:7",
+ "removal": "1:7-2:7"
+ }
+ ],
+ "domain": "2:4-2:7"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/argument/argument.actual.singleLine",
+ "languageId": "swift",
+ "facet": "argument.actual.singleLine",
+ "code": "foo(aaa, bbb)",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:4-0:7",
+ "removal": "0:4-0:9"
+ }
+ ],
+ "domain": "0:4-0:7"
+ },
+ {
+ "targets": [
+ {
+ "content": "0:9-0:12",
+ "removal": "0:7-0:12"
+ }
+ ],
+ "domain": "0:9-0:12"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/argument/argument.formal.catch",
+ "languageId": "swift",
+ "facet": "argument.formal.catch",
+ "code": "do {}\ncatch let e as Error {}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "1:6-1:20",
+ "removal": "1:6-1:21"
+ }
+ ],
+ "domain": "1:6-1:20"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/argument/argument.formal.catch2",
+ "languageId": "swift",
+ "facet": "argument.formal.catch",
+ "code": "do {}\ncatch let e {}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "1:6-1:11",
+ "removal": "1:6-1:12"
+ }
+ ],
+ "domain": "1:6-1:11"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/argument/argument.formal.constructor.iteration",
+ "languageId": "swift",
+ "facet": "argument.formal.constructor.iteration",
+ "code": "struct Foo {\n init(aaa: Int, bbb: Int) {}\n}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "1:7-1:25"
+ }
+ ],
+ "domain": "1:2-1:29"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/argument/argument.formal.constructor.multiLine",
+ "languageId": "swift",
+ "facet": "argument.formal.constructor.multiLine",
+ "code": "struct Foo {\n init(\n aaa: Int,\n bbb: Int\n ) {}\n}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "2:8-2:16",
+ "removal": "2:8-3:8"
+ }
+ ],
+ "domain": "2:8-2:16"
+ },
+ {
+ "targets": [
+ {
+ "content": "3:8-3:16",
+ "removal": "2:16-3:16"
+ }
+ ],
+ "domain": "3:8-3:16"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/argument/argument.formal.constructor.singleLine",
+ "languageId": "swift",
+ "facet": "argument.formal.constructor.singleLine",
+ "code": "struct Foo {\n init(aaa: Int, bbb: Int) {}\n}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "1:9-1:17",
+ "removal": "1:9-1:19"
+ }
+ ],
+ "domain": "1:9-1:17"
+ },
+ {
+ "targets": [
+ {
+ "content": "1:19-1:27",
+ "removal": "1:17-1:27"
+ }
+ ],
+ "domain": "1:19-1:27"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/argument/argument.formal.iteration",
+ "languageId": "swift",
+ "facet": "argument.formal.iteration",
+ "code": "func foo(aaa: Int, bbb: Int) {}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:9-0:27"
+ }
+ ],
+ "domain": "0:0-0:31"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/argument/argument.formal.lambda.iteration",
+ "languageId": "swift",
+ "facet": "argument.formal.lambda.iteration",
+ "code": "{ (aaa, bbb: Int) in }",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:3-0:16"
+ }
+ ],
+ "domain": "0:0-0:22"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/argument/argument.formal.lambda.multiLine",
+ "languageId": "swift",
+ "facet": "argument.formal.lambda.multiLine",
+ "code": "{ (\n aaa,\n bbb: Int\n) in }",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "1:4-1:7",
+ "removal": "1:4-2:4"
+ }
+ ],
+ "domain": "1:4-1:7"
+ },
+ {
+ "targets": [
+ {
+ "content": "2:4-2:12",
+ "removal": "1:7-2:12"
+ }
+ ],
+ "domain": "2:4-2:12"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/argument/argument.formal.lambda.singleLine",
+ "languageId": "swift",
+ "facet": "argument.formal.lambda.singleLine",
+ "code": "{ (aaa, bbb: Int) in }",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:3-0:6",
+ "removal": "0:3-0:8"
+ }
+ ],
+ "domain": "0:3-0:6"
+ },
+ {
+ "targets": [
+ {
+ "content": "0:8-0:16",
+ "removal": "0:6-0:16"
+ }
+ ],
+ "domain": "0:8-0:16"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/argument/argument.formal.method.iteration",
+ "languageId": "swift",
+ "facet": "argument.formal.method.iteration",
+ "code": "struct Foo {\n func bar(aaa: Int, bbb: Int) {}\n}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "1:13-1:31"
+ }
+ ],
+ "domain": "1:4-1:35"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/argument/argument.formal.method.multiLine",
+ "languageId": "swift",
+ "facet": "argument.formal.method.multiLine",
+ "code": "struct Foo {\n func bar(\n aaa: Int,\n bbb: Int\n ) {}\n}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "2:8-2:16",
+ "removal": "2:8-3:8"
+ }
+ ],
+ "domain": "2:8-2:16"
+ },
+ {
+ "targets": [
+ {
+ "content": "3:8-3:16",
+ "removal": "2:16-3:16"
+ }
+ ],
+ "domain": "3:8-3:16"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/argument/argument.formal.method.singleLine",
+ "languageId": "swift",
+ "facet": "argument.formal.method.singleLine",
+ "code": "struct Foo {\n func bar(aaa: Int, bbb: Int) {}\n}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "1:13-1:21",
+ "removal": "1:13-1:23"
+ }
+ ],
+ "domain": "1:13-1:21"
+ },
+ {
+ "targets": [
+ {
+ "content": "1:23-1:31",
+ "removal": "1:21-1:31"
+ }
+ ],
+ "domain": "1:23-1:31"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/argument/argument.formal.multiLine",
+ "languageId": "swift",
+ "facet": "argument.formal.multiLine",
+ "code": "func foo(\n aaa: Int,\n bbb: Int\n) {}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "1:4-1:12",
+ "removal": "1:4-2:4"
+ }
+ ],
+ "domain": "1:4-1:12"
+ },
+ {
+ "targets": [
+ {
+ "content": "2:4-2:12",
+ "removal": "1:12-2:12"
+ }
+ ],
+ "domain": "2:4-2:12"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/argument/argument.formal.singleLine",
+ "languageId": "swift",
+ "facet": "argument.formal.singleLine",
+ "code": "func foo(aaa: Int, bbb: Int) {}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:9-0:17",
+ "removal": "0:9-0:19"
+ }
+ ],
+ "domain": "0:9-0:17"
+ },
+ {
+ "targets": [
+ {
+ "content": "0:19-0:27",
+ "removal": "0:17-0:27"
+ }
+ ],
+ "domain": "0:19-0:27"
+ }
+ ]
+ },
{
"name": "scopes/talon/argument/argument.actual.iteration",
"languageId": "talon",
diff --git a/packages/app-web-docs/src/docs/user/scopes/fixtures/branch.json b/packages/app-web-docs/src/docs/user/scopes/fixtures/branch.json
index a08cd6e975..14c6afa2c9 100644
--- a/packages/app-web-docs/src/docs/user/scopes/fixtures/branch.json
+++ b/packages/app-web-docs/src/docs/user/scopes/fixtures/branch.json
@@ -3394,5 +3394,233 @@
"domain": "0:13-0:14"
}
]
+ },
+ {
+ "name": "scopes/swift/branch/branch.if.elif.else",
+ "languageId": "swift",
+ "facet": "branch.if.elif.else",
+ "code": "if foo {}\nelse if bar {}\nelse {}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-0:9",
+ "removal": "0:0-1:5"
+ }
+ ],
+ "domain": "0:0-0:9"
+ },
+ {
+ "targets": [
+ {
+ "content": "1:0-1:14",
+ "removal": "1:0-2:0"
+ }
+ ],
+ "domain": "1:0-1:14"
+ },
+ {
+ "targets": [
+ {
+ "content": "2:0-2:7",
+ "removal": "1:14-2:7"
+ }
+ ],
+ "domain": "2:0-2:7"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/branch/branch.if.else",
+ "languageId": "swift",
+ "facet": "branch.if.else",
+ "code": "if true {}\nelse {}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-0:10",
+ "removal": "0:0-1:0"
+ }
+ ],
+ "domain": "0:0-0:10"
+ },
+ {
+ "targets": [
+ {
+ "content": "1:0-1:7",
+ "removal": "0:10-1:7"
+ }
+ ],
+ "domain": "1:0-1:7"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/branch/branch.if.iteration",
+ "languageId": "swift",
+ "facet": "branch.if.iteration",
+ "code": "if true {}\nelse if false {}\nelse {}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-2:7"
+ }
+ ],
+ "domain": "0:0-2:7"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/branch/branch.if",
+ "languageId": "swift",
+ "facet": "branch.if",
+ "code": "if true {}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-0:10",
+ "removal": "0:0-0:10"
+ }
+ ],
+ "domain": "0:0-0:10"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/branch/branch.switchCase.iteration",
+ "languageId": "swift",
+ "facet": "branch.switchCase.iteration",
+ "code": "switch value { }",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:14-0:15"
+ }
+ ],
+ "domain": "0:14-0:15"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/branch/branch.switchCase",
+ "languageId": "swift",
+ "facet": "branch.switchCase",
+ "code": "switch value {\n case 0:\n break\n}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "1:4-3:0",
+ "removal": "1:0-3:0"
+ }
+ ],
+ "domain": "1:4-3:0"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/branch/branch.switchCase2",
+ "languageId": "swift",
+ "facet": "branch.switchCase",
+ "code": "switch value {\n default:\n break\n}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "1:4-3:0",
+ "removal": "1:0-3:0"
+ }
+ ],
+ "domain": "1:4-3:0"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/branch/branch.ternary.iteration",
+ "languageId": "swift",
+ "facet": "branch.ternary.iteration",
+ "code": "foo ? 0 : 1",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-0:11"
+ }
+ ],
+ "domain": "0:0-0:11"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/branch/branch.ternary",
+ "languageId": "swift",
+ "facet": "branch.ternary",
+ "code": "foo ? 0 : 1",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:6-0:7",
+ "removal": "0:6-0:8"
+ }
+ ],
+ "domain": "0:6-0:7"
+ },
+ {
+ "targets": [
+ {
+ "content": "0:10-0:11",
+ "removal": "0:9-0:11"
+ }
+ ],
+ "domain": "0:10-0:11"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/branch/branch.try.iteration",
+ "languageId": "swift",
+ "facet": "branch.try.iteration",
+ "code": "do {}\ncatch {}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-1:8"
+ }
+ ],
+ "domain": "0:0-1:8"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/branch/branch.try",
+ "languageId": "swift",
+ "facet": "branch.try",
+ "code": "do {}\ncatch {}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-0:5",
+ "removal": "0:0-1:0"
+ }
+ ],
+ "domain": "0:0-0:5"
+ },
+ {
+ "targets": [
+ {
+ "content": "1:0-1:8",
+ "removal": "0:5-1:8"
+ }
+ ],
+ "domain": "1:0-1:8"
+ }
+ ]
}
]
diff --git a/packages/app-web-docs/src/docs/user/scopes/fixtures/class.json b/packages/app-web-docs/src/docs/user/scopes/fixtures/class.json
index a25d6d31cf..7b38fadbd7 100644
--- a/packages/app-web-docs/src/docs/user/scopes/fixtures/class.json
+++ b/packages/app-web-docs/src/docs/user/scopes/fixtures/class.json
@@ -819,6 +819,63 @@
}
]
},
+ {
+ "name": "scopes/swift/class.iteration.class",
+ "languageId": "swift",
+ "facet": "class.iteration.class",
+ "code": "class Foo { }",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-0:13"
+ }
+ ],
+ "domain": "0:0-0:13"
+ },
+ {
+ "targets": [
+ {
+ "content": "0:11-0:12"
+ }
+ ],
+ "domain": "0:11-0:12"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/class.iteration.document",
+ "languageId": "swift",
+ "facet": "class.iteration.document",
+ "code": "\nstruct Foo {}\n",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-2:0"
+ }
+ ],
+ "domain": "0:0-2:0"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/class",
+ "languageId": "swift",
+ "facet": "class",
+ "code": "struct Foo {}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-0:13",
+ "removal": "0:0-0:13"
+ }
+ ],
+ "domain": "0:0-0:13"
+ }
+ ]
+ },
{
"name": "scopes/typescript.core/class",
"languageId": "typescript.core",
diff --git a/packages/app-web-docs/src/docs/user/scopes/fixtures/collectionKey.json b/packages/app-web-docs/src/docs/user/scopes/fixtures/collectionKey.json
index c18a81fa71..443efeb68c 100644
--- a/packages/app-web-docs/src/docs/user/scopes/fixtures/collectionKey.json
+++ b/packages/app-web-docs/src/docs/user/scopes/fixtures/collectionKey.json
@@ -763,6 +763,48 @@
}
]
},
+ {
+ "name": "scopes/swift/key.mapPair.iteration",
+ "languageId": "swift",
+ "facet": "key.mapPair.iteration",
+ "code": "[foo: 0, bar: 1]",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:1-0:15"
+ }
+ ],
+ "domain": "0:1-0:15"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/key.mapPair",
+ "languageId": "swift",
+ "facet": "key.mapPair",
+ "code": "[foo: 0, bar: 1]",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:1-0:4",
+ "removal": "0:1-0:6"
+ }
+ ],
+ "domain": "0:1-0:7"
+ },
+ {
+ "targets": [
+ {
+ "content": "0:9-0:12",
+ "removal": "0:9-0:14"
+ }
+ ],
+ "domain": "0:9-0:15"
+ }
+ ]
+ },
{
"name": "scopes/talon/key/key.mapPair.iteration",
"languageId": "talon",
diff --git a/packages/app-web-docs/src/docs/user/scopes/fixtures/comment.json b/packages/app-web-docs/src/docs/user/scopes/fixtures/comment.json
index 59bfe0a6fe..41be4947fa 100644
--- a/packages/app-web-docs/src/docs/user/scopes/fixtures/comment.json
+++ b/packages/app-web-docs/src/docs/user/scopes/fixtures/comment.json
@@ -713,6 +713,40 @@
}
]
},
+ {
+ "name": "scopes/swift/comment.block",
+ "languageId": "swift",
+ "facet": "comment.block",
+ "code": "/* Hello world */",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-0:17",
+ "removal": "0:0-0:17"
+ }
+ ],
+ "domain": "0:0-0:17"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/comment.line",
+ "languageId": "swift",
+ "facet": "comment.line",
+ "code": "// Hello world",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-0:14",
+ "removal": "0:0-0:14"
+ }
+ ],
+ "domain": "0:0-0:14"
+ }
+ ]
+ },
{
"name": "scopes/talon/comment.line",
"languageId": "talon",
diff --git a/packages/app-web-docs/src/docs/user/scopes/fixtures/condition.json b/packages/app-web-docs/src/docs/user/scopes/fixtures/condition.json
index 81ad1e4777..3930d6ddba 100644
--- a/packages/app-web-docs/src/docs/user/scopes/fixtures/condition.json
+++ b/packages/app-web-docs/src/docs/user/scopes/fixtures/condition.json
@@ -1896,6 +1896,133 @@
}
]
},
+ {
+ "name": "scopes/swift/condition/condition.doWhile",
+ "languageId": "swift",
+ "facet": "condition.doWhile",
+ "code": "repeat {} while true",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:16-0:20",
+ "removal": "0:15-0:20"
+ }
+ ],
+ "domain": "0:0-0:20"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/condition/condition.if",
+ "languageId": "swift",
+ "facet": "condition.if",
+ "code": "if true {}\nelse if false {}\nelse {}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:3-0:7",
+ "removal": "0:3-0:8"
+ }
+ ],
+ "domain": "0:0-2:7"
+ },
+ {
+ "targets": [
+ {
+ "content": "1:8-1:13",
+ "removal": "1:8-1:14"
+ }
+ ],
+ "domain": "1:0-1:16"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/condition/condition.switchCase.iteration",
+ "languageId": "swift",
+ "facet": "condition.switchCase.iteration",
+ "code": "switch value { }",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:14-0:15"
+ }
+ ],
+ "domain": "0:14-0:15"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/condition/condition.switchCase",
+ "languageId": "swift",
+ "facet": "condition.switchCase",
+ "code": "switch value {\n case 0: break\n}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "1:9-1:10",
+ "removal": "1:8-1:10"
+ }
+ ],
+ "domain": "1:4-2:0"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/condition/condition.switchCase2",
+ "languageId": "swift",
+ "facet": "condition.switchCase",
+ "code": "switch value {\n case 0, 1: break\n}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "1:9-1:13",
+ "removal": "1:8-1:13"
+ }
+ ],
+ "domain": "1:4-2:0"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/condition/condition.ternary",
+ "languageId": "swift",
+ "facet": "condition.ternary",
+ "code": "foo ? 0 : 1",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-0:3",
+ "removal": "0:0-0:4"
+ }
+ ],
+ "domain": "0:0-0:11"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/condition/condition.while",
+ "languageId": "swift",
+ "facet": "condition.while",
+ "code": "while foo {}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:6-0:9",
+ "removal": "0:6-0:10"
+ }
+ ],
+ "domain": "0:0-0:12"
+ }
+ ]
+ },
{
"name": "scopes/talon/condition.if",
"languageId": "talon",
diff --git a/packages/app-web-docs/src/docs/user/scopes/fixtures/functionCall.json b/packages/app-web-docs/src/docs/user/scopes/fixtures/functionCall.json
index fdc04209ec..76eac3ebf9 100644
--- a/packages/app-web-docs/src/docs/user/scopes/fixtures/functionCall.json
+++ b/packages/app-web-docs/src/docs/user/scopes/fixtures/functionCall.json
@@ -1383,6 +1383,83 @@
}
]
},
+ {
+ "name": "scopes/swift/functionCall/functionCall.chain",
+ "languageId": "swift",
+ "facet": "functionCall.chain",
+ "code": "foo().bar()",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-0:5",
+ "removal": "0:0-0:5"
+ }
+ ],
+ "domain": "0:0-0:5"
+ },
+ {
+ "targets": [
+ {
+ "content": "0:0-0:11",
+ "removal": "0:0-0:11"
+ }
+ ],
+ "domain": "0:0-0:11"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/functionCall/functionCall.constructor",
+ "languageId": "swift",
+ "facet": "functionCall.constructor",
+ "code": "Foo()",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-0:5",
+ "removal": "0:0-0:5"
+ }
+ ],
+ "domain": "0:0-0:5"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/functionCall/functionCall.method",
+ "languageId": "swift",
+ "facet": "functionCall.method",
+ "code": "foo.bar()",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-0:9",
+ "removal": "0:0-0:9"
+ }
+ ],
+ "domain": "0:0-0:9"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/functionCall/functionCall",
+ "languageId": "swift",
+ "facet": "functionCall",
+ "code": "foo()",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-0:5",
+ "removal": "0:0-0:5"
+ }
+ ],
+ "domain": "0:0-0:5"
+ }
+ ]
+ },
{
"name": "scopes/talon/functionCall.method",
"languageId": "talon",
diff --git a/packages/app-web-docs/src/docs/user/scopes/fixtures/functionCallee.json b/packages/app-web-docs/src/docs/user/scopes/fixtures/functionCallee.json
index 6dd457b98e..aedb9472b8 100644
--- a/packages/app-web-docs/src/docs/user/scopes/fixtures/functionCallee.json
+++ b/packages/app-web-docs/src/docs/user/scopes/fixtures/functionCallee.json
@@ -1383,6 +1383,83 @@
}
]
},
+ {
+ "name": "scopes/swift/functionCallee/functionCallee.chain",
+ "languageId": "swift",
+ "facet": "functionCallee.chain",
+ "code": "foo().bar()",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-0:3",
+ "removal": "0:0-0:3"
+ }
+ ],
+ "domain": "0:0-0:5"
+ },
+ {
+ "targets": [
+ {
+ "content": "0:0-0:9",
+ "removal": "0:0-0:9"
+ }
+ ],
+ "domain": "0:0-0:11"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/functionCallee/functionCallee.constructor",
+ "languageId": "swift",
+ "facet": "functionCallee.constructor",
+ "code": "Foo()",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-0:3",
+ "removal": "0:0-0:3"
+ }
+ ],
+ "domain": "0:0-0:5"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/functionCallee/functionCallee.method",
+ "languageId": "swift",
+ "facet": "functionCallee.method",
+ "code": "foo.bar()",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-0:7",
+ "removal": "0:0-0:7"
+ }
+ ],
+ "domain": "0:0-0:9"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/functionCallee/functionCallee",
+ "languageId": "swift",
+ "facet": "functionCallee",
+ "code": "foo()",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-0:3",
+ "removal": "0:0-0:3"
+ }
+ ],
+ "domain": "0:0-0:5"
+ }
+ ]
+ },
{
"name": "scopes/talon/functionCallee.method",
"languageId": "talon",
diff --git a/packages/app-web-docs/src/docs/user/scopes/fixtures/ifStatement.json b/packages/app-web-docs/src/docs/user/scopes/fixtures/ifStatement.json
index 9789c6912b..a80d6377d3 100644
--- a/packages/app-web-docs/src/docs/user/scopes/fixtures/ifStatement.json
+++ b/packages/app-web-docs/src/docs/user/scopes/fixtures/ifStatement.json
@@ -288,6 +288,23 @@
}
]
},
+ {
+ "name": "scopes/swift/ifStatement",
+ "languageId": "swift",
+ "facet": "ifStatement",
+ "code": "if true {}\nelse if false {}\nelse {}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-2:7",
+ "removal": "0:0-2:7"
+ }
+ ],
+ "domain": "0:0-2:7"
+ }
+ ]
+ },
{
"name": "scopes/talon/ifStatement",
"languageId": "talon",
diff --git a/packages/app-web-docs/src/docs/user/scopes/fixtures/interior.json b/packages/app-web-docs/src/docs/user/scopes/fixtures/interior.json
index 25e54c8dc0..714483c745 100644
--- a/packages/app-web-docs/src/docs/user/scopes/fixtures/interior.json
+++ b/packages/app-web-docs/src/docs/user/scopes/fixtures/interior.json
@@ -5109,6 +5109,376 @@
}
]
},
+ {
+ "name": "scopes/swift/interior/interior.class",
+ "languageId": "swift",
+ "facet": "interior.class",
+ "code": "class Foo { }",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:11-0:12",
+ "removal": "0:11-0:12"
+ }
+ ],
+ "domain": "0:11-0:12"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/interior/interior.constructor",
+ "languageId": "swift",
+ "facet": "interior.constructor",
+ "code": "struct Foo {\n init() { }\n}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "1:2-1:12",
+ "removal": "0:12-2:0"
+ }
+ ],
+ "domain": "0:12-2:0"
+ },
+ {
+ "targets": [
+ {
+ "content": "1:10-1:11",
+ "removal": "1:10-1:11"
+ }
+ ],
+ "domain": "1:10-1:11"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/interior/interior.doWhile",
+ "languageId": "swift",
+ "facet": "interior.doWhile",
+ "code": "repeat { } while foo",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:8-0:9",
+ "removal": "0:8-0:9"
+ }
+ ],
+ "domain": "0:8-0:9"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/interior/interior.enum",
+ "languageId": "swift",
+ "facet": "interior.enum",
+ "code": "enum Foo { }",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:10-0:11",
+ "removal": "0:10-0:11"
+ }
+ ],
+ "domain": "0:10-0:11"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/interior/interior.foreach",
+ "languageId": "swift",
+ "facet": "interior.foreach",
+ "code": "for v in values { }",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:17-0:18",
+ "removal": "0:17-0:18"
+ }
+ ],
+ "domain": "0:17-0:18"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/interior/interior.function",
+ "languageId": "swift",
+ "facet": "interior.function",
+ "code": "func foo() { }",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:12-0:13",
+ "removal": "0:12-0:13"
+ }
+ ],
+ "domain": "0:12-0:13"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/interior/interior.if",
+ "languageId": "swift",
+ "facet": "interior.if",
+ "code": "if (true) { }\nelse if (false) { }\nelse { }",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:11-0:12",
+ "removal": "0:11-0:12"
+ }
+ ],
+ "domain": "0:11-0:12"
+ },
+ {
+ "targets": [
+ {
+ "content": "1:17-1:18",
+ "removal": "1:17-1:18"
+ }
+ ],
+ "domain": "1:17-1:18"
+ },
+ {
+ "targets": [
+ {
+ "content": "2:6-2:7",
+ "removal": "2:6-2:7"
+ }
+ ],
+ "domain": "2:6-2:7"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/interior/interior.if2",
+ "languageId": "swift",
+ "facet": "interior.if",
+ "code": "if (true) { }",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:11-0:12",
+ "removal": "0:11-0:12"
+ }
+ ],
+ "domain": "0:11-0:12"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/interior/interior.if3",
+ "languageId": "swift",
+ "facet": "interior.if",
+ "code": "if (true) { }\nelse { }",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:11-0:12",
+ "removal": "0:11-0:12"
+ }
+ ],
+ "domain": "0:11-0:12"
+ },
+ {
+ "targets": [
+ {
+ "content": "1:6-1:7",
+ "removal": "1:6-1:7"
+ }
+ ],
+ "domain": "1:6-1:7"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/interior/interior.if4",
+ "languageId": "swift",
+ "facet": "interior.if",
+ "code": "if (true) { }\nelse if (false) { }",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:11-0:12",
+ "removal": "0:11-0:12"
+ }
+ ],
+ "domain": "0:11-0:12"
+ },
+ {
+ "targets": [
+ {
+ "content": "1:17-1:18",
+ "removal": "1:17-1:18"
+ }
+ ],
+ "domain": "1:17-1:18"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/interior/interior.interface",
+ "languageId": "swift",
+ "facet": "interior.interface",
+ "code": "protocol Foo { }",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:14-0:15",
+ "removal": "0:14-0:15"
+ }
+ ],
+ "domain": "0:14-0:15"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/interior/interior.lambda",
+ "languageId": "swift",
+ "facet": "interior.lambda",
+ "code": "{ () in 0 }",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:8-0:9",
+ "removal": "0:8-0:9"
+ }
+ ],
+ "domain": "0:8-0:9"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/interior/interior.method",
+ "languageId": "swift",
+ "facet": "interior.method",
+ "code": "struct Foo {\n func bar() { }\n}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "1:2-1:16",
+ "removal": "0:12-2:0"
+ }
+ ],
+ "domain": "0:12-2:0"
+ },
+ {
+ "targets": [
+ {
+ "content": "1:14-1:15",
+ "removal": "1:14-1:15"
+ }
+ ],
+ "domain": "1:14-1:15"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/interior/interior.switch",
+ "languageId": "swift",
+ "facet": "interior.switch",
+ "code": "switch value { }",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:14-0:15",
+ "removal": "0:14-0:15"
+ }
+ ],
+ "domain": "0:14-0:15"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/interior/interior.switchCase",
+ "languageId": "swift",
+ "facet": "interior.switchCase",
+ "code": "switch value {\n case 0:\n bar\n break\n default:\n bar\n break\n}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "1:4-6:13",
+ "removal": "0:14-7:0"
+ }
+ ],
+ "domain": "0:14-7:0"
+ },
+ {
+ "targets": [
+ {
+ "content": "2:8-3:13",
+ "removal": "1:11-3:13"
+ }
+ ],
+ "domain": "1:11-3:13"
+ },
+ {
+ "targets": [
+ {
+ "content": "5:8-6:13",
+ "removal": "4:12-7:0"
+ }
+ ],
+ "domain": "4:12-7:0"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/interior/interior.try",
+ "languageId": "swift",
+ "facet": "interior.try",
+ "code": "do { }\ncatch { }",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:4-0:5",
+ "removal": "0:4-0:5"
+ }
+ ],
+ "domain": "0:4-0:5"
+ },
+ {
+ "targets": [
+ {
+ "content": "1:7-1:8",
+ "removal": "1:7-1:8"
+ }
+ ],
+ "domain": "1:7-1:8"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/interior/interior.while",
+ "languageId": "swift",
+ "facet": "interior.while",
+ "code": "while foo { }",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:11-0:12",
+ "removal": "0:11-0:12"
+ }
+ ],
+ "domain": "0:11-0:12"
+ }
+ ]
+ },
{
"name": "scopes/talon/interior.command",
"languageId": "talon",
diff --git a/packages/app-web-docs/src/docs/user/scopes/fixtures/list.json b/packages/app-web-docs/src/docs/user/scopes/fixtures/list.json
index 0de4886fd5..c0e855558c 100644
--- a/packages/app-web-docs/src/docs/user/scopes/fixtures/list.json
+++ b/packages/app-web-docs/src/docs/user/scopes/fixtures/list.json
@@ -536,6 +536,23 @@
}
]
},
+ {
+ "name": "scopes/swift/list",
+ "languageId": "swift",
+ "facet": "list",
+ "code": "[aaa, bbb]",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-0:10",
+ "removal": "0:0-0:10"
+ }
+ ],
+ "domain": "0:0-0:10"
+ }
+ ]
+ },
{
"name": "scopes/yaml/list",
"languageId": "yaml",
diff --git a/packages/app-web-docs/src/docs/user/scopes/fixtures/map.json b/packages/app-web-docs/src/docs/user/scopes/fixtures/map.json
index 9743c6af2b..a1760a86a9 100644
--- a/packages/app-web-docs/src/docs/user/scopes/fixtures/map.json
+++ b/packages/app-web-docs/src/docs/user/scopes/fixtures/map.json
@@ -365,6 +365,23 @@
}
]
},
+ {
+ "name": "scopes/swift/map",
+ "languageId": "swift",
+ "facet": "map",
+ "code": "[aaa: 0, bbb: 1]",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-0:16",
+ "removal": "0:0-0:16"
+ }
+ ],
+ "domain": "0:0-0:16"
+ }
+ ]
+ },
{
"name": "scopes/yaml/map",
"languageId": "yaml",
diff --git a/packages/app-web-docs/src/docs/user/scopes/fixtures/name.json b/packages/app-web-docs/src/docs/user/scopes/fixtures/name.json
index 60af9cf303..db1196d606 100644
--- a/packages/app-web-docs/src/docs/user/scopes/fixtures/name.json
+++ b/packages/app-web-docs/src/docs/user/scopes/fixtures/name.json
@@ -12381,6 +12381,954 @@
}
]
},
+ {
+ "name": "scopes/swift/name/name.argument.actual.iteration",
+ "languageId": "swift",
+ "facet": "name.argument.actual.iteration",
+ "code": "foo(aaa: 0, bbb: 1)",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-0:19"
+ }
+ ],
+ "domain": "0:0-0:19"
+ },
+ {
+ "targets": [
+ {
+ "content": "0:4-0:18"
+ }
+ ],
+ "domain": "0:4-0:18"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/name/name.argument.actual",
+ "languageId": "swift",
+ "facet": "name.argument.actual",
+ "code": "foo(aaa: 0, bbb: 1)",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:4-0:7",
+ "removal": "0:4-0:9"
+ }
+ ],
+ "domain": "0:4-0:10"
+ },
+ {
+ "targets": [
+ {
+ "content": "0:12-0:15",
+ "removal": "0:12-0:17"
+ }
+ ],
+ "domain": "0:12-0:18"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/name/name.argument.catch",
+ "languageId": "swift",
+ "facet": "name.argument.catch",
+ "code": "do {}\ncatch let e as Error {}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "1:10-1:11",
+ "removal": "1:10-1:12"
+ }
+ ],
+ "domain": "1:6-1:20"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/name/name.argument.catch2",
+ "languageId": "swift",
+ "facet": "name.argument.catch",
+ "code": "do {}\ncatch let e {}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "1:10-1:11",
+ "removal": "1:10-1:12"
+ }
+ ],
+ "domain": "1:6-1:11"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/name/name.argument.formal.constructor.iteration",
+ "languageId": "swift",
+ "facet": "name.argument.formal.constructor.iteration",
+ "code": "struct Foo {\n init(aaa: Int, bbb: Int = 0) {}\n}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-2:1"
+ }
+ ],
+ "domain": "0:0-2:1"
+ },
+ {
+ "targets": [
+ {
+ "content": "0:12-2:0"
+ }
+ ],
+ "domain": "0:12-2:0"
+ },
+ {
+ "targets": [
+ {
+ "content": "1:9-1:31"
+ }
+ ],
+ "domain": "1:9-1:31"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/name/name.argument.formal.constructor",
+ "languageId": "swift",
+ "facet": "name.argument.formal.constructor",
+ "code": "struct Foo {\n init(aaa: Int, bbb: Int = 0) {}\n}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:7-0:10",
+ "removal": "0:7-0:11"
+ }
+ ],
+ "domain": "0:0-2:1"
+ },
+ {
+ "targets": [
+ {
+ "content": "1:4-1:8",
+ "removal": "1:4-1:8"
+ }
+ ],
+ "domain": "1:4-1:35"
+ },
+ {
+ "targets": [
+ {
+ "content": "1:9-1:12",
+ "removal": "1:9-1:12"
+ }
+ ],
+ "domain": "1:9-1:17"
+ },
+ {
+ "targets": [
+ {
+ "content": "1:19-1:22",
+ "removal": "1:18-1:22"
+ }
+ ],
+ "domain": "1:19-1:31"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/name/name.argument.formal.iteration",
+ "languageId": "swift",
+ "facet": "name.argument.formal.iteration",
+ "code": "func foo(aaa: Int, bbb: Int = 0) {}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-0:35"
+ }
+ ],
+ "domain": "0:0-0:35"
+ },
+ {
+ "targets": [
+ {
+ "content": "0:9-0:31"
+ }
+ ],
+ "domain": "0:9-0:31"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/name/name.argument.formal.lambda.iteration",
+ "languageId": "swift",
+ "facet": "name.argument.formal.lambda.iteration",
+ "code": "{ (aaa, bbb: Int) in }",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-0:22"
+ }
+ ],
+ "domain": "0:0-0:22"
+ },
+ {
+ "targets": [
+ {
+ "content": "0:3-0:16"
+ }
+ ],
+ "domain": "0:3-0:16"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/name/name.argument.formal.lambda",
+ "languageId": "swift",
+ "facet": "name.argument.formal.lambda",
+ "code": "{ (aaa, bbb: Int) in }",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:3-0:6",
+ "removal": "0:3-0:6"
+ }
+ ],
+ "domain": "0:3-0:6"
+ },
+ {
+ "targets": [
+ {
+ "content": "0:8-0:11",
+ "removal": "0:7-0:11"
+ }
+ ],
+ "domain": "0:8-0:11"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/name/name.argument.formal.method.iteration",
+ "languageId": "swift",
+ "facet": "name.argument.formal.method.iteration",
+ "code": "struct Foo {\n func bar(aaa: Int, bbb: Int = 0) {}\n}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-2:1"
+ }
+ ],
+ "domain": "0:0-2:1"
+ },
+ {
+ "targets": [
+ {
+ "content": "0:12-2:0"
+ }
+ ],
+ "domain": "0:12-2:0"
+ },
+ {
+ "targets": [
+ {
+ "content": "1:13-1:35"
+ }
+ ],
+ "domain": "1:13-1:35"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/name/name.argument.formal.method",
+ "languageId": "swift",
+ "facet": "name.argument.formal.method",
+ "code": "struct Foo {\n func bar(aaa: Int, bbb: Int) {}\n}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:7-0:10",
+ "removal": "0:7-0:11"
+ }
+ ],
+ "domain": "0:0-2:1"
+ },
+ {
+ "targets": [
+ {
+ "content": "1:9-1:12",
+ "removal": "1:9-1:12"
+ }
+ ],
+ "domain": "1:4-1:35"
+ },
+ {
+ "targets": [
+ {
+ "content": "1:13-1:16",
+ "removal": "1:13-1:16"
+ }
+ ],
+ "domain": "1:13-1:21"
+ },
+ {
+ "targets": [
+ {
+ "content": "1:23-1:26",
+ "removal": "1:22-1:26"
+ }
+ ],
+ "domain": "1:23-1:31"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/name/name.argument.formal",
+ "languageId": "swift",
+ "facet": "name.argument.formal",
+ "code": "func foo(aaa: Int, bbb: Int = 0) {}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:5-0:8",
+ "removal": "0:5-0:8"
+ }
+ ],
+ "domain": "0:0-0:35"
+ },
+ {
+ "targets": [
+ {
+ "content": "0:9-0:12",
+ "removal": "0:9-0:12"
+ }
+ ],
+ "domain": "0:9-0:17"
+ },
+ {
+ "targets": [
+ {
+ "content": "0:19-0:22",
+ "removal": "0:18-0:22"
+ }
+ ],
+ "domain": "0:19-0:31"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/name/name.assignment.compound",
+ "languageId": "swift",
+ "facet": "name.assignment.compound",
+ "code": "foo += 0",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-0:3",
+ "removal": "0:0-0:4"
+ }
+ ],
+ "domain": "0:0-0:8"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/name/name.assignment.destructuring",
+ "languageId": "swift",
+ "facet": "name.assignment.destructuring",
+ "code": "(foo, bar) = (0, 1)",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-0:10",
+ "removal": "0:0-0:11"
+ }
+ ],
+ "domain": "0:0-0:19"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/name/name.assignment",
+ "languageId": "swift",
+ "facet": "name.assignment",
+ "code": "foo = 0",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-0:3",
+ "removal": "0:0-0:4"
+ }
+ ],
+ "domain": "0:0-0:7"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/name/name.class",
+ "languageId": "swift",
+ "facet": "name.class",
+ "code": "class Foo {}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:6-0:9",
+ "removal": "0:6-0:10"
+ }
+ ],
+ "domain": "0:0-0:12"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/name/name.constant",
+ "languageId": "swift",
+ "facet": "name.constant",
+ "code": "let foo = 0",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:4-0:7",
+ "removal": "0:4-0:8"
+ }
+ ],
+ "domain": "0:0-0:11"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/name/name.constructor",
+ "languageId": "swift",
+ "facet": "name.constructor",
+ "code": "struct Foo {\n init() {}\n}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:7-0:10",
+ "removal": "0:7-0:11"
+ }
+ ],
+ "domain": "0:0-2:1"
+ },
+ {
+ "targets": [
+ {
+ "content": "1:2-1:6",
+ "removal": "1:2-1:6"
+ }
+ ],
+ "domain": "1:2-1:11"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/name/name.enum",
+ "languageId": "swift",
+ "facet": "name.enum",
+ "code": "enum Foo {}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:5-0:8",
+ "removal": "0:5-0:9"
+ }
+ ],
+ "domain": "0:0-0:11"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/name/name.field.class",
+ "languageId": "swift",
+ "facet": "name.field.class",
+ "code": "struct Foo {\n var bar: Int\n var baz: Int = 0\n}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:7-0:10",
+ "removal": "0:7-0:11"
+ }
+ ],
+ "domain": "0:0-3:1"
+ },
+ {
+ "targets": [
+ {
+ "content": "1:8-1:11",
+ "removal": "1:7-1:11"
+ }
+ ],
+ "domain": "1:4-1:16"
+ },
+ {
+ "targets": [
+ {
+ "content": "2:8-2:11",
+ "removal": "2:7-2:11"
+ }
+ ],
+ "domain": "2:4-2:20"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/name/name.field.enum",
+ "languageId": "swift",
+ "facet": "name.field.enum",
+ "code": "enum Foo: Int {\n case bar = 0\n case baz = 1\n}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:5-0:8",
+ "removal": "0:4-0:8"
+ }
+ ],
+ "domain": "0:0-3:1"
+ },
+ {
+ "targets": [
+ {
+ "content": "1:7-1:10",
+ "removal": "1:7-1:11"
+ }
+ ],
+ "domain": "1:2-1:14"
+ },
+ {
+ "targets": [
+ {
+ "content": "2:7-2:10",
+ "removal": "2:7-2:11"
+ }
+ ],
+ "domain": "2:2-2:14"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/name/name.field.interface",
+ "languageId": "swift",
+ "facet": "name.field.interface",
+ "code": "protocol Foo {\n var bar: Int { get set }\n}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:9-0:12",
+ "removal": "0:9-0:13"
+ }
+ ],
+ "domain": "0:0-2:1"
+ },
+ {
+ "targets": [
+ {
+ "content": "1:6-1:9",
+ "removal": "1:5-1:9"
+ }
+ ],
+ "domain": "1:2-1:26"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/name/name.foreach",
+ "languageId": "swift",
+ "facet": "name.foreach",
+ "code": "for v in values {}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:4-0:5",
+ "removal": "0:4-0:6"
+ }
+ ],
+ "domain": "0:0-0:18"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/name/name.function",
+ "languageId": "swift",
+ "facet": "name.function",
+ "code": "func foo() {}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:5-0:8",
+ "removal": "0:5-0:8"
+ }
+ ],
+ "domain": "0:0-0:13"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/name/name.interface",
+ "languageId": "swift",
+ "facet": "name.interface",
+ "code": "protocol Foo {}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:9-0:12",
+ "removal": "0:9-0:13"
+ }
+ ],
+ "domain": "0:0-0:15"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/name/name.iteration.block",
+ "languageId": "swift",
+ "facet": "name.iteration.block",
+ "code": "struct Foo {\n func bar() { }\n}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-2:1"
+ }
+ ],
+ "domain": "0:0-2:1"
+ },
+ {
+ "targets": [
+ {
+ "content": "0:12-2:0"
+ }
+ ],
+ "domain": "0:12-2:0"
+ },
+ {
+ "targets": [
+ {
+ "content": "1:16-1:17"
+ }
+ ],
+ "domain": "1:16-1:17"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/name/name.iteration.block2",
+ "languageId": "swift",
+ "facet": "name.iteration.block",
+ "code": "func foo() { }",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-0:14"
+ }
+ ],
+ "domain": "0:0-0:14"
+ },
+ {
+ "targets": [
+ {
+ "content": "0:12-0:13"
+ }
+ ],
+ "domain": "0:12-0:13"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/name/name.iteration.block3",
+ "languageId": "swift",
+ "facet": "name.iteration.block",
+ "code": "if true { }\nelse if false { }\nelse { }",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-2:8"
+ }
+ ],
+ "domain": "0:0-2:8"
+ },
+ {
+ "targets": [
+ {
+ "content": "0:9-0:10"
+ }
+ ],
+ "domain": "0:9-0:10"
+ },
+ {
+ "targets": [
+ {
+ "content": "1:15-1:16"
+ }
+ ],
+ "domain": "1:15-1:16"
+ },
+ {
+ "targets": [
+ {
+ "content": "2:6-2:7"
+ }
+ ],
+ "domain": "2:6-2:7"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/name/name.iteration.block4",
+ "languageId": "swift",
+ "facet": "name.iteration.block",
+ "code": "while true { }",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-0:14"
+ }
+ ],
+ "domain": "0:0-0:14"
+ },
+ {
+ "targets": [
+ {
+ "content": "0:12-0:13"
+ }
+ ],
+ "domain": "0:12-0:13"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/name/name.iteration.class",
+ "languageId": "swift",
+ "facet": "name.iteration.class",
+ "code": "class Foo { }",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-0:13"
+ }
+ ],
+ "domain": "0:0-0:13"
+ },
+ {
+ "targets": [
+ {
+ "content": "0:11-0:12"
+ }
+ ],
+ "domain": "0:11-0:12"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/name/name.iteration.document",
+ "languageId": "swift",
+ "facet": "name.iteration.document",
+ "code": "\nlet foo = 0\nlet bar = 1\n",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-3:0"
+ }
+ ],
+ "domain": "0:0-3:0"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/name/name.iteration.enum",
+ "languageId": "swift",
+ "facet": "name.iteration.enum",
+ "code": "enum Foo { }",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-0:12"
+ }
+ ],
+ "domain": "0:0-0:12"
+ },
+ {
+ "targets": [
+ {
+ "content": "0:10-0:11"
+ }
+ ],
+ "domain": "0:10-0:11"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/name/name.iteration.interface",
+ "languageId": "swift",
+ "facet": "name.iteration.interface",
+ "code": "protocol Foo { }",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-0:16"
+ }
+ ],
+ "domain": "0:0-0:16"
+ },
+ {
+ "targets": [
+ {
+ "content": "0:14-0:15"
+ }
+ ],
+ "domain": "0:14-0:15"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/name/name.method.interface",
+ "languageId": "swift",
+ "facet": "name.method.interface",
+ "code": "protocol Foo {\n func bar()\n}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:9-0:12",
+ "removal": "0:9-0:13"
+ }
+ ],
+ "domain": "0:0-2:1"
+ },
+ {
+ "targets": [
+ {
+ "content": "1:7-1:10",
+ "removal": "1:7-1:10"
+ }
+ ],
+ "domain": "1:2-1:12"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/name/name.method",
+ "languageId": "swift",
+ "facet": "name.method",
+ "code": "struct Foo {\n func bar() {}\n}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:7-0:10",
+ "removal": "0:7-0:11"
+ }
+ ],
+ "domain": "0:0-2:1"
+ },
+ {
+ "targets": [
+ {
+ "content": "1:7-1:10",
+ "removal": "1:7-1:10"
+ }
+ ],
+ "domain": "1:2-1:15"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/name/name.typeAlias",
+ "languageId": "swift",
+ "facet": "name.typeAlias",
+ "code": "typealias Foo = Int",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:10-0:13",
+ "removal": "0:10-0:14"
+ }
+ ],
+ "domain": "0:0-0:19"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/name/name.variable.destructuring",
+ "languageId": "swift",
+ "facet": "name.variable.destructuring",
+ "code": "let (foo, bar) = (0, 1)",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:4-0:14",
+ "removal": "0:4-0:15"
+ }
+ ],
+ "domain": "0:0-0:23"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/name/name.variable.initialized",
+ "languageId": "swift",
+ "facet": "name.variable.initialized",
+ "code": "var foo = 0",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:4-0:7",
+ "removal": "0:4-0:8"
+ }
+ ],
+ "domain": "0:0-0:11"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/name/name.variable.uninitialized",
+ "languageId": "swift",
+ "facet": "name.variable.uninitialized",
+ "code": "var foo: Int",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:4-0:7",
+ "removal": "0:3-0:7"
+ }
+ ],
+ "domain": "0:0-0:12"
+ }
+ ]
+ },
{
"name": "scopes/talon/name/name.assignment",
"languageId": "talon",
diff --git a/packages/app-web-docs/src/docs/user/scopes/fixtures/namedFunction.json b/packages/app-web-docs/src/docs/user/scopes/fixtures/namedFunction.json
index a0342cf03c..093bf7cbae 100644
--- a/packages/app-web-docs/src/docs/user/scopes/fixtures/namedFunction.json
+++ b/packages/app-web-docs/src/docs/user/scopes/fixtures/namedFunction.json
@@ -2027,6 +2027,97 @@
}
]
},
+ {
+ "name": "scopes/swift/namedFunction/namedFunction.constructor",
+ "languageId": "swift",
+ "facet": "namedFunction.constructor",
+ "code": "struct Foo {\n init() {}\n}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "1:2-1:11",
+ "removal": "1:0-2:0"
+ }
+ ],
+ "domain": "1:2-1:11"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/namedFunction/namedFunction.iteration.class",
+ "languageId": "swift",
+ "facet": "namedFunction.iteration.class",
+ "code": "struct Foo { }",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-0:14"
+ }
+ ],
+ "domain": "0:0-0:14"
+ },
+ {
+ "targets": [
+ {
+ "content": "0:12-0:13"
+ }
+ ],
+ "domain": "0:12-0:13"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/namedFunction/namedFunction.iteration.document",
+ "languageId": "swift",
+ "facet": "namedFunction.iteration.document",
+ "code": "\nfunc foo() {}\n",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-2:0"
+ }
+ ],
+ "domain": "0:0-2:0"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/namedFunction/namedFunction.method",
+ "languageId": "swift",
+ "facet": "namedFunction.method",
+ "code": "struct Foo {\n func bar() {}\n}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "1:2-1:15",
+ "removal": "1:0-2:0"
+ }
+ ],
+ "domain": "1:2-1:15"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/namedFunction/namedFunction",
+ "languageId": "swift",
+ "facet": "namedFunction",
+ "code": "func foo() {}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-0:13",
+ "removal": "0:0-0:13"
+ }
+ ],
+ "domain": "0:0-0:13"
+ }
+ ]
+ },
{
"name": "scopes/typescript.core/namedFunction/namedFunction.constructor",
"languageId": "typescript.core",
diff --git a/packages/app-web-docs/src/docs/user/scopes/fixtures/regularExpression.json b/packages/app-web-docs/src/docs/user/scopes/fixtures/regularExpression.json
index 564c855b6d..0cbdb8f09a 100644
--- a/packages/app-web-docs/src/docs/user/scopes/fixtures/regularExpression.json
+++ b/packages/app-web-docs/src/docs/user/scopes/fixtures/regularExpression.json
@@ -66,5 +66,22 @@
"domain": "0:11-0:16"
}
]
+ },
+ {
+ "name": "scopes/swift/regularExpression",
+ "languageId": "swift",
+ "facet": "regularExpression",
+ "code": "/\\d+$/",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-0:6",
+ "removal": "0:0-0:6"
+ }
+ ],
+ "domain": "0:0-0:6"
+ }
+ ]
}
]
diff --git a/packages/app-web-docs/src/docs/user/scopes/fixtures/statement.json b/packages/app-web-docs/src/docs/user/scopes/fixtures/statement.json
index 8ffb3574ac..a6fae0451e 100644
--- a/packages/app-web-docs/src/docs/user/scopes/fixtures/statement.json
+++ b/packages/app-web-docs/src/docs/user/scopes/fixtures/statement.json
@@ -11464,6 +11464,799 @@
}
]
},
+ {
+ "name": "scopes/swift/statement/statement.assignment.compound",
+ "languageId": "swift",
+ "facet": "statement.assignment.compound",
+ "code": "foo += 0",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-0:8",
+ "removal": "0:0-0:8"
+ }
+ ],
+ "domain": "0:0-0:8"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/statement/statement.assignment.destructuring",
+ "languageId": "swift",
+ "facet": "statement.assignment.destructuring",
+ "code": "(foo, bar) = (0, 1)",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-0:19",
+ "removal": "0:0-0:19"
+ }
+ ],
+ "domain": "0:0-0:19"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/statement/statement.assignment",
+ "languageId": "swift",
+ "facet": "statement.assignment",
+ "code": "foo = 0",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-0:7",
+ "removal": "0:0-0:7"
+ }
+ ],
+ "domain": "0:0-0:7"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/statement/statement.break",
+ "languageId": "swift",
+ "facet": "statement.break",
+ "code": "while true {\n break\n}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-2:1",
+ "removal": "0:0-2:1"
+ }
+ ],
+ "domain": "0:0-2:1"
+ },
+ {
+ "targets": [
+ {
+ "content": "1:4-1:9",
+ "removal": "1:0-2:0"
+ }
+ ],
+ "domain": "1:4-1:9"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/statement/statement.class",
+ "languageId": "swift",
+ "facet": "statement.class",
+ "code": "class Foo {}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-0:12",
+ "removal": "0:0-0:12"
+ }
+ ],
+ "domain": "0:0-0:12"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/statement/statement.constant",
+ "languageId": "swift",
+ "facet": "statement.constant",
+ "code": "let foo = 0",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-0:11",
+ "removal": "0:0-0:11"
+ }
+ ],
+ "domain": "0:0-0:11"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/statement/statement.constructor",
+ "languageId": "swift",
+ "facet": "statement.constructor",
+ "code": "struct Foo {\n init() {}\n}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-2:1",
+ "removal": "0:0-2:1"
+ }
+ ],
+ "domain": "0:0-2:1"
+ },
+ {
+ "targets": [
+ {
+ "content": "1:2-1:11",
+ "removal": "1:0-2:0"
+ }
+ ],
+ "domain": "1:2-1:11"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/statement/statement.continue",
+ "languageId": "swift",
+ "facet": "statement.continue",
+ "code": "while true {\n continue\n}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-2:1",
+ "removal": "0:0-2:1"
+ }
+ ],
+ "domain": "0:0-2:1"
+ },
+ {
+ "targets": [
+ {
+ "content": "1:4-1:12",
+ "removal": "1:0-2:0"
+ }
+ ],
+ "domain": "1:4-1:12"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/statement/statement.doWhile",
+ "languageId": "swift",
+ "facet": "statement.doWhile",
+ "code": "repeat {} while foo",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-0:19",
+ "removal": "0:0-0:19"
+ }
+ ],
+ "domain": "0:0-0:19"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/statement/statement.enum",
+ "languageId": "swift",
+ "facet": "statement.enum",
+ "code": "enum Foo {}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-0:11",
+ "removal": "0:0-0:11"
+ }
+ ],
+ "domain": "0:0-0:11"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/statement/statement.field.class",
+ "languageId": "swift",
+ "facet": "statement.field.class",
+ "code": "struct Foo {\n var bar = 0\n}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-2:1",
+ "removal": "0:0-2:1"
+ }
+ ],
+ "domain": "0:0-2:1"
+ },
+ {
+ "targets": [
+ {
+ "content": "1:2-1:13",
+ "removal": "1:0-2:0"
+ }
+ ],
+ "domain": "1:2-1:13"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/statement/statement.field.interface",
+ "languageId": "swift",
+ "facet": "statement.field.interface",
+ "code": "protocol Foo {\n var bar: Int { get set }\n}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-2:1",
+ "removal": "0:0-2:1"
+ }
+ ],
+ "domain": "0:0-2:1"
+ },
+ {
+ "targets": [
+ {
+ "content": "1:2-1:26",
+ "removal": "1:0-2:0"
+ }
+ ],
+ "domain": "1:2-1:26"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/statement/statement.foreach",
+ "languageId": "swift",
+ "facet": "statement.foreach",
+ "code": "for v in values {}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-0:18",
+ "removal": "0:0-0:18"
+ }
+ ],
+ "domain": "0:0-0:18"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/statement/statement.function",
+ "languageId": "swift",
+ "facet": "statement.function",
+ "code": "func foo() {}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-0:13",
+ "removal": "0:0-0:13"
+ }
+ ],
+ "domain": "0:0-0:13"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/statement/statement.functionCall",
+ "languageId": "swift",
+ "facet": "statement.functionCall",
+ "code": "foo()",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-0:5",
+ "removal": "0:0-0:5"
+ }
+ ],
+ "domain": "0:0-0:5"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/statement/statement.if",
+ "languageId": "swift",
+ "facet": "statement.if",
+ "code": "if true {}\nelse if false {}\nelse {}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-2:7",
+ "removal": "0:0-2:7"
+ }
+ ],
+ "domain": "0:0-2:7"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/statement/statement.import",
+ "languageId": "swift",
+ "facet": "statement.import",
+ "code": "import Foo",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-0:10",
+ "removal": "0:0-0:10"
+ }
+ ],
+ "domain": "0:0-0:10"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/statement/statement.interface",
+ "languageId": "swift",
+ "facet": "statement.interface",
+ "code": "protocol Foo {}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-0:15",
+ "removal": "0:0-0:15"
+ }
+ ],
+ "domain": "0:0-0:15"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/statement/statement.iteration.block",
+ "languageId": "swift",
+ "facet": "statement.iteration.block",
+ "code": "struct Foo {\n func bar() { }\n}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-2:1"
+ }
+ ],
+ "domain": "0:0-2:1"
+ },
+ {
+ "targets": [
+ {
+ "content": "0:12-2:0"
+ }
+ ],
+ "domain": "0:12-2:0"
+ },
+ {
+ "targets": [
+ {
+ "content": "1:16-1:17"
+ }
+ ],
+ "domain": "1:16-1:17"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/statement/statement.iteration.block2",
+ "languageId": "swift",
+ "facet": "statement.iteration.block",
+ "code": "func foo() { }",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-0:14"
+ }
+ ],
+ "domain": "0:0-0:14"
+ },
+ {
+ "targets": [
+ {
+ "content": "0:12-0:13"
+ }
+ ],
+ "domain": "0:12-0:13"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/statement/statement.iteration.block3",
+ "languageId": "swift",
+ "facet": "statement.iteration.block",
+ "code": "if true { }\nelse if false { }\nelse { }",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-2:8"
+ }
+ ],
+ "domain": "0:0-2:8"
+ },
+ {
+ "targets": [
+ {
+ "content": "0:9-0:10"
+ }
+ ],
+ "domain": "0:9-0:10"
+ },
+ {
+ "targets": [
+ {
+ "content": "1:15-1:16"
+ }
+ ],
+ "domain": "1:15-1:16"
+ },
+ {
+ "targets": [
+ {
+ "content": "2:6-2:7"
+ }
+ ],
+ "domain": "2:6-2:7"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/statement/statement.iteration.block4",
+ "languageId": "swift",
+ "facet": "statement.iteration.block",
+ "code": "while true { }",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-0:14"
+ }
+ ],
+ "domain": "0:0-0:14"
+ },
+ {
+ "targets": [
+ {
+ "content": "0:12-0:13"
+ }
+ ],
+ "domain": "0:12-0:13"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/statement/statement.iteration.class",
+ "languageId": "swift",
+ "facet": "statement.iteration.class",
+ "code": "class Foo { }",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-0:13"
+ }
+ ],
+ "domain": "0:0-0:13"
+ },
+ {
+ "targets": [
+ {
+ "content": "0:11-0:12"
+ }
+ ],
+ "domain": "0:11-0:12"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/statement/statement.iteration.document",
+ "languageId": "swift",
+ "facet": "statement.iteration.document",
+ "code": "\nvar foo: Int\n",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-2:0"
+ }
+ ],
+ "domain": "0:0-2:0"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/statement/statement.iteration.interface",
+ "languageId": "swift",
+ "facet": "statement.iteration.interface",
+ "code": "protocol Foo { }",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-0:16"
+ }
+ ],
+ "domain": "0:0-0:16"
+ },
+ {
+ "targets": [
+ {
+ "content": "0:14-0:15"
+ }
+ ],
+ "domain": "0:14-0:15"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/statement/statement.method.interface",
+ "languageId": "swift",
+ "facet": "statement.method.interface",
+ "code": "protocol Foo {\n func bar()\n}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-2:1",
+ "removal": "0:0-2:1"
+ }
+ ],
+ "domain": "0:0-2:1"
+ },
+ {
+ "targets": [
+ {
+ "content": "1:2-1:12",
+ "removal": "1:0-2:0"
+ }
+ ],
+ "domain": "1:2-1:12"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/statement/statement.method",
+ "languageId": "swift",
+ "facet": "statement.method",
+ "code": "struct Foo {\n func bar() {}\n}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-2:1",
+ "removal": "0:0-2:1"
+ }
+ ],
+ "domain": "0:0-2:1"
+ },
+ {
+ "targets": [
+ {
+ "content": "1:2-1:15",
+ "removal": "1:0-2:0"
+ }
+ ],
+ "domain": "1:2-1:15"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/statement/statement.return",
+ "languageId": "swift",
+ "facet": "statement.return",
+ "code": "func foo() {\n return 0\n}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-2:1",
+ "removal": "0:0-2:1"
+ }
+ ],
+ "domain": "0:0-2:1"
+ },
+ {
+ "targets": [
+ {
+ "content": "1:4-1:12",
+ "removal": "1:0-2:0"
+ }
+ ],
+ "domain": "1:4-1:12"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/statement/statement.switch",
+ "languageId": "swift",
+ "facet": "statement.switch",
+ "code": "switch value {}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-0:15",
+ "removal": "0:0-0:15"
+ }
+ ],
+ "domain": "0:0-0:15"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/statement/statement.throw",
+ "languageId": "swift",
+ "facet": "statement.throw",
+ "code": "func foo() throws {\n throw Error\n}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-2:1",
+ "removal": "0:0-2:1"
+ }
+ ],
+ "domain": "0:0-2:1"
+ },
+ {
+ "targets": [
+ {
+ "content": "1:4-1:15",
+ "removal": "1:0-2:0"
+ }
+ ],
+ "domain": "1:4-1:15"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/statement/statement.try",
+ "languageId": "swift",
+ "facet": "statement.try",
+ "code": "do {}\ncatch {}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-1:8",
+ "removal": "0:0-1:8"
+ }
+ ],
+ "domain": "0:0-1:8"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/statement/statement.typeAlias",
+ "languageId": "swift",
+ "facet": "statement.typeAlias",
+ "code": "typealias Foo = Int",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-0:19",
+ "removal": "0:0-0:19"
+ }
+ ],
+ "domain": "0:0-0:19"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/statement/statement.variable.destructuring",
+ "languageId": "swift",
+ "facet": "statement.variable.destructuring",
+ "code": "let (foo, bar) = (0, 1)",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-0:23",
+ "removal": "0:0-0:23"
+ }
+ ],
+ "domain": "0:0-0:23"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/statement/statement.variable.initialized",
+ "languageId": "swift",
+ "facet": "statement.variable.initialized",
+ "code": "var foo = 0",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-0:11",
+ "removal": "0:0-0:11"
+ }
+ ],
+ "domain": "0:0-0:11"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/statement/statement.variable.uninitialized",
+ "languageId": "swift",
+ "facet": "statement.variable.uninitialized",
+ "code": "var foo: Int",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-0:12",
+ "removal": "0:0-0:12"
+ }
+ ],
+ "domain": "0:0-0:12"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/statement/statement.while",
+ "languageId": "swift",
+ "facet": "statement.while",
+ "code": "while true {}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-0:13",
+ "removal": "0:0-0:13"
+ }
+ ],
+ "domain": "0:0-0:13"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/statement/statement.yield",
+ "languageId": "swift",
+ "facet": "statement.yield",
+ "code": "var foo: Int {\n _read {\n yield 0\n }\n}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-4:1",
+ "removal": "0:0-4:1"
+ }
+ ],
+ "domain": "0:0-4:1"
+ },
+ {
+ "targets": [
+ {
+ "content": "1:4-3:5",
+ "removal": "1:0-4:0"
+ }
+ ],
+ "domain": "1:4-3:5"
+ },
+ {
+ "targets": [
+ {
+ "content": "2:8-2:15",
+ "removal": "2:0-3:0"
+ }
+ ],
+ "domain": "2:8-2:15"
+ }
+ ]
+ },
{
"name": "scopes/talon/statement.assignment",
"languageId": "talon",
diff --git a/packages/app-web-docs/src/docs/user/scopes/fixtures/type.json b/packages/app-web-docs/src/docs/user/scopes/fixtures/type.json
index 016f6d24a5..8189f35a0d 100644
--- a/packages/app-web-docs/src/docs/user/scopes/fixtures/type.json
+++ b/packages/app-web-docs/src/docs/user/scopes/fixtures/type.json
@@ -7476,6 +7476,774 @@
}
]
},
+ {
+ "name": "scopes/swift/type/type.alias",
+ "languageId": "swift",
+ "facet": "type.alias",
+ "code": "typealias Foo = Int",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-0:19",
+ "removal": "0:0-0:19"
+ }
+ ],
+ "domain": "0:0-0:19"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/type/type.argument.catch",
+ "languageId": "swift",
+ "facet": "type.argument.catch",
+ "code": "do {}\ncatch let e as Error {}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "1:15-1:20",
+ "removal": "1:15-1:21"
+ }
+ ],
+ "domain": "1:6-1:20"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/type/type.argument.formal.constructor.iteration",
+ "languageId": "swift",
+ "facet": "type.argument.formal.constructor.iteration",
+ "code": "struct Foo {\n init(aaa: Int, bbb: Int = 0) {}\n}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-2:1"
+ }
+ ],
+ "domain": "0:0-2:1"
+ },
+ {
+ "targets": [
+ {
+ "content": "0:12-2:0"
+ }
+ ],
+ "domain": "0:12-2:0"
+ },
+ {
+ "targets": [
+ {
+ "content": "1:9-1:31"
+ }
+ ],
+ "domain": "1:9-1:31"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/type/type.argument.formal.constructor",
+ "languageId": "swift",
+ "facet": "type.argument.formal.constructor",
+ "code": "struct Foo {\n init(aaa: Int, bbb: Int = 0) {}\n}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-2:1",
+ "removal": "0:0-2:1"
+ }
+ ],
+ "domain": "0:0-2:1"
+ },
+ {
+ "targets": [
+ {
+ "content": "1:14-1:17",
+ "removal": "1:12-1:17"
+ }
+ ],
+ "domain": "1:9-1:17"
+ },
+ {
+ "targets": [
+ {
+ "content": "1:24-1:27",
+ "removal": "1:22-1:27"
+ }
+ ],
+ "domain": "1:19-1:31"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/type/type.argument.formal.iteration",
+ "languageId": "swift",
+ "facet": "type.argument.formal.iteration",
+ "code": "func foo(aaa: Int, bbb: Int = 0) {}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-0:35"
+ }
+ ],
+ "domain": "0:0-0:35"
+ },
+ {
+ "targets": [
+ {
+ "content": "0:9-0:31"
+ }
+ ],
+ "domain": "0:9-0:31"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/type/type.argument.formal.lambda.iteration",
+ "languageId": "swift",
+ "facet": "type.argument.formal.lambda.iteration",
+ "code": "{ (aaa: Int, bbb: Int) in }",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-0:27"
+ }
+ ],
+ "domain": "0:0-0:27"
+ },
+ {
+ "targets": [
+ {
+ "content": "0:3-0:21"
+ }
+ ],
+ "domain": "0:3-0:21"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/type/type.argument.formal.lambda",
+ "languageId": "swift",
+ "facet": "type.argument.formal.lambda",
+ "code": "{ (aaa: Int, bbb: Int) in }",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:8-0:11",
+ "removal": "0:6-0:11"
+ }
+ ],
+ "domain": "0:8-0:11"
+ },
+ {
+ "targets": [
+ {
+ "content": "0:18-0:21",
+ "removal": "0:16-0:21"
+ }
+ ],
+ "domain": "0:18-0:21"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/type/type.argument.formal.method.iteration",
+ "languageId": "swift",
+ "facet": "type.argument.formal.method.iteration",
+ "code": "struct Foo {\n func bar(aaa: Int, bbb: Int = 0) {}\n}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-2:1"
+ }
+ ],
+ "domain": "0:0-2:1"
+ },
+ {
+ "targets": [
+ {
+ "content": "0:12-2:0"
+ }
+ ],
+ "domain": "0:12-2:0"
+ },
+ {
+ "targets": [
+ {
+ "content": "1:13-1:35"
+ }
+ ],
+ "domain": "1:13-1:35"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/type/type.argument.formal.method",
+ "languageId": "swift",
+ "facet": "type.argument.formal.method",
+ "code": "struct Foo {\n func bar(aaa: Int, bbb: Int = 0) {}\n}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-2:1",
+ "removal": "0:0-2:1"
+ }
+ ],
+ "domain": "0:0-2:1"
+ },
+ {
+ "targets": [
+ {
+ "content": "1:18-1:21",
+ "removal": "1:16-1:21"
+ }
+ ],
+ "domain": "1:13-1:21"
+ },
+ {
+ "targets": [
+ {
+ "content": "1:28-1:31",
+ "removal": "1:26-1:31"
+ }
+ ],
+ "domain": "1:23-1:35"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/type/type.argument.formal",
+ "languageId": "swift",
+ "facet": "type.argument.formal",
+ "code": "func foo(aaa: Int, bbb: Int = 0) {}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:14-0:17",
+ "removal": "0:12-0:17"
+ }
+ ],
+ "domain": "0:9-0:17"
+ },
+ {
+ "targets": [
+ {
+ "content": "0:24-0:27",
+ "removal": "0:22-0:27"
+ }
+ ],
+ "domain": "0:19-0:31"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/type/type.cast",
+ "languageId": "swift",
+ "facet": "type.cast",
+ "code": "foo as Int",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:7-0:10",
+ "removal": "0:3-0:10"
+ }
+ ],
+ "domain": "0:0-0:10"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/type/type.class",
+ "languageId": "swift",
+ "facet": "type.class",
+ "code": "class Foo: Bar {}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-0:17",
+ "removal": "0:0-0:17"
+ }
+ ],
+ "domain": "0:0-0:17"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/type/type.constant",
+ "languageId": "swift",
+ "facet": "type.constant",
+ "code": "let foo: Int = 0",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:9-0:12",
+ "removal": "0:7-0:12"
+ }
+ ],
+ "domain": "0:0-0:16"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/type/type.enum",
+ "languageId": "swift",
+ "facet": "type.enum",
+ "code": "enum Foo {}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-0:11",
+ "removal": "0:0-0:11"
+ }
+ ],
+ "domain": "0:0-0:11"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/type/type.field.class",
+ "languageId": "swift",
+ "facet": "type.field.class",
+ "code": "struct Foo {\n var bar: Int\n var baz: Int = 0\n}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-3:1",
+ "removal": "0:0-3:1"
+ }
+ ],
+ "domain": "0:0-3:1"
+ },
+ {
+ "targets": [
+ {
+ "content": "1:13-1:16",
+ "removal": "1:11-1:16"
+ }
+ ],
+ "domain": "1:4-1:16"
+ },
+ {
+ "targets": [
+ {
+ "content": "2:13-2:16",
+ "removal": "2:11-2:16"
+ }
+ ],
+ "domain": "2:4-2:20"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/type/type.field.interface",
+ "languageId": "swift",
+ "facet": "type.field.interface",
+ "code": "protocol Foo {\n var foo: Int { get set }\n}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-2:1",
+ "removal": "0:0-2:1"
+ }
+ ],
+ "domain": "0:0-2:1"
+ },
+ {
+ "targets": [
+ {
+ "content": "1:13-1:16",
+ "removal": "1:11-1:16"
+ }
+ ],
+ "domain": "1:4-1:28"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/type/type.foreach",
+ "languageId": "swift",
+ "facet": "type.foreach",
+ "code": "for v: Int in values {}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:7-0:10",
+ "removal": "0:5-0:10"
+ }
+ ],
+ "domain": "0:0-0:23"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/type/type.interface",
+ "languageId": "swift",
+ "facet": "type.interface",
+ "code": "protocol Foo {}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-0:15",
+ "removal": "0:0-0:15"
+ }
+ ],
+ "domain": "0:0-0:15"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/type/type.iteration.block",
+ "languageId": "swift",
+ "facet": "type.iteration.block",
+ "code": "struct Foo {\n func bar() { }\n}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-2:1"
+ }
+ ],
+ "domain": "0:0-2:1"
+ },
+ {
+ "targets": [
+ {
+ "content": "0:12-2:0"
+ }
+ ],
+ "domain": "0:12-2:0"
+ },
+ {
+ "targets": [
+ {
+ "content": "1:16-1:17"
+ }
+ ],
+ "domain": "1:16-1:17"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/type/type.iteration.block2",
+ "languageId": "swift",
+ "facet": "type.iteration.block",
+ "code": "func foo() { }",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-0:14"
+ }
+ ],
+ "domain": "0:0-0:14"
+ },
+ {
+ "targets": [
+ {
+ "content": "0:12-0:13"
+ }
+ ],
+ "domain": "0:12-0:13"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/type/type.iteration.block3",
+ "languageId": "swift",
+ "facet": "type.iteration.block",
+ "code": "if true { }\nelse if false { }\nelse { }",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-2:8"
+ }
+ ],
+ "domain": "0:0-2:8"
+ },
+ {
+ "targets": [
+ {
+ "content": "0:9-0:10"
+ }
+ ],
+ "domain": "0:9-0:10"
+ },
+ {
+ "targets": [
+ {
+ "content": "1:15-1:16"
+ }
+ ],
+ "domain": "1:15-1:16"
+ },
+ {
+ "targets": [
+ {
+ "content": "2:6-2:7"
+ }
+ ],
+ "domain": "2:6-2:7"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/type/type.iteration.block4",
+ "languageId": "swift",
+ "facet": "type.iteration.block",
+ "code": "while true { }",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-0:14"
+ }
+ ],
+ "domain": "0:0-0:14"
+ },
+ {
+ "targets": [
+ {
+ "content": "0:12-0:13"
+ }
+ ],
+ "domain": "0:12-0:13"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/type/type.iteration.class",
+ "languageId": "swift",
+ "facet": "type.iteration.class",
+ "code": "class Foo { }",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-0:13"
+ }
+ ],
+ "domain": "0:0-0:13"
+ },
+ {
+ "targets": [
+ {
+ "content": "0:11-0:12"
+ }
+ ],
+ "domain": "0:11-0:12"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/type/type.iteration.document",
+ "languageId": "swift",
+ "facet": "type.iteration.document",
+ "code": "\nlet foo: Int\n",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-2:0"
+ }
+ ],
+ "domain": "0:0-2:0"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/type/type.iteration.interface",
+ "languageId": "swift",
+ "facet": "type.iteration.interface",
+ "code": "protocol Foo { }",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-0:16"
+ }
+ ],
+ "domain": "0:0-0:16"
+ },
+ {
+ "targets": [
+ {
+ "content": "0:14-0:15"
+ }
+ ],
+ "domain": "0:14-0:15"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/type/type.return.lambda",
+ "languageId": "swift",
+ "facet": "type.return.lambda",
+ "code": "{ () -> Int in 0 }",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:8-0:11",
+ "removal": "0:4-0:11"
+ }
+ ],
+ "domain": "0:8-0:11"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/type/type.return.method",
+ "languageId": "swift",
+ "facet": "type.return.method",
+ "code": "struct Foo {\n func bar() -> Int {}\n}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-2:1",
+ "removal": "0:0-2:1"
+ }
+ ],
+ "domain": "0:0-2:1"
+ },
+ {
+ "targets": [
+ {
+ "content": "1:18-1:21",
+ "removal": "1:14-1:21"
+ }
+ ],
+ "domain": "1:4-1:24"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/type/type.return",
+ "languageId": "swift",
+ "facet": "type.return",
+ "code": "func foo() -> Int {}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:14-0:17",
+ "removal": "0:10-0:17"
+ }
+ ],
+ "domain": "0:0-0:20"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/type/type.typeArgument.iteration",
+ "languageId": "swift",
+ "facet": "type.typeArgument.iteration",
+ "code": "let foo: Map",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-0:22"
+ }
+ ],
+ "domain": "0:0-0:22"
+ },
+ {
+ "targets": [
+ {
+ "content": "0:13-0:21"
+ }
+ ],
+ "domain": "0:13-0:21"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/type/type.typeArgument",
+ "languageId": "swift",
+ "facet": "type.typeArgument",
+ "code": "let foo: Map",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:9-0:22",
+ "removal": "0:7-0:22"
+ }
+ ],
+ "domain": "0:0-0:22"
+ },
+ {
+ "targets": [
+ {
+ "content": "0:13-0:16",
+ "removal": "0:13-0:18"
+ }
+ ],
+ "domain": "0:13-0:16"
+ },
+ {
+ "targets": [
+ {
+ "content": "0:18-0:21",
+ "removal": "0:16-0:21"
+ }
+ ],
+ "domain": "0:18-0:21"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/type/type.variable.initialized",
+ "languageId": "swift",
+ "facet": "type.variable.initialized",
+ "code": "var foo: Int = 0",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:9-0:12",
+ "removal": "0:7-0:12"
+ }
+ ],
+ "domain": "0:0-0:16"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/type/type.variable.uninitialized",
+ "languageId": "swift",
+ "facet": "type.variable.uninitialized",
+ "code": "var foo: Int",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:9-0:12",
+ "removal": "0:7-0:12"
+ }
+ ],
+ "domain": "0:0-0:12"
+ }
+ ]
+ },
{
"name": "scopes/typescript/type.cast",
"languageId": "typescript",
diff --git a/packages/app-web-docs/src/docs/user/scopes/fixtures/value.json b/packages/app-web-docs/src/docs/user/scopes/fixtures/value.json
index c016ad2d23..20227f978b 100644
--- a/packages/app-web-docs/src/docs/user/scopes/fixtures/value.json
+++ b/packages/app-web-docs/src/docs/user/scopes/fixtures/value.json
@@ -9061,6 +9061,720 @@
}
]
},
+ {
+ "name": "scopes/swift/value/value.argument.actual.iteration",
+ "languageId": "swift",
+ "facet": "value.argument.actual.iteration",
+ "code": "foo(aaa: 0, bbb: 1)",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-0:19"
+ }
+ ],
+ "domain": "0:0-0:19"
+ },
+ {
+ "targets": [
+ {
+ "content": "0:4-0:18"
+ }
+ ],
+ "domain": "0:4-0:18"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/value/value.argument.actual",
+ "languageId": "swift",
+ "facet": "value.argument.actual",
+ "code": "foo(aaa: 0, bbb: 1)",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:9-0:10",
+ "removal": "0:7-0:10"
+ }
+ ],
+ "domain": "0:4-0:10"
+ },
+ {
+ "targets": [
+ {
+ "content": "0:17-0:18",
+ "removal": "0:15-0:18"
+ }
+ ],
+ "domain": "0:12-0:18"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/value/value.argument.formal.constructor.iteration",
+ "languageId": "swift",
+ "facet": "value.argument.formal.constructor.iteration",
+ "code": "struct Foo {\n init(aaa: Int = 0, bbb: Int = 1) {}\n}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-2:1"
+ }
+ ],
+ "domain": "0:0-2:1"
+ },
+ {
+ "targets": [
+ {
+ "content": "0:12-2:0"
+ }
+ ],
+ "domain": "0:12-2:0"
+ },
+ {
+ "targets": [
+ {
+ "content": "1:9-1:35"
+ }
+ ],
+ "domain": "1:9-1:35"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/value/value.argument.formal.constructor",
+ "languageId": "swift",
+ "facet": "value.argument.formal.constructor",
+ "code": "struct Foo {\n init(aaa: Int = 0, bbb: Int = 1) {}\n}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "1:20-1:21",
+ "removal": "1:17-1:21"
+ }
+ ],
+ "domain": "1:9-1:21"
+ },
+ {
+ "targets": [
+ {
+ "content": "1:34-1:35",
+ "removal": "1:31-1:35"
+ }
+ ],
+ "domain": "1:23-1:35"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/value/value.argument.formal.iteration",
+ "languageId": "swift",
+ "facet": "value.argument.formal.iteration",
+ "code": "func foo(aaa: Int = 0, bbb: Int = 1) {}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-0:39"
+ }
+ ],
+ "domain": "0:0-0:39"
+ },
+ {
+ "targets": [
+ {
+ "content": "0:9-0:35"
+ }
+ ],
+ "domain": "0:9-0:35"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/value/value.argument.formal.method.iteration",
+ "languageId": "swift",
+ "facet": "value.argument.formal.method.iteration",
+ "code": "struct Foo {\n func bar(aaa: Int = 0, bbb: Int = 1) {}\n}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-2:1"
+ }
+ ],
+ "domain": "0:0-2:1"
+ },
+ {
+ "targets": [
+ {
+ "content": "0:12-2:0"
+ }
+ ],
+ "domain": "0:12-2:0"
+ },
+ {
+ "targets": [
+ {
+ "content": "1:13-1:39"
+ }
+ ],
+ "domain": "1:13-1:39"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/value/value.argument.formal.method",
+ "languageId": "swift",
+ "facet": "value.argument.formal.method",
+ "code": "struct Foo {\n func bar(aaa: Int = 0, bbb: Int = 1) {}\n}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "1:24-1:25",
+ "removal": "1:21-1:25"
+ }
+ ],
+ "domain": "1:13-1:25"
+ },
+ {
+ "targets": [
+ {
+ "content": "1:38-1:39",
+ "removal": "1:35-1:39"
+ }
+ ],
+ "domain": "1:27-1:39"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/value/value.argument.formal",
+ "languageId": "swift",
+ "facet": "value.argument.formal",
+ "code": "func foo(aaa: Int = 0, bbb: Int = 1) {}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:20-0:21",
+ "removal": "0:17-0:21"
+ }
+ ],
+ "domain": "0:9-0:21"
+ },
+ {
+ "targets": [
+ {
+ "content": "0:34-0:35",
+ "removal": "0:31-0:35"
+ }
+ ],
+ "domain": "0:23-0:35"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/value/value.assignment.compound",
+ "languageId": "swift",
+ "facet": "value.assignment.compound",
+ "code": "foo += 0",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:7-0:8",
+ "removal": "0:3-0:8"
+ }
+ ],
+ "domain": "0:0-0:8"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/value/value.assignment.destructuring",
+ "languageId": "swift",
+ "facet": "value.assignment.destructuring",
+ "code": "(foo, bar) = (0, 1)",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:13-0:19",
+ "removal": "0:10-0:19"
+ }
+ ],
+ "domain": "0:0-0:19"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/value/value.assignment",
+ "languageId": "swift",
+ "facet": "value.assignment",
+ "code": "foo = 0",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:6-0:7",
+ "removal": "0:3-0:7"
+ }
+ ],
+ "domain": "0:0-0:7"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/value/value.constant",
+ "languageId": "swift",
+ "facet": "value.constant",
+ "code": "let foo = 0",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:10-0:11",
+ "removal": "0:7-0:11"
+ }
+ ],
+ "domain": "0:0-0:11"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/value/value.field.class",
+ "languageId": "swift",
+ "facet": "value.field.class",
+ "code": "struct Foo {\n var bar = 0\n var baz: Int = 0\n}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "1:12-1:13",
+ "removal": "1:9-1:13"
+ }
+ ],
+ "domain": "1:2-1:13"
+ },
+ {
+ "targets": [
+ {
+ "content": "2:17-2:18",
+ "removal": "2:14-2:18"
+ }
+ ],
+ "domain": "2:2-2:18"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/value/value.field.enum",
+ "languageId": "swift",
+ "facet": "value.field.enum",
+ "code": "enum Foo: Int {\n case bar = 0\n}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "1:13-1:14",
+ "removal": "1:10-1:14"
+ }
+ ],
+ "domain": "1:2-1:14"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/value/value.foreach",
+ "languageId": "swift",
+ "facet": "value.foreach",
+ "code": "for v in values {}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:9-0:15",
+ "removal": "0:9-0:16"
+ }
+ ],
+ "domain": "0:0-0:18"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/value/value.iteration.block",
+ "languageId": "swift",
+ "facet": "value.iteration.block",
+ "code": "struct Foo {\n func bar() { }\n}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-2:1"
+ }
+ ],
+ "domain": "0:0-2:1"
+ },
+ {
+ "targets": [
+ {
+ "content": "0:12-2:0"
+ }
+ ],
+ "domain": "0:12-2:0"
+ },
+ {
+ "targets": [
+ {
+ "content": "1:16-1:17"
+ }
+ ],
+ "domain": "1:16-1:17"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/value/value.iteration.block2",
+ "languageId": "swift",
+ "facet": "value.iteration.block",
+ "code": "func foo() { }",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-0:14"
+ }
+ ],
+ "domain": "0:0-0:14"
+ },
+ {
+ "targets": [
+ {
+ "content": "0:12-0:13"
+ }
+ ],
+ "domain": "0:12-0:13"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/value/value.iteration.block3",
+ "languageId": "swift",
+ "facet": "value.iteration.block",
+ "code": "if true { }\nelse if false { }\nelse { }",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-2:8"
+ }
+ ],
+ "domain": "0:0-2:8"
+ },
+ {
+ "targets": [
+ {
+ "content": "0:9-0:10"
+ }
+ ],
+ "domain": "0:9-0:10"
+ },
+ {
+ "targets": [
+ {
+ "content": "1:15-1:16"
+ }
+ ],
+ "domain": "1:15-1:16"
+ },
+ {
+ "targets": [
+ {
+ "content": "2:6-2:7"
+ }
+ ],
+ "domain": "2:6-2:7"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/value/value.iteration.block4",
+ "languageId": "swift",
+ "facet": "value.iteration.block",
+ "code": "while true { }",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-0:14"
+ }
+ ],
+ "domain": "0:0-0:14"
+ },
+ {
+ "targets": [
+ {
+ "content": "0:12-0:13"
+ }
+ ],
+ "domain": "0:12-0:13"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/value/value.iteration.class",
+ "languageId": "swift",
+ "facet": "value.iteration.class",
+ "code": "struct Foo { }",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-0:14"
+ }
+ ],
+ "domain": "0:0-0:14"
+ },
+ {
+ "targets": [
+ {
+ "content": "0:12-0:13"
+ }
+ ],
+ "domain": "0:12-0:13"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/value/value.iteration.document",
+ "languageId": "swift",
+ "facet": "value.iteration.document",
+ "code": "\nvar foo: Int\n",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-2:0"
+ }
+ ],
+ "domain": "0:0-2:0"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/value/value.iteration.enum",
+ "languageId": "swift",
+ "facet": "value.iteration.enum",
+ "code": "enum Foo { }",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-0:12"
+ }
+ ],
+ "domain": "0:0-0:12"
+ },
+ {
+ "targets": [
+ {
+ "content": "0:10-0:11"
+ }
+ ],
+ "domain": "0:10-0:11"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/value/value.mapPair.iteration",
+ "languageId": "swift",
+ "facet": "value.mapPair.iteration",
+ "code": "[foo: 0, bar: 1]",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:0-0:16"
+ }
+ ],
+ "domain": "0:0-0:16"
+ },
+ {
+ "targets": [
+ {
+ "content": "0:1-0:15"
+ }
+ ],
+ "domain": "0:1-0:15"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/value/value.mapPair",
+ "languageId": "swift",
+ "facet": "value.mapPair",
+ "code": "[aaa: 0, bbb: 1]",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:6-0:7",
+ "removal": "0:4-0:7"
+ }
+ ],
+ "domain": "0:1-0:7"
+ },
+ {
+ "targets": [
+ {
+ "content": "0:14-0:15",
+ "removal": "0:12-0:15"
+ }
+ ],
+ "domain": "0:9-0:15"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/value/value.return.lambda",
+ "languageId": "swift",
+ "facet": "value.return.lambda",
+ "code": "{ () -> Int in 0 }",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:15-0:16",
+ "removal": "0:15-0:17"
+ }
+ ],
+ "domain": "0:0-0:18"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/value/value.return",
+ "languageId": "swift",
+ "facet": "value.return",
+ "code": "func foo() {\n return 0\n}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "1:11-1:12",
+ "removal": "1:10-1:12"
+ }
+ ],
+ "domain": "1:4-1:12"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/value/value.switch",
+ "languageId": "swift",
+ "facet": "value.switch",
+ "code": "switch value {}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:7-0:12",
+ "removal": "0:7-0:13"
+ }
+ ],
+ "domain": "0:0-0:15"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/value/value.throw",
+ "languageId": "swift",
+ "facet": "value.throw",
+ "code": "func foo() throws {\n throw Error\n}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "1:10-1:15",
+ "removal": "1:9-1:15"
+ }
+ ],
+ "domain": "1:4-1:15"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/value/value.typeAlias",
+ "languageId": "swift",
+ "facet": "value.typeAlias",
+ "code": "typealias Foo = Int",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:16-0:19",
+ "removal": "0:13-0:19"
+ }
+ ],
+ "domain": "0:0-0:19"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/value/value.variable.destructuring",
+ "languageId": "swift",
+ "facet": "value.variable.destructuring",
+ "code": "let (foo, bar) = (0, 1)",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:17-0:23",
+ "removal": "0:14-0:23"
+ }
+ ],
+ "domain": "0:0-0:23"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/value/value.variable",
+ "languageId": "swift",
+ "facet": "value.variable",
+ "code": "var foo = 0",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "0:10-0:11",
+ "removal": "0:7-0:11"
+ }
+ ],
+ "domain": "0:0-0:11"
+ }
+ ]
+ },
+ {
+ "name": "scopes/swift/value/value.yield",
+ "languageId": "swift",
+ "facet": "value.yield",
+ "code": "var foo: Int {\n _read {\n yield 0\n }\n}",
+ "scopes": [
+ {
+ "targets": [
+ {
+ "content": "2:14-2:15",
+ "removal": "2:13-2:15"
+ }
+ ],
+ "domain": "2:8-2:15"
+ }
+ ]
+ },
{
"name": "scopes/talon/value/value.assignment",
"languageId": "talon",
diff --git a/packages/app-web-docs/src/docs/user/scopes/functionCall.mdx b/packages/app-web-docs/src/docs/user/scopes/functionCall.mdx
index 97459f7fac..088dcb7ada 100644
--- a/packages/app-web-docs/src/docs/user/scopes/functionCall.mdx
+++ b/packages/app-web-docs/src/docs/user/scopes/functionCall.mdx
@@ -109,6 +109,10 @@ Default: `call`
+##### Swift
+
+
+
##### Talon
@@ -173,6 +177,10 @@ Default: `call`
+##### Swift
+
+
+
### Function call: Constructor
A constructor call
@@ -217,6 +225,10 @@ Default: `call`
+##### Swift
+
+
+
### Function call: Enum
An enum constructor call
@@ -345,6 +357,10 @@ Default: `call`
+##### Swift
+
+
+
##### Talon
diff --git a/packages/app-web-docs/src/docs/user/scopes/functionCallee.mdx b/packages/app-web-docs/src/docs/user/scopes/functionCallee.mdx
index ec58ebef2f..0c3ac2784b 100644
--- a/packages/app-web-docs/src/docs/user/scopes/functionCallee.mdx
+++ b/packages/app-web-docs/src/docs/user/scopes/functionCallee.mdx
@@ -109,6 +109,10 @@ Default: `callee`
+##### Swift
+
+
+
##### Talon
@@ -173,6 +177,10 @@ Default: `callee`
+##### Swift
+
+
+
### Function callee: Constructor
The class being constructed in a class instantiation, including the `new` keyword.
@@ -217,6 +225,10 @@ Default: `callee`
+##### Swift
+
+
+
### Function callee: Enum
The enum constructor being called
@@ -345,6 +357,10 @@ Default: `callee`
+##### Swift
+
+
+
##### Talon
diff --git a/packages/app-web-docs/src/docs/user/scopes/ifStatement.mdx b/packages/app-web-docs/src/docs/user/scopes/ifStatement.mdx
index 85578983c4..f849b6448c 100644
--- a/packages/app-web-docs/src/docs/user/scopes/ifStatement.mdx
+++ b/packages/app-web-docs/src/docs/user/scopes/ifStatement.mdx
@@ -99,6 +99,10 @@ Default: `if state`
+##### Swift
+
+
+
##### Talon
diff --git a/packages/app-web-docs/src/docs/user/scopes/interior.mdx b/packages/app-web-docs/src/docs/user/scopes/interior.mdx
index 8e477ba797..a02eb4c307 100644
--- a/packages/app-web-docs/src/docs/user/scopes/interior.mdx
+++ b/packages/app-web-docs/src/docs/user/scopes/interior.mdx
@@ -91,6 +91,10 @@ Cursorless ID: `interior`
+##### Swift
+
+
+
### Interior: Command
The body of a command, eg Talon spoken command
@@ -135,6 +139,10 @@ Cursorless ID: `interior`
+##### Swift
+
+
+
### Interior: Do while
The body of a do-while loop
@@ -175,6 +183,10 @@ Cursorless ID: `interior`
+##### Swift
+
+
+
### Interior: Element
The interior/children of an XML/HTML element
@@ -237,6 +249,10 @@ Cursorless ID: `interior`
+##### Swift
+
+
+
##### TypeScript
@@ -351,6 +367,10 @@ Cursorless ID: `interior`
+##### Swift
+
+
+
##### Talon
@@ -431,6 +451,10 @@ Cursorless ID: `interior`
+##### Swift
+
+
+
### Interior: If
The body of an if/elif/else branch
@@ -503,6 +527,16 @@ Cursorless ID: `interior`
+##### Swift
+
+
+
+
+
+
+
+
+
##### Talon
@@ -535,6 +569,10 @@ Cursorless ID: `interior`
+##### Swift
+
+
+
##### TypeScript
@@ -595,6 +633,10 @@ Cursorless ID: `interior`
+##### Swift
+
+
+
### Interior: Method
The body of a method declaration
@@ -651,6 +693,10 @@ Cursorless ID: `interior`
+##### Swift
+
+
+
### Interior: Namespace
The body of a namespace declaration
@@ -767,6 +813,10 @@ Cursorless ID: `interior`
+##### Swift
+
+
+
### Interior: Switch case
The body of a case/default branch in a switch statement
@@ -853,6 +903,10 @@ Cursorless ID: `interior`
+##### Swift
+
+
+
### Interior: Try
The body of a try/catch/finally branch
@@ -903,6 +957,10 @@ Cursorless ID: `interior`
+##### Swift
+
+
+
### Interior: While
The body of a while loop
@@ -965,4 +1023,8 @@ Cursorless ID: `interior`
+##### Swift
+
+
+
diff --git a/packages/app-web-docs/src/docs/user/scopes/list.mdx b/packages/app-web-docs/src/docs/user/scopes/list.mdx
index f840614333..004b220f2c 100644
--- a/packages/app-web-docs/src/docs/user/scopes/list.mdx
+++ b/packages/app-web-docs/src/docs/user/scopes/list.mdx
@@ -127,6 +127,10 @@ Default: `list`
+##### Swift
+
+
+
##### YAML
diff --git a/packages/app-web-docs/src/docs/user/scopes/map.mdx b/packages/app-web-docs/src/docs/user/scopes/map.mdx
index 2882c2f7a4..2eeaed9054 100644
--- a/packages/app-web-docs/src/docs/user/scopes/map.mdx
+++ b/packages/app-web-docs/src/docs/user/scopes/map.mdx
@@ -101,6 +101,10 @@ Default: `map`
+##### Swift
+
+
+
##### YAML
diff --git a/packages/app-web-docs/src/docs/user/scopes/name.mdx b/packages/app-web-docs/src/docs/user/scopes/name.mdx
index eb9fab5fbe..d8aae18862 100644
--- a/packages/app-web-docs/src/docs/user/scopes/name.mdx
+++ b/packages/app-web-docs/src/docs/user/scopes/name.mdx
@@ -63,6 +63,10 @@ Default: `name`
+##### Swift
+
+
+
### Name: Argument catch
Name of a parameter in a catch clause
@@ -103,6 +107,12 @@ Default: `name`
+##### Swift
+
+
+
+
+
### Name: Argument formal
Name of a parameter in a function declaration
@@ -175,6 +185,10 @@ Default: `name`
+##### Swift
+
+
+
##### TypeScript
@@ -227,6 +241,10 @@ Default: `name`
+##### Swift
+
+
+
### Name: Argument formal lambda
Name of a parameter in an anonymous function
@@ -287,6 +305,10 @@ Default: `name`
+##### Swift
+
+
+
### Name: Argument formal method
Name of a parameter in a method declaration
@@ -347,6 +369,10 @@ Default: `name`
+##### Swift
+
+
+
### Name: Assignment
Name (LHS) of an assignment statement
@@ -421,6 +447,10 @@ Default: `name`
+##### Swift
+
+
+
##### Talon
@@ -477,6 +507,10 @@ Default: `name`
+##### Swift
+
+
+
### Name: Assignment destructuring
Name (LHS) of an assignment statement using a destructuring pattern
@@ -497,6 +531,10 @@ Default: `name`
+##### Swift
+
+
+
### Name: Class
Name of a class/struct declaration
@@ -583,6 +621,10 @@ Default: `name`
+##### Swift
+
+
+
##### TypeScript
@@ -647,6 +689,10 @@ Default: `name`
+##### Swift
+
+
+
##### TypeScript
@@ -693,6 +739,10 @@ Default: `name`
+##### Swift
+
+
+
##### TypeScript
@@ -739,6 +789,10 @@ Default: `name`
+##### Swift
+
+
+
##### TypeScript
@@ -799,6 +853,10 @@ Default: `name`
+##### Swift
+
+
+
##### TypeScript
@@ -843,6 +901,10 @@ Default: `name`
+##### Swift
+
+
+
##### TypeScript
@@ -871,6 +933,10 @@ Default: `name`
+##### Swift
+
+
+
##### TypeScript
@@ -943,6 +1009,10 @@ Default: `name`
+##### Swift
+
+
+
##### Talon
@@ -1055,6 +1125,10 @@ Default: `name`
+##### Swift
+
+
+
##### TypeScript
@@ -1087,6 +1161,10 @@ Default: `name`
+##### Swift
+
+
+
##### TypeScript
@@ -1163,6 +1241,10 @@ Default: `name`
+##### Swift
+
+
+
##### TypeScript
@@ -1197,6 +1279,10 @@ Default: `name`
+##### Swift
+
+
+
##### TypeScript
@@ -1277,6 +1363,10 @@ Default: `name`
+##### Swift
+
+
+
##### TypeScript
@@ -1309,6 +1399,10 @@ Default: `name`
+##### Swift
+
+
+
### Name: Variable initialized
Name (LHS) of an initialized variable declaration
@@ -1381,6 +1475,10 @@ Default: `name`
+##### Swift
+
+
+
##### Talon list
@@ -1451,6 +1549,10 @@ Default: `name`
+##### Swift
+
+
+
##### TypeScript
@@ -1609,6 +1711,16 @@ Default: `name`
+##### Swift
+
+
+
+
+
+
+
+
+
##### Talon
@@ -1683,6 +1795,10 @@ Default: `name`
+##### Swift
+
+
+
##### TypeScript
@@ -1763,6 +1879,10 @@ Default: `name`
+##### Swift
+
+
+
##### Talon list
@@ -1811,6 +1931,10 @@ Default: `name`
+##### Swift
+
+
+
##### TypeScript
@@ -1843,6 +1967,10 @@ Default: `name`
+##### Swift
+
+
+
##### TypeScript
@@ -1883,6 +2011,10 @@ Default: `name`
+##### Swift
+
+
+
### Name: Argument formal (iteration)
Iteration scope for names of parameters in a function declaration: the parameter list.
@@ -1949,6 +2081,10 @@ Default: `name`
+##### Swift
+
+
+
### Name: Argument formal constructor (iteration)
Iteration scope for names of parameters in a constructor declaration: the parameter list.
@@ -1991,6 +2127,10 @@ Default: `name`
+##### Swift
+
+
+
### Name: Argument formal lambda (iteration)
Iteration scope for names of parameters in an anonymous function: the parameter list.
@@ -2051,6 +2191,10 @@ Default: `name`
+##### Swift
+
+
+
### Name: Argument formal method (iteration)
Iteration scope for names of parameters in a method declaration: the parameter list.
@@ -2107,4 +2251,8 @@ Default: `name`
+##### Swift
+
+
+
diff --git a/packages/app-web-docs/src/docs/user/scopes/namedFunction.mdx b/packages/app-web-docs/src/docs/user/scopes/namedFunction.mdx
index 38773029e1..31f94a6204 100644
--- a/packages/app-web-docs/src/docs/user/scopes/namedFunction.mdx
+++ b/packages/app-web-docs/src/docs/user/scopes/namedFunction.mdx
@@ -157,6 +157,10 @@ Default: `funk`
+##### Swift
+
+
+
##### TypeScript
@@ -207,6 +211,10 @@ Default: `funk`
+##### Swift
+
+
+
##### TypeScript
@@ -291,6 +299,10 @@ Default: `funk`
+##### Swift
+
+
+
##### TypeScript
@@ -357,6 +369,10 @@ Default: `funk`
+##### Swift
+
+
+
### Named function (iteration document)
Iteration scope for named functions: the entire document including leading and trailing empty lines.
@@ -425,4 +441,8 @@ Default: `funk`
+##### Swift
+
+
+
diff --git a/packages/app-web-docs/src/docs/user/scopes/regularExpression.mdx b/packages/app-web-docs/src/docs/user/scopes/regularExpression.mdx
index 36ff763c89..7395904e03 100644
--- a/packages/app-web-docs/src/docs/user/scopes/regularExpression.mdx
+++ b/packages/app-web-docs/src/docs/user/scopes/regularExpression.mdx
@@ -47,4 +47,8 @@ Default: `regex`
+##### Swift
+
+
+
diff --git a/packages/app-web-docs/src/docs/user/scopes/statement.mdx b/packages/app-web-docs/src/docs/user/scopes/statement.mdx
index 6d1af43396..08c5790736 100644
--- a/packages/app-web-docs/src/docs/user/scopes/statement.mdx
+++ b/packages/app-web-docs/src/docs/user/scopes/statement.mdx
@@ -93,6 +93,10 @@ Default: `state`
+##### Swift
+
+
+
##### Talon
@@ -149,6 +153,10 @@ Default: `state`
+##### Swift
+
+
+
### Statement: Assignment destructuring
An assignment statement using a destructuring pattern
@@ -169,6 +177,10 @@ Default: `state`
+##### Swift
+
+
+
### Statement: Break
A break statement
@@ -229,6 +241,10 @@ Default: `state`
+##### Swift
+
+
+
### Statement: Class
A class/struct declaration
@@ -307,6 +323,10 @@ Default: `state`
+##### Swift
+
+
+
### Statement: Command
A command statement, eg Talon spoken command or bash
@@ -359,6 +379,10 @@ Default: `state`
+##### Swift
+
+
+
### Statement: Constructor
A constructor declaration
@@ -403,6 +427,10 @@ Default: `state`
+##### Swift
+
+
+
### Statement: Continue
A continue statement
@@ -459,6 +487,10 @@ Default: `state`
+##### Swift
+
+
+
### Statement: Do while
A do-while loop
@@ -499,6 +531,10 @@ Default: `state`
+##### Swift
+
+
+
### Statement: Enum
An enum declaration
@@ -539,6 +575,10 @@ Default: `state`
+##### Swift
+
+
+
##### TypeScript
@@ -595,6 +635,10 @@ Default: `state`
+##### Swift
+
+
+
### Statement: Field interface
A field declaration in an interface
@@ -621,6 +665,10 @@ Default: `state`
+##### Swift
+
+
+
##### TypeScript
@@ -731,6 +779,10 @@ Default: `state`
+##### Swift
+
+
+
##### Talon
@@ -843,6 +895,10 @@ Default: `state`
+##### Swift
+
+
+
### Statement: Function call
A function call statement
@@ -919,6 +975,10 @@ Default: `state`
+##### Swift
+
+
+
##### Talon
@@ -989,6 +1049,10 @@ Default: `state`
+##### Swift
+
+
+
##### Talon
@@ -1045,6 +1109,10 @@ Default: `state`
+##### Swift
+
+
+
### Statement: Interface
An interface declaration
@@ -1075,6 +1143,10 @@ Default: `state`
+##### Swift
+
+
+
##### TypeScript
@@ -1159,6 +1231,10 @@ Default: `state`
+##### Swift
+
+
+
### Statement: Method interface
A method declaration in an interface
@@ -1187,6 +1263,10 @@ Default: `state`
+##### Swift
+
+
+
##### TypeScript
@@ -1345,6 +1425,10 @@ Default: `state`
+##### Swift
+
+
+
### Statement: Static
A static initialization block in a class, eg `static { ... }`
@@ -1423,6 +1507,10 @@ Default: `state`
+##### Swift
+
+
+
### Statement: Throw
A throw statement
@@ -1467,6 +1555,10 @@ Default: `state`
+##### Swift
+
+
+
### Statement: Try
A try/catch/finally statement
@@ -1515,6 +1607,10 @@ Default: `state`
+##### Swift
+
+
+
### Statement: Type alias
A type alias declaration
@@ -1551,6 +1647,10 @@ Default: `state`
+##### Swift
+
+
+
##### TypeScript
@@ -1645,6 +1745,10 @@ Default: `state`
+##### Swift
+
+
+
### Statement: Variable initialized
An initialized variable declaration
@@ -1719,6 +1823,10 @@ Default: `state`
+##### Swift
+
+
+
##### Talon list
@@ -1781,6 +1889,10 @@ Default: `state`
+##### Swift
+
+
+
### Statement: While
A while loop
@@ -1843,6 +1955,10 @@ Default: `state`
+##### Swift
+
+
+
### Statement: Yield
A yield statement
@@ -1875,6 +1991,10 @@ Default: `state`
+##### Swift
+
+
+
### Statement (iteration block)
Iteration scope for statements: statement blocks (body of functions/if-statements/for-loops/etc).
@@ -2021,6 +2141,16 @@ Default: `state`
+##### Swift
+
+
+
+
+
+
+
+
+
##### Talon
@@ -2095,6 +2225,10 @@ Default: `state`
+##### Swift
+
+
+
### Statement (iteration document)
Iteration scope for statements: the entire document including leading and trailing empty lines.
@@ -2167,6 +2301,10 @@ Default: `state`
+##### Swift
+
+
+
##### Talon list
@@ -2203,6 +2341,10 @@ Default: `state`
+##### Swift
+
+
+
##### TypeScript
diff --git a/packages/app-web-docs/src/docs/user/scopes/type.mdx b/packages/app-web-docs/src/docs/user/scopes/type.mdx
index ba0e80816f..b220244650 100644
--- a/packages/app-web-docs/src/docs/user/scopes/type.mdx
+++ b/packages/app-web-docs/src/docs/user/scopes/type.mdx
@@ -63,6 +63,10 @@ Default: `type`
+##### Swift
+
+
+
##### TypeScript
@@ -105,6 +109,10 @@ Default: `type`
+##### Swift
+
+
+
##### TypeScript
@@ -153,6 +161,10 @@ Default: `type`
+##### Swift
+
+
+
##### TypeScript
@@ -197,6 +209,10 @@ Default: `type`
+##### Swift
+
+
+
##### TypeScript
@@ -241,6 +257,10 @@ Default: `type`
+##### Swift
+
+
+
##### TypeScript
@@ -291,6 +311,10 @@ Default: `type`
+##### Swift
+
+
+
##### TypeScript
@@ -323,6 +347,10 @@ Default: `type`
+##### Swift
+
+
+
##### TypeScript
@@ -403,6 +431,10 @@ Default: `type`
+##### Swift
+
+
+
##### TypeScript
@@ -453,6 +485,10 @@ Default: `type`
+##### Swift
+
+
+
##### TypeScript
@@ -499,6 +535,10 @@ Default: `type`
+##### Swift
+
+
+
##### TypeScript
@@ -557,6 +597,10 @@ Default: `type`
+##### Swift
+
+
+
##### TypeScript
@@ -585,6 +629,10 @@ Default: `type`
+##### Swift
+
+
+
##### TypeScript
@@ -617,6 +665,10 @@ Default: `type`
+##### Swift
+
+
+
### Type: Interface
An interface declaration
@@ -645,6 +697,10 @@ Default: `type`
+##### Swift
+
+
+
##### TypeScript
@@ -709,6 +765,10 @@ Default: `type`
+##### Swift
+
+
+
##### TypeScript
@@ -737,6 +797,10 @@ Default: `type`
+##### Swift
+
+
+
##### TypeScript
@@ -785,6 +849,10 @@ Default: `type`
+##### Swift
+
+
+
##### TypeScript
@@ -831,6 +899,10 @@ Default: `type`
+##### Swift
+
+
+
##### TypeScript
@@ -879,6 +951,10 @@ Default: `type`
+##### Swift
+
+
+
##### TypeScript
@@ -927,6 +1003,10 @@ Default: `type`
+##### Swift
+
+
+
##### TypeScript
@@ -1019,6 +1099,16 @@ Default: `type`
+##### Swift
+
+
+
+
+
+
+
+
+
##### TypeScript
@@ -1089,6 +1179,10 @@ Default: `type`
+##### Swift
+
+
+
##### TypeScript
@@ -1137,6 +1231,10 @@ Default: `type`
+##### Swift
+
+
+
##### TypeScript
@@ -1165,6 +1263,10 @@ Default: `type`
+##### Swift
+
+
+
##### TypeScript
@@ -1209,6 +1311,10 @@ Default: `type`
+##### Swift
+
+
+
##### TypeScript
@@ -1251,6 +1357,10 @@ Default: `type`
+##### Swift
+
+
+
##### TypeScript
@@ -1295,6 +1405,10 @@ Default: `type`
+##### Swift
+
+
+
##### TypeScript
@@ -1343,6 +1457,10 @@ Default: `type`
+##### Swift
+
+
+
##### TypeScript
@@ -1387,6 +1505,10 @@ Default: `type`
+##### Swift
+
+
+
##### TypeScript
diff --git a/packages/app-web-docs/src/docs/user/scopes/value.mdx b/packages/app-web-docs/src/docs/user/scopes/value.mdx
index 6c395878ed..72d92852ea 100644
--- a/packages/app-web-docs/src/docs/user/scopes/value.mdx
+++ b/packages/app-web-docs/src/docs/user/scopes/value.mdx
@@ -63,6 +63,10 @@ Default: `value`
+##### Swift
+
+
+
### Value: Argument formal
Default value of a parameter in a function declaration
@@ -111,6 +115,10 @@ Default: `value`
+##### Swift
+
+
+
##### TypeScript
@@ -153,6 +161,10 @@ Default: `value`
+##### Swift
+
+
+
### Value: Argument formal lambda
Default value of a parameter in an anonymous function
@@ -229,6 +241,10 @@ Default: `value`
+##### Swift
+
+
+
### Value: Assignment
Value (RHS) of an assignment statement
@@ -309,6 +325,10 @@ Default: `value`
+##### Swift
+
+
+
##### Talon
@@ -369,6 +389,10 @@ Default: `value`
+##### Swift
+
+
+
### Value: Assignment destructuring
Value (RHS) of an assignment statement using a destructuring pattern
@@ -389,6 +413,10 @@ Default: `value`
+##### Swift
+
+
+
### Value: Attribute
Value (RHS) of an attribute, eg in an XML/HTML element
@@ -457,6 +485,10 @@ Default: `value`
+##### Swift
+
+
+
### Value: Field class
Value (RHS) of a field declaration in a class/struct
@@ -499,6 +531,10 @@ Default: `value`
+##### Swift
+
+
+
##### TypeScript
@@ -523,6 +559,10 @@ Default: `value`
+##### Swift
+
+
+
##### TypeScript
@@ -615,6 +655,10 @@ Default: `value`
+##### Swift
+
+
+
##### Talon
@@ -687,6 +731,10 @@ Default: `value`
+##### Swift
+
+
+
##### Talon list
@@ -783,6 +831,10 @@ Default: `value`
+##### Swift
+
+
+
### Value: Return lambda
Implicit return value of an anonymous function
@@ -831,6 +883,10 @@ Default: `value`
+##### Swift
+
+
+
### Value: Switch
Value / subject of a switch statement
@@ -899,6 +955,10 @@ Default: `value`
+##### Swift
+
+
+
### Value: Throw
Value of a throw statement
@@ -943,6 +1003,10 @@ Default: `value`
+##### Swift
+
+
+
### Value: Type alias
Type expression (RHS) of a type alias declaration
@@ -981,6 +1045,10 @@ Default: `value`
+##### Swift
+
+
+
##### TypeScript
@@ -1077,6 +1145,10 @@ Default: `value`
+##### Swift
+
+
+
##### Talon list
@@ -1115,6 +1187,10 @@ Default: `value`
+##### Swift
+
+
+
### Value: Yield
Value of a yield statement
@@ -1147,6 +1223,10 @@ Default: `value`
+##### Swift
+
+
+
### Value (iteration block)
Iteration scope for values: statement blocks (body of functions/if-statements/for-loops/etc).
@@ -1291,6 +1371,16 @@ Default: `value`
+##### Swift
+
+
+
+
+
+
+
+
+
##### Talon
@@ -1359,6 +1449,10 @@ Default: `value`
+##### Swift
+
+
+
##### TypeScript
@@ -1431,6 +1525,10 @@ Default: `value`
+##### Swift
+
+
+
##### Talon list
@@ -1459,6 +1557,10 @@ Default: `value`
+##### Swift
+
+
+
##### TypeScript
@@ -1499,6 +1601,10 @@ Default: `value`
+##### Swift
+
+
+
### Value: Argument formal (iteration)
Iteration scope for default values of parameters in a function declaration: the parameter list.
@@ -1547,6 +1653,10 @@ Default: `value`
+##### Swift
+
+
+
### Value: Argument formal constructor (iteration)
Iteration scope for default values of parameters in a constructor declaration: the parameter list.
@@ -1585,6 +1695,10 @@ Default: `value`
+##### Swift
+
+
+
### Value: Argument formal lambda (iteration)
Iteration scope for default values of parameters in an anonymous function: the parameter list.
@@ -1661,6 +1775,10 @@ Default: `value`
+##### Swift
+
+
+
### Value: Map pair (iteration)
Iteration scope for values of key-value pairs in a map: should be between the braces.
@@ -1725,6 +1843,10 @@ Default: `value`
+##### Swift
+
+
+
##### Talon list
diff --git a/packages/lib-common/src/references/languageReferences.ts b/packages/lib-common/src/references/languageReferences.ts
index c8b6ad64be..d66677d83e 100644
--- a/packages/lib-common/src/references/languageReferences.ts
+++ b/packages/lib-common/src/references/languageReferences.ts
@@ -33,6 +33,7 @@ export type LanguageId =
| "scm"
| "scss"
| "shellscript"
+ | "swift"
| "talon"
| "talon-list"
| "typescript"
@@ -131,6 +132,9 @@ export const languageReferences: Record = {
shellscript: {
name: "Shell Script",
},
+ swift: {
+ name: "Swift",
+ },
talon: {
name: "Talon",
},
diff --git a/packages/lib-common/src/scopeSupportFacets/languageScopeSupport.ts b/packages/lib-common/src/scopeSupportFacets/languageScopeSupport.ts
index fff865031c..88da1193a4 100644
--- a/packages/lib-common/src/scopeSupportFacets/languageScopeSupport.ts
+++ b/packages/lib-common/src/scopeSupportFacets/languageScopeSupport.ts
@@ -28,6 +28,7 @@ import { scmScopeSupport } from "./scm";
import type { LanguageScopeSupportFacetMap } from "./scopeSupportFacets.types";
import { scssScopeSupport } from "./scss";
import { shellscriptScopeSupport } from "./shellscript";
+import { swiftScopeSupport } from "./swift";
import { talonScopeSupport } from "./talon";
import { talonListScopeSupport } from "./talonList";
import { typescriptScopeSupport } from "./typescript";
@@ -70,6 +71,7 @@ export const languageScopeSupport: Record<
scm: scmScopeSupport,
scss: scssScopeSupport,
shellscript: shellscriptScopeSupport,
+ swift: swiftScopeSupport,
"talon-list": talonListScopeSupport,
talon: talonScopeSupport,
typescript: typescriptScopeSupport,
diff --git a/packages/lib-common/src/scopeSupportFacets/swift.ts b/packages/lib-common/src/scopeSupportFacets/swift.ts
new file mode 100644
index 0000000000..6fb2ad1758
--- /dev/null
+++ b/packages/lib-common/src/scopeSupportFacets/swift.ts
@@ -0,0 +1,363 @@
+import type { LanguageScopeSupportFacetMap } from "./scopeSupportFacets.types";
+import { ScopeSupportFacetLevel } from "./scopeSupportFacets.types";
+
+const { supported, unsupported, notApplicable } = ScopeSupportFacetLevel;
+
+export const swiftScopeSupport: LanguageScopeSupportFacetMap = {
+ disqualifyDelimiter: supported,
+ anonymousFunction: supported,
+ list: supported,
+ map: supported,
+ regularExpression: supported,
+
+ "argument.actual.singleLine": supported,
+ "argument.actual.multiLine": supported,
+ "argument.actual.iteration": supported,
+ "argument.actual.method.singleLine": supported,
+ "argument.actual.method.multiLine": supported,
+ "argument.actual.method.iteration": supported,
+ "argument.actual.constructor.singleLine": supported,
+ "argument.actual.constructor.multiLine": supported,
+ "argument.actual.constructor.iteration": supported,
+ "argument.formal.singleLine": supported,
+ "argument.formal.multiLine": supported,
+ "argument.formal.iteration": supported,
+ "argument.formal.method.singleLine": supported,
+ "argument.formal.method.multiLine": supported,
+ "argument.formal.method.iteration": supported,
+ "argument.formal.constructor.singleLine": supported,
+ "argument.formal.constructor.multiLine": supported,
+ "argument.formal.constructor.iteration": supported,
+ "argument.formal.lambda.singleLine": supported,
+ "argument.formal.lambda.multiLine": supported,
+ "argument.formal.lambda.iteration": supported,
+ "argument.formal.catch": supported,
+
+ "argumentList.actual.empty": supported,
+ "argumentList.actual.singleLine": supported,
+ "argumentList.actual.multiLine": supported,
+ "argumentList.actual.method.empty": supported,
+ "argumentList.actual.method.singleLine": supported,
+ "argumentList.actual.method.multiLine": supported,
+ "argumentList.actual.constructor.empty": supported,
+ "argumentList.actual.constructor.singleLine": supported,
+ "argumentList.actual.constructor.multiLine": supported,
+ "argumentList.formal.empty": supported,
+ "argumentList.formal.singleLine": supported,
+ "argumentList.formal.multiLine": supported,
+ "argumentList.formal.method.empty": supported,
+ "argumentList.formal.method.singleLine": supported,
+ "argumentList.formal.method.multiLine": supported,
+ "argumentList.formal.constructor.empty": supported,
+ "argumentList.formal.constructor.singleLine": supported,
+ "argumentList.formal.constructor.multiLine": supported,
+ "argumentList.formal.lambda.empty": supported,
+ "argumentList.formal.lambda.singleLine": supported,
+ "argumentList.formal.lambda.multiLine": supported,
+
+ "branch.if": supported,
+ "branch.if.elif.else": supported,
+ "branch.if.else": supported,
+ "branch.if.iteration": supported,
+ "branch.try": supported,
+ "branch.try.iteration": supported,
+ "branch.switchCase": supported,
+ "branch.switchCase.iteration": supported,
+ "branch.ternary": supported,
+ "branch.ternary.iteration": supported,
+
+ class: supported,
+ "class.iteration.document": supported,
+ "class.iteration.class": supported,
+
+ "comment.line": supported,
+ "comment.block": supported,
+
+ "condition.if": supported,
+ "condition.while": supported,
+ "condition.doWhile": supported,
+ "condition.ternary": supported,
+ "condition.switchCase": supported,
+ "condition.switchCase.iteration": supported,
+
+ functionCall: supported,
+ "functionCall.constructor": supported,
+ "functionCall.method": supported,
+ "functionCall.chain": supported,
+
+ functionCallee: supported,
+ "functionCallee.constructor": supported,
+ "functionCallee.method": supported,
+ "functionCallee.chain": supported,
+
+ namedFunction: supported,
+ "namedFunction.constructor": supported,
+ "namedFunction.method": supported,
+ "namedFunction.iteration.document": supported,
+ "namedFunction.iteration.class": supported,
+
+ ifStatement: supported,
+
+ "statement.class": supported,
+ "statement.interface": supported,
+ "statement.enum": supported,
+ "statement.field.class": supported,
+ "statement.field.interface": supported,
+ "statement.function": supported,
+ "statement.constructor": supported,
+ "statement.method": supported,
+ "statement.method.interface": supported,
+ "statement.functionCall": supported,
+ "statement.if": supported,
+ "statement.try": supported,
+ "statement.switch": supported,
+ "statement.foreach": supported,
+ "statement.while": supported,
+ "statement.doWhile": supported,
+ "statement.variable.uninitialized": supported,
+ "statement.variable.initialized": supported,
+ "statement.variable.destructuring": supported,
+ "statement.constant": supported,
+ "statement.assignment": supported,
+ "statement.assignment.destructuring": supported,
+ "statement.assignment.compound": supported,
+ "statement.typeAlias": supported,
+ "statement.return": supported,
+ "statement.throw": supported,
+ "statement.break": supported,
+ "statement.continue": supported,
+ "statement.import": supported,
+ "statement.yield": supported,
+ "statement.iteration.document": supported,
+ "statement.iteration.class": supported,
+ "statement.iteration.interface": supported,
+ "statement.iteration.block": supported,
+
+ "string.singleLine": supported,
+ "string.multiLine": supported,
+
+ "textFragment.comment.line": supported,
+ "textFragment.comment.block": supported,
+ "textFragment.string.singleLine": supported,
+ "textFragment.string.multiLine": supported,
+ "textFragment.regularExpression": supported,
+
+ "name.variable.uninitialized": supported,
+ "name.variable.initialized": supported,
+ "name.variable.destructuring": supported,
+ "name.constant": supported,
+ "name.assignment": supported,
+ "name.assignment.destructuring": supported,
+ "name.assignment.compound": supported,
+ "name.typeAlias": supported,
+ "name.foreach": supported,
+ "name.function": supported,
+ "name.method": supported,
+ "name.method.interface": supported,
+ "name.constructor": supported,
+ "name.class": supported,
+ "name.interface": supported,
+ "name.enum": supported,
+ "name.field.class": supported,
+ "name.field.interface": supported,
+ "name.field.enum": supported,
+ "name.argument.actual": supported,
+ "name.argument.actual.iteration": supported,
+ "name.argument.formal": supported,
+ "name.argument.formal.iteration": supported,
+ "name.argument.formal.method": supported,
+ "name.argument.formal.method.iteration": supported,
+ "name.argument.formal.lambda": supported,
+ "name.argument.formal.lambda.iteration": supported,
+ "name.argument.formal.constructor": supported,
+ "name.argument.formal.constructor.iteration": supported,
+ "name.argument.catch": supported,
+ "name.iteration.document": supported,
+ "name.iteration.class": supported,
+ "name.iteration.block": supported,
+ "name.iteration.interface": supported,
+ "name.iteration.enum": supported,
+
+ "key.mapPair": supported,
+ "key.mapPair.iteration": supported,
+
+ "value.variable": supported,
+ "value.variable.destructuring": supported,
+ "value.constant": supported,
+ "value.assignment": supported,
+ "value.assignment.destructuring": supported,
+ "value.assignment.compound": supported,
+ "value.mapPair": supported,
+ "value.mapPair.iteration": supported,
+ "value.foreach": supported,
+ "value.return": supported,
+ "value.return.lambda": supported,
+ "value.field.class": supported,
+ "value.field.enum": supported,
+ "value.throw": supported,
+ "value.yield": supported,
+ "value.switch": supported,
+ "value.typeAlias": supported,
+ "value.argument.actual": supported,
+ "value.argument.actual.iteration": supported,
+ "value.argument.formal": supported,
+ "value.argument.formal.iteration": supported,
+ "value.argument.formal.method": supported,
+ "value.argument.formal.method.iteration": supported,
+ "value.argument.formal.constructor": supported,
+ "value.argument.formal.constructor.iteration": supported,
+ "value.iteration.block": supported,
+ "value.iteration.class": supported,
+ "value.iteration.enum": supported,
+ "value.iteration.document": supported,
+
+ "type.variable.uninitialized": supported,
+ "type.variable.initialized": supported,
+ "type.constant": supported,
+ "type.return": supported,
+ "type.return.method": supported,
+ "type.return.lambda": supported,
+ "type.field.class": supported,
+ "type.field.interface": supported,
+ "type.foreach": supported,
+ "type.alias": supported,
+ "type.cast": supported,
+ "type.class": supported,
+ "type.interface": supported,
+ "type.enum": supported,
+ "type.typeArgument": supported,
+ "type.typeArgument.iteration": supported,
+ "type.argument.formal": supported,
+ "type.argument.formal.iteration": supported,
+ "type.argument.formal.method": supported,
+ "type.argument.formal.method.iteration": supported,
+ "type.argument.formal.lambda": supported,
+ "type.argument.formal.lambda.iteration": supported,
+ "type.argument.formal.constructor": supported,
+ "type.argument.formal.constructor.iteration": supported,
+ "type.argument.catch": supported,
+ "type.iteration.block": supported,
+ "type.iteration.class": supported,
+ "type.iteration.interface": supported,
+ "type.iteration.document": supported,
+
+ "interior.class": supported,
+ "interior.interface": supported,
+ "interior.enum": supported,
+ "interior.function": supported,
+ "interior.constructor": supported,
+ "interior.method": supported,
+ "interior.lambda": supported,
+ "interior.if": supported,
+ "interior.try": supported,
+ "interior.switch": supported,
+ "interior.switchCase": supported,
+ "interior.foreach": supported,
+ "interior.while": supported,
+ "interior.doWhile": supported,
+
+ /* UNSUPPORTED */
+
+ fieldAccess: unsupported,
+
+ /* NOT APPLICABLE */
+
+ // 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,
+ "statement.command": notApplicable,
+ "name.command": notApplicable,
+ "value.command": notApplicable,
+ "interior.command": notApplicable,
+
+ // Notebook cell
+ notebookCell: notApplicable,
+ "interior.cell": notApplicable,
+
+ // Resource syntax
+ "statement.resource": notApplicable,
+ "name.resource": notApplicable,
+ "value.resource": notApplicable,
+ "type.resource": notApplicable,
+ "interior.resource": notApplicable,
+
+ // Namespace
+ "statement.namespace": notApplicable,
+ "name.namespace": notApplicable,
+ "interior.namespace": notApplicable,
+
+ // Loop else branch
+ "branch.loop": notApplicable,
+ "branch.loop.iteration": notApplicable,
+
+ // C-style for loop
+ "statement.for": notApplicable,
+ "condition.for": notApplicable,
+ "interior.for": notApplicable,
+
+ // Generic function call
+ "functionCall.generic": notApplicable,
+ "functionCallee.generic": notApplicable,
+
+ // Static initialization block
+ "statement.static": notApplicable,
+ "interior.static": notApplicable,
+
+ // Default argument value in closures
+ "value.argument.formal.lambda": notApplicable,
+ "value.argument.formal.lambda.iteration": notApplicable,
+
+ // Document
+ chapter: notApplicable,
+ subSection: notApplicable,
+ subSubSection: notApplicable,
+ sectionLevelOne: notApplicable,
+ sectionLevelTwo: notApplicable,
+ sectionLevelThree: notApplicable,
+ sectionLevelFour: notApplicable,
+ sectionLevelFive: notApplicable,
+ sectionLevelSix: notApplicable,
+ namedParagraph: notApplicable,
+ subParagraph: notApplicable,
+ part: notApplicable,
+
+ // Enum function calls
+ "functionCall.enum": notApplicable,
+ "functionCallee.enum": notApplicable,
+ "argument.actual.enum.singleLine": notApplicable,
+ "argument.actual.enum.multiLine": notApplicable,
+ "argument.actual.enum.iteration": notApplicable,
+ "argumentList.actual.enum.empty": notApplicable,
+ "argumentList.actual.enum.singleLine": notApplicable,
+ "argumentList.actual.enum.multiLine": notApplicable,
+
+ // Collection items unenclosed
+ "collectionItem.unenclosed.singleLine": notApplicable,
+ "collectionItem.unenclosed.multiLine": notApplicable,
+ "collectionItem.unenclosed.iteration": notApplicable,
+
+ // Miscellaneous
+ "statement.misc": notApplicable,
+ "statement.package": notApplicable,
+ "statement.update": notApplicable,
+ "value.field.interface": notApplicable,
+ pairDelimiter: notApplicable,
+ environment: notApplicable,
+ selector: notApplicable,
+ unit: notApplicable,
+};
diff --git a/resources/fixtures/scopes/swift/anonymousFunction.scope b/resources/fixtures/scopes/swift/anonymousFunction.scope
new file mode 100644
index 0000000000..82f6888319
--- /dev/null
+++ b/resources/fixtures/scopes/swift/anonymousFunction.scope
@@ -0,0 +1,10 @@
+{ () in 0 }
+---
+
+[Content] =
+[Removal] =
+[Domain] = 0:0-0:11
+ >-----------<
+0| { () in 0 }
+
+[Insertion delimiter] = "\n"
diff --git a/resources/fixtures/scopes/swift/argument/argument.actual.constructor.iteration.scope b/resources/fixtures/scopes/swift/argument/argument.actual.constructor.iteration.scope
new file mode 100644
index 0000000000..69ff7aa216
--- /dev/null
+++ b/resources/fixtures/scopes/swift/argument/argument.actual.constructor.iteration.scope
@@ -0,0 +1,10 @@
+Foo(aaa, bbb)
+---
+
+[Content] = 0:4-0:12
+ >--------<
+0| Foo(aaa, bbb)
+
+[Domain] = 0:0-0:13
+ >-------------<
+0| Foo(aaa, bbb)
diff --git a/resources/fixtures/scopes/swift/argument/argument.actual.constructor.multiLine.scope b/resources/fixtures/scopes/swift/argument/argument.actual.constructor.multiLine.scope
new file mode 100644
index 0000000000..cc80c0d324
--- /dev/null
+++ b/resources/fixtures/scopes/swift/argument/argument.actual.constructor.multiLine.scope
@@ -0,0 +1,44 @@
+Foo(
+ aaa,
+ bbb
+)
+---
+
+[#1 Content] =
+[#1 Domain] = 1:4-1:7
+ >---<
+1| aaa,
+
+[#1 Removal] = 1:4-2:4
+ >----
+1| aaa,
+2| bbb
+ ----<
+
+[#1 Trailing delimiter] = 1:7-2:4
+ >-
+1| aaa,
+2| bbb
+ ----<
+
+[#1 Insertion delimiter] = ",\n"
+
+
+[#2 Content] =
+[#2 Domain] = 2:4-2:7
+ >---<
+2| bbb
+
+[#2 Removal] = 1:7-2:7
+ >-
+1| aaa,
+2| bbb
+ -------<
+
+[#2 Leading delimiter] = 1:7-2:4
+ >-
+1| aaa,
+2| bbb
+ ----<
+
+[#2 Insertion delimiter] = ",\n"
diff --git a/resources/fixtures/scopes/swift/argument/argument.actual.constructor.singleLine.scope b/resources/fixtures/scopes/swift/argument/argument.actual.constructor.singleLine.scope
new file mode 100644
index 0000000000..6adf6fe178
--- /dev/null
+++ b/resources/fixtures/scopes/swift/argument/argument.actual.constructor.singleLine.scope
@@ -0,0 +1,33 @@
+Foo(aaa, bbb)
+---
+
+[#1 Content] =
+[#1 Domain] = 0:4-0:7
+ >---<
+0| Foo(aaa, bbb)
+
+[#1 Removal] = 0:4-0:9
+ >-----<
+0| Foo(aaa, bbb)
+
+[#1 Trailing delimiter] = 0:7-0:9
+ >--<
+0| Foo(aaa, bbb)
+
+[#1 Insertion delimiter] = ", "
+
+
+[#2 Content] =
+[#2 Domain] = 0:9-0:12
+ >---<
+0| Foo(aaa, bbb)
+
+[#2 Removal] = 0:7-0:12
+ >-----<
+0| Foo(aaa, bbb)
+
+[#2 Leading delimiter] = 0:7-0:9
+ >--<
+0| Foo(aaa, bbb)
+
+[#2 Insertion delimiter] = ", "
diff --git a/resources/fixtures/scopes/swift/argument/argument.actual.iteration.scope b/resources/fixtures/scopes/swift/argument/argument.actual.iteration.scope
new file mode 100644
index 0000000000..1b28526f67
--- /dev/null
+++ b/resources/fixtures/scopes/swift/argument/argument.actual.iteration.scope
@@ -0,0 +1,10 @@
+foo(aaa, bbb)
+---
+
+[Content] = 0:4-0:12
+ >--------<
+0| foo(aaa, bbb)
+
+[Domain] = 0:0-0:13
+ >-------------<
+0| foo(aaa, bbb)
diff --git a/resources/fixtures/scopes/swift/argument/argument.actual.method.iteration.scope b/resources/fixtures/scopes/swift/argument/argument.actual.method.iteration.scope
new file mode 100644
index 0000000000..8b3899b4a1
--- /dev/null
+++ b/resources/fixtures/scopes/swift/argument/argument.actual.method.iteration.scope
@@ -0,0 +1,10 @@
+foo.bar(aaa, bbb)
+---
+
+[Content] = 0:8-0:16
+ >--------<
+0| foo.bar(aaa, bbb)
+
+[Domain] = 0:0-0:17
+ >-----------------<
+0| foo.bar(aaa, bbb)
diff --git a/resources/fixtures/scopes/swift/argument/argument.actual.method.multiLine.scope b/resources/fixtures/scopes/swift/argument/argument.actual.method.multiLine.scope
new file mode 100644
index 0000000000..7dace79cea
--- /dev/null
+++ b/resources/fixtures/scopes/swift/argument/argument.actual.method.multiLine.scope
@@ -0,0 +1,44 @@
+foo.bar(
+ aaa,
+ bbb
+)
+---
+
+[#1 Content] =
+[#1 Domain] = 1:4-1:7
+ >---<
+1| aaa,
+
+[#1 Removal] = 1:4-2:4
+ >----
+1| aaa,
+2| bbb
+ ----<
+
+[#1 Trailing delimiter] = 1:7-2:4
+ >-
+1| aaa,
+2| bbb
+ ----<
+
+[#1 Insertion delimiter] = ",\n"
+
+
+[#2 Content] =
+[#2 Domain] = 2:4-2:7
+ >---<
+2| bbb
+
+[#2 Removal] = 1:7-2:7
+ >-
+1| aaa,
+2| bbb
+ -------<
+
+[#2 Leading delimiter] = 1:7-2:4
+ >-
+1| aaa,
+2| bbb
+ ----<
+
+[#2 Insertion delimiter] = ",\n"
diff --git a/resources/fixtures/scopes/swift/argument/argument.actual.method.singleLine.scope b/resources/fixtures/scopes/swift/argument/argument.actual.method.singleLine.scope
new file mode 100644
index 0000000000..d22bd33706
--- /dev/null
+++ b/resources/fixtures/scopes/swift/argument/argument.actual.method.singleLine.scope
@@ -0,0 +1,33 @@
+foo.bar(aaa, bbb)
+---
+
+[#1 Content] =
+[#1 Domain] = 0:8-0:11
+ >---<
+0| foo.bar(aaa, bbb)
+
+[#1 Removal] = 0:8-0:13
+ >-----<
+0| foo.bar(aaa, bbb)
+
+[#1 Trailing delimiter] = 0:11-0:13
+ >--<
+0| foo.bar(aaa, bbb)
+
+[#1 Insertion delimiter] = ", "
+
+
+[#2 Content] =
+[#2 Domain] = 0:13-0:16
+ >---<
+0| foo.bar(aaa, bbb)
+
+[#2 Removal] = 0:11-0:16
+ >-----<
+0| foo.bar(aaa, bbb)
+
+[#2 Leading delimiter] = 0:11-0:13
+ >--<
+0| foo.bar(aaa, bbb)
+
+[#2 Insertion delimiter] = ", "
diff --git a/resources/fixtures/scopes/swift/argument/argument.actual.multiLine.scope b/resources/fixtures/scopes/swift/argument/argument.actual.multiLine.scope
new file mode 100644
index 0000000000..5ad321caa7
--- /dev/null
+++ b/resources/fixtures/scopes/swift/argument/argument.actual.multiLine.scope
@@ -0,0 +1,44 @@
+foo(
+ aaa,
+ bbb
+)
+---
+
+[#1 Content] =
+[#1 Domain] = 1:4-1:7
+ >---<
+1| aaa,
+
+[#1 Removal] = 1:4-2:4
+ >----
+1| aaa,
+2| bbb
+ ----<
+
+[#1 Trailing delimiter] = 1:7-2:4
+ >-
+1| aaa,
+2| bbb
+ ----<
+
+[#1 Insertion delimiter] = ",\n"
+
+
+[#2 Content] =
+[#2 Domain] = 2:4-2:7
+ >---<
+2| bbb
+
+[#2 Removal] = 1:7-2:7
+ >-
+1| aaa,
+2| bbb
+ -------<
+
+[#2 Leading delimiter] = 1:7-2:4
+ >-
+1| aaa,
+2| bbb
+ ----<
+
+[#2 Insertion delimiter] = ",\n"
diff --git a/resources/fixtures/scopes/swift/argument/argument.actual.singleLine.scope b/resources/fixtures/scopes/swift/argument/argument.actual.singleLine.scope
new file mode 100644
index 0000000000..b1a9403ff3
--- /dev/null
+++ b/resources/fixtures/scopes/swift/argument/argument.actual.singleLine.scope
@@ -0,0 +1,33 @@
+foo(aaa, bbb)
+---
+
+[#1 Content] =
+[#1 Domain] = 0:4-0:7
+ >---<
+0| foo(aaa, bbb)
+
+[#1 Removal] = 0:4-0:9
+ >-----<
+0| foo(aaa, bbb)
+
+[#1 Trailing delimiter] = 0:7-0:9
+ >--<
+0| foo(aaa, bbb)
+
+[#1 Insertion delimiter] = ", "
+
+
+[#2 Content] =
+[#2 Domain] = 0:9-0:12
+ >---<
+0| foo(aaa, bbb)
+
+[#2 Removal] = 0:7-0:12
+ >-----<
+0| foo(aaa, bbb)
+
+[#2 Leading delimiter] = 0:7-0:9
+ >--<
+0| foo(aaa, bbb)
+
+[#2 Insertion delimiter] = ", "
diff --git a/resources/fixtures/scopes/swift/argument/argument.formal.catch.scope b/resources/fixtures/scopes/swift/argument/argument.formal.catch.scope
new file mode 100644
index 0000000000..b9a00b5fa8
--- /dev/null
+++ b/resources/fixtures/scopes/swift/argument/argument.formal.catch.scope
@@ -0,0 +1,22 @@
+do {}
+catch let e as Error {}
+---
+
+[Content] =
+[Domain] = 1:6-1:20
+ >--------------<
+1| catch let e as Error {}
+
+[Removal] = 1:6-1:21
+ >---------------<
+1| catch let e as Error {}
+
+[Leading delimiter] = 1:5-1:6
+ >-<
+1| catch let e as Error {}
+
+[Trailing delimiter] = 1:20-1:21
+ >-<
+1| catch let e as Error {}
+
+[Insertion delimiter] = " "
diff --git a/resources/fixtures/scopes/swift/argument/argument.formal.catch2.scope b/resources/fixtures/scopes/swift/argument/argument.formal.catch2.scope
new file mode 100644
index 0000000000..a406d2289e
--- /dev/null
+++ b/resources/fixtures/scopes/swift/argument/argument.formal.catch2.scope
@@ -0,0 +1,22 @@
+do {}
+catch let e {}
+---
+
+[Content] =
+[Domain] = 1:6-1:11
+ >-----<
+1| catch let e {}
+
+[Removal] = 1:6-1:12
+ >------<
+1| catch let e {}
+
+[Leading delimiter] = 1:5-1:6
+ >-<
+1| catch let e {}
+
+[Trailing delimiter] = 1:11-1:12
+ >-<
+1| catch let e {}
+
+[Insertion delimiter] = " "
diff --git a/resources/fixtures/scopes/swift/argument/argument.formal.constructor.iteration.scope b/resources/fixtures/scopes/swift/argument/argument.formal.constructor.iteration.scope
new file mode 100644
index 0000000000..120b2abb23
--- /dev/null
+++ b/resources/fixtures/scopes/swift/argument/argument.formal.constructor.iteration.scope
@@ -0,0 +1,12 @@
+struct Foo {
+ init(aaa: Int, bbb: Int) {}
+}
+---
+
+[Content] = 1:7-1:25
+ >------------------<
+1| init(aaa: Int, bbb: Int) {}
+
+[Domain] = 1:2-1:29
+ >---------------------------<
+1| init(aaa: Int, bbb: Int) {}
diff --git a/resources/fixtures/scopes/swift/argument/argument.formal.constructor.multiLine.scope b/resources/fixtures/scopes/swift/argument/argument.formal.constructor.multiLine.scope
new file mode 100644
index 0000000000..d0b32239c2
--- /dev/null
+++ b/resources/fixtures/scopes/swift/argument/argument.formal.constructor.multiLine.scope
@@ -0,0 +1,46 @@
+struct Foo {
+ init(
+ aaa: Int,
+ bbb: Int
+ ) {}
+}
+---
+
+[#1 Content] =
+[#1 Domain] = 2:8-2:16
+ >--------<
+2| aaa: Int,
+
+[#1 Removal] = 2:8-3:8
+ >---------
+2| aaa: Int,
+3| bbb: Int
+ --------<
+
+[#1 Trailing delimiter] = 2:16-3:8
+ >-
+2| aaa: Int,
+3| bbb: Int
+ --------<
+
+[#1 Insertion delimiter] = ",\n"
+
+
+[#2 Content] =
+[#2 Domain] = 3:8-3:16
+ >--------<
+3| bbb: Int
+
+[#2 Removal] = 2:16-3:16
+ >-
+2| aaa: Int,
+3| bbb: Int
+ ----------------<
+
+[#2 Leading delimiter] = 2:16-3:8
+ >-
+2| aaa: Int,
+3| bbb: Int
+ --------<
+
+[#2 Insertion delimiter] = ",\n"
diff --git a/resources/fixtures/scopes/swift/argument/argument.formal.constructor.singleLine.scope b/resources/fixtures/scopes/swift/argument/argument.formal.constructor.singleLine.scope
new file mode 100644
index 0000000000..9e9341d4f3
--- /dev/null
+++ b/resources/fixtures/scopes/swift/argument/argument.formal.constructor.singleLine.scope
@@ -0,0 +1,35 @@
+struct Foo {
+ init(aaa: Int, bbb: Int) {}
+}
+---
+
+[#1 Content] =
+[#1 Domain] = 1:9-1:17
+ >--------<
+1| init(aaa: Int, bbb: Int) {}
+
+[#1 Removal] = 1:9-1:19
+ >----------<
+1| init(aaa: Int, bbb: Int) {}
+
+[#1 Trailing delimiter] = 1:17-1:19
+ >--<
+1| init(aaa: Int, bbb: Int) {}
+
+[#1 Insertion delimiter] = ", "
+
+
+[#2 Content] =
+[#2 Domain] = 1:19-1:27
+ >--------<
+1| init(aaa: Int, bbb: Int) {}
+
+[#2 Removal] = 1:17-1:27
+ >----------<
+1| init(aaa: Int, bbb: Int) {}
+
+[#2 Leading delimiter] = 1:17-1:19
+ >--<
+1| init(aaa: Int, bbb: Int) {}
+
+[#2 Insertion delimiter] = ", "
diff --git a/resources/fixtures/scopes/swift/argument/argument.formal.iteration.scope b/resources/fixtures/scopes/swift/argument/argument.formal.iteration.scope
new file mode 100644
index 0000000000..c4b5788708
--- /dev/null
+++ b/resources/fixtures/scopes/swift/argument/argument.formal.iteration.scope
@@ -0,0 +1,10 @@
+func foo(aaa: Int, bbb: Int) {}
+---
+
+[Content] = 0:9-0:27
+ >------------------<
+0| func foo(aaa: Int, bbb: Int) {}
+
+[Domain] = 0:0-0:31
+ >-------------------------------<
+0| func foo(aaa: Int, bbb: Int) {}
diff --git a/resources/fixtures/scopes/swift/argument/argument.formal.lambda.iteration.scope b/resources/fixtures/scopes/swift/argument/argument.formal.lambda.iteration.scope
new file mode 100644
index 0000000000..ba4c8fc6eb
--- /dev/null
+++ b/resources/fixtures/scopes/swift/argument/argument.formal.lambda.iteration.scope
@@ -0,0 +1,10 @@
+{ (aaa, bbb: Int) in }
+---
+
+[Content] = 0:3-0:16
+ >-------------<
+0| { (aaa, bbb: Int) in }
+
+[Domain] = 0:0-0:22
+ >----------------------<
+0| { (aaa, bbb: Int) in }
diff --git a/resources/fixtures/scopes/swift/argument/argument.formal.lambda.multiLine.scope b/resources/fixtures/scopes/swift/argument/argument.formal.lambda.multiLine.scope
new file mode 100644
index 0000000000..0b3f88bfdb
--- /dev/null
+++ b/resources/fixtures/scopes/swift/argument/argument.formal.lambda.multiLine.scope
@@ -0,0 +1,44 @@
+{ (
+ aaa,
+ bbb: Int
+) in }
+---
+
+[#1 Content] =
+[#1 Domain] = 1:4-1:7
+ >---<
+1| aaa,
+
+[#1 Removal] = 1:4-2:4
+ >----
+1| aaa,
+2| bbb: Int
+ ----<
+
+[#1 Trailing delimiter] = 1:7-2:4
+ >-
+1| aaa,
+2| bbb: Int
+ ----<
+
+[#1 Insertion delimiter] = ",\n"
+
+
+[#2 Content] =
+[#2 Domain] = 2:4-2:12
+ >--------<
+2| bbb: Int
+
+[#2 Removal] = 1:7-2:12
+ >-
+1| aaa,
+2| bbb: Int
+ ------------<
+
+[#2 Leading delimiter] = 1:7-2:4
+ >-
+1| aaa,
+2| bbb: Int
+ ----<
+
+[#2 Insertion delimiter] = ",\n"
diff --git a/resources/fixtures/scopes/swift/argument/argument.formal.lambda.singleLine.scope b/resources/fixtures/scopes/swift/argument/argument.formal.lambda.singleLine.scope
new file mode 100644
index 0000000000..24a5d498b5
--- /dev/null
+++ b/resources/fixtures/scopes/swift/argument/argument.formal.lambda.singleLine.scope
@@ -0,0 +1,33 @@
+{ (aaa, bbb: Int) in }
+---
+
+[#1 Content] =
+[#1 Domain] = 0:3-0:6
+ >---<
+0| { (aaa, bbb: Int) in }
+
+[#1 Removal] = 0:3-0:8
+ >-----<
+0| { (aaa, bbb: Int) in }
+
+[#1 Trailing delimiter] = 0:6-0:8
+ >--<
+0| { (aaa, bbb: Int) in }
+
+[#1 Insertion delimiter] = ", "
+
+
+[#2 Content] =
+[#2 Domain] = 0:8-0:16
+ >--------<
+0| { (aaa, bbb: Int) in }
+
+[#2 Removal] = 0:6-0:16
+ >----------<
+0| { (aaa, bbb: Int) in }
+
+[#2 Leading delimiter] = 0:6-0:8
+ >--<
+0| { (aaa, bbb: Int) in }
+
+[#2 Insertion delimiter] = ", "
diff --git a/resources/fixtures/scopes/swift/argument/argument.formal.method.iteration.scope b/resources/fixtures/scopes/swift/argument/argument.formal.method.iteration.scope
new file mode 100644
index 0000000000..77e684a869
--- /dev/null
+++ b/resources/fixtures/scopes/swift/argument/argument.formal.method.iteration.scope
@@ -0,0 +1,12 @@
+struct Foo {
+ func bar(aaa: Int, bbb: Int) {}
+}
+---
+
+[Content] = 1:13-1:31
+ >------------------<
+1| func bar(aaa: Int, bbb: Int) {}
+
+[Domain] = 1:4-1:35
+ >-------------------------------<
+1| func bar(aaa: Int, bbb: Int) {}
diff --git a/resources/fixtures/scopes/swift/argument/argument.formal.method.multiLine.scope b/resources/fixtures/scopes/swift/argument/argument.formal.method.multiLine.scope
new file mode 100644
index 0000000000..8cc3f68c9e
--- /dev/null
+++ b/resources/fixtures/scopes/swift/argument/argument.formal.method.multiLine.scope
@@ -0,0 +1,46 @@
+struct Foo {
+ func bar(
+ aaa: Int,
+ bbb: Int
+ ) {}
+}
+---
+
+[#1 Content] =
+[#1 Domain] = 2:8-2:16
+ >--------<
+2| aaa: Int,
+
+[#1 Removal] = 2:8-3:8
+ >---------
+2| aaa: Int,
+3| bbb: Int
+ --------<
+
+[#1 Trailing delimiter] = 2:16-3:8
+ >-
+2| aaa: Int,
+3| bbb: Int
+ --------<
+
+[#1 Insertion delimiter] = ",\n"
+
+
+[#2 Content] =
+[#2 Domain] = 3:8-3:16
+ >--------<
+3| bbb: Int
+
+[#2 Removal] = 2:16-3:16
+ >-
+2| aaa: Int,
+3| bbb: Int
+ ----------------<
+
+[#2 Leading delimiter] = 2:16-3:8
+ >-
+2| aaa: Int,
+3| bbb: Int
+ --------<
+
+[#2 Insertion delimiter] = ",\n"
diff --git a/resources/fixtures/scopes/swift/argument/argument.formal.method.singleLine.scope b/resources/fixtures/scopes/swift/argument/argument.formal.method.singleLine.scope
new file mode 100644
index 0000000000..169def17d3
--- /dev/null
+++ b/resources/fixtures/scopes/swift/argument/argument.formal.method.singleLine.scope
@@ -0,0 +1,35 @@
+struct Foo {
+ func bar(aaa: Int, bbb: Int) {}
+}
+---
+
+[#1 Content] =
+[#1 Domain] = 1:13-1:21
+ >--------<
+1| func bar(aaa: Int, bbb: Int) {}
+
+[#1 Removal] = 1:13-1:23
+ >----------<
+1| func bar(aaa: Int, bbb: Int) {}
+
+[#1 Trailing delimiter] = 1:21-1:23
+ >--<
+1| func bar(aaa: Int, bbb: Int) {}
+
+[#1 Insertion delimiter] = ", "
+
+
+[#2 Content] =
+[#2 Domain] = 1:23-1:31
+ >--------<
+1| func bar(aaa: Int, bbb: Int) {}
+
+[#2 Removal] = 1:21-1:31
+ >----------<
+1| func bar(aaa: Int, bbb: Int) {}
+
+[#2 Leading delimiter] = 1:21-1:23
+ >--<
+1| func bar(aaa: Int, bbb: Int) {}
+
+[#2 Insertion delimiter] = ", "
diff --git a/resources/fixtures/scopes/swift/argument/argument.formal.multiLine.scope b/resources/fixtures/scopes/swift/argument/argument.formal.multiLine.scope
new file mode 100644
index 0000000000..d17c916046
--- /dev/null
+++ b/resources/fixtures/scopes/swift/argument/argument.formal.multiLine.scope
@@ -0,0 +1,44 @@
+func foo(
+ aaa: Int,
+ bbb: Int
+) {}
+---
+
+[#1 Content] =
+[#1 Domain] = 1:4-1:12
+ >--------<
+1| aaa: Int,
+
+[#1 Removal] = 1:4-2:4
+ >---------
+1| aaa: Int,
+2| bbb: Int
+ ----<
+
+[#1 Trailing delimiter] = 1:12-2:4
+ >-
+1| aaa: Int,
+2| bbb: Int
+ ----<
+
+[#1 Insertion delimiter] = ",\n"
+
+
+[#2 Content] =
+[#2 Domain] = 2:4-2:12
+ >--------<
+2| bbb: Int
+
+[#2 Removal] = 1:12-2:12
+ >-
+1| aaa: Int,
+2| bbb: Int
+ ------------<
+
+[#2 Leading delimiter] = 1:12-2:4
+ >-
+1| aaa: Int,
+2| bbb: Int
+ ----<
+
+[#2 Insertion delimiter] = ",\n"
diff --git a/resources/fixtures/scopes/swift/argument/argument.formal.singleLine.scope b/resources/fixtures/scopes/swift/argument/argument.formal.singleLine.scope
new file mode 100644
index 0000000000..ab20d56007
--- /dev/null
+++ b/resources/fixtures/scopes/swift/argument/argument.formal.singleLine.scope
@@ -0,0 +1,33 @@
+func foo(aaa: Int, bbb: Int) {}
+---
+
+[#1 Content] =
+[#1 Domain] = 0:9-0:17
+ >--------<
+0| func foo(aaa: Int, bbb: Int) {}
+
+[#1 Removal] = 0:9-0:19
+ >----------<
+0| func foo(aaa: Int, bbb: Int) {}
+
+[#1 Trailing delimiter] = 0:17-0:19
+ >--<
+0| func foo(aaa: Int, bbb: Int) {}
+
+[#1 Insertion delimiter] = ", "
+
+
+[#2 Content] =
+[#2 Domain] = 0:19-0:27
+ >--------<
+0| func foo(aaa: Int, bbb: Int) {}
+
+[#2 Removal] = 0:17-0:27
+ >----------<
+0| func foo(aaa: Int, bbb: Int) {}
+
+[#2 Leading delimiter] = 0:17-0:19
+ >--<
+0| func foo(aaa: Int, bbb: Int) {}
+
+[#2 Insertion delimiter] = ", "
diff --git a/resources/fixtures/scopes/swift/argumentList/argumentList.actual.constructor.empty.scope b/resources/fixtures/scopes/swift/argumentList/argumentList.actual.constructor.empty.scope
new file mode 100644
index 0000000000..58e2245d03
--- /dev/null
+++ b/resources/fixtures/scopes/swift/argumentList/argumentList.actual.constructor.empty.scope
@@ -0,0 +1,13 @@
+Foo()
+---
+
+[Content] =
+[Removal] = 0:4-0:4
+ ><
+0| Foo()
+
+[Domain] = 0:0-0:5
+ >-----<
+0| Foo()
+
+[Insertion delimiter] = ""
diff --git a/resources/fixtures/scopes/swift/argumentList/argumentList.actual.constructor.multiLine.scope b/resources/fixtures/scopes/swift/argumentList/argumentList.actual.constructor.multiLine.scope
new file mode 100644
index 0000000000..ecbcde0a2c
--- /dev/null
+++ b/resources/fixtures/scopes/swift/argumentList/argumentList.actual.constructor.multiLine.scope
@@ -0,0 +1,33 @@
+Foo(
+ aaa,
+ bbb
+)
+---
+
+[Content] = 1:2-2:5
+ >----
+1| aaa,
+2| bbb
+ -----<
+
+[Removal] = 0:4-3:0
+ >
+0| Foo(
+1| aaa,
+2| bbb
+3| )
+ <
+
+[Leading delimiter] = 1:0-1:2
+ >--<
+1| aaa,
+
+[Domain] = 0:0-3:1
+ >----
+0| Foo(
+1| aaa,
+2| bbb
+3| )
+ -<
+
+[Insertion delimiter] = ",\n"
diff --git a/resources/fixtures/scopes/swift/argumentList/argumentList.actual.constructor.singleLine.scope b/resources/fixtures/scopes/swift/argumentList/argumentList.actual.constructor.singleLine.scope
new file mode 100644
index 0000000000..77680199f4
--- /dev/null
+++ b/resources/fixtures/scopes/swift/argumentList/argumentList.actual.constructor.singleLine.scope
@@ -0,0 +1,13 @@
+Foo(aaa, bbb)
+---
+
+[Content] =
+[Removal] = 0:4-0:12
+ >--------<
+0| Foo(aaa, bbb)
+
+[Domain] = 0:0-0:13
+ >-------------<
+0| Foo(aaa, bbb)
+
+[Insertion delimiter] = ", "
diff --git a/resources/fixtures/scopes/swift/argumentList/argumentList.actual.empty.scope b/resources/fixtures/scopes/swift/argumentList/argumentList.actual.empty.scope
new file mode 100644
index 0000000000..947915ef96
--- /dev/null
+++ b/resources/fixtures/scopes/swift/argumentList/argumentList.actual.empty.scope
@@ -0,0 +1,13 @@
+foo()
+---
+
+[Content] =
+[Removal] = 0:4-0:4
+ ><
+0| foo()
+
+[Domain] = 0:0-0:5
+ >-----<
+0| foo()
+
+[Insertion delimiter] = ""
diff --git a/resources/fixtures/scopes/swift/argumentList/argumentList.actual.method.empty.scope b/resources/fixtures/scopes/swift/argumentList/argumentList.actual.method.empty.scope
new file mode 100644
index 0000000000..ed61422204
--- /dev/null
+++ b/resources/fixtures/scopes/swift/argumentList/argumentList.actual.method.empty.scope
@@ -0,0 +1,13 @@
+foo.bar()
+---
+
+[Content] =
+[Removal] = 0:8-0:8
+ ><
+0| foo.bar()
+
+[Domain] = 0:0-0:9
+ >---------<
+0| foo.bar()
+
+[Insertion delimiter] = ""
diff --git a/resources/fixtures/scopes/swift/argumentList/argumentList.actual.method.multiLine.scope b/resources/fixtures/scopes/swift/argumentList/argumentList.actual.method.multiLine.scope
new file mode 100644
index 0000000000..b903183a0e
--- /dev/null
+++ b/resources/fixtures/scopes/swift/argumentList/argumentList.actual.method.multiLine.scope
@@ -0,0 +1,33 @@
+foo.bar(
+ aaa,
+ bbb
+)
+---
+
+[Content] = 1:2-2:5
+ >----
+1| aaa,
+2| bbb
+ -----<
+
+[Removal] = 0:8-3:0
+ >
+0| foo.bar(
+1| aaa,
+2| bbb
+3| )
+ <
+
+[Leading delimiter] = 1:0-1:2
+ >--<
+1| aaa,
+
+[Domain] = 0:0-3:1
+ >--------
+0| foo.bar(
+1| aaa,
+2| bbb
+3| )
+ -<
+
+[Insertion delimiter] = ",\n"
diff --git a/resources/fixtures/scopes/swift/argumentList/argumentList.actual.method.singleLine.scope b/resources/fixtures/scopes/swift/argumentList/argumentList.actual.method.singleLine.scope
new file mode 100644
index 0000000000..69cf068256
--- /dev/null
+++ b/resources/fixtures/scopes/swift/argumentList/argumentList.actual.method.singleLine.scope
@@ -0,0 +1,13 @@
+foo.bar(aaa, bbb)
+---
+
+[Content] =
+[Removal] = 0:8-0:16
+ >--------<
+0| foo.bar(aaa, bbb)
+
+[Domain] = 0:0-0:17
+ >-----------------<
+0| foo.bar(aaa, bbb)
+
+[Insertion delimiter] = ", "
diff --git a/resources/fixtures/scopes/swift/argumentList/argumentList.actual.multiLine.scope b/resources/fixtures/scopes/swift/argumentList/argumentList.actual.multiLine.scope
new file mode 100644
index 0000000000..f3123b7e64
--- /dev/null
+++ b/resources/fixtures/scopes/swift/argumentList/argumentList.actual.multiLine.scope
@@ -0,0 +1,33 @@
+foo(
+ aaa,
+ bbb
+)
+---
+
+[Content] = 1:2-2:5
+ >----
+1| aaa,
+2| bbb
+ -----<
+
+[Removal] = 0:4-3:0
+ >
+0| foo(
+1| aaa,
+2| bbb
+3| )
+ <
+
+[Leading delimiter] = 1:0-1:2
+ >--<
+1| aaa,
+
+[Domain] = 0:0-3:1
+ >----
+0| foo(
+1| aaa,
+2| bbb
+3| )
+ -<
+
+[Insertion delimiter] = ",\n"
diff --git a/resources/fixtures/scopes/swift/argumentList/argumentList.actual.singleLine.scope b/resources/fixtures/scopes/swift/argumentList/argumentList.actual.singleLine.scope
new file mode 100644
index 0000000000..f0de18dd5d
--- /dev/null
+++ b/resources/fixtures/scopes/swift/argumentList/argumentList.actual.singleLine.scope
@@ -0,0 +1,13 @@
+foo(aaa, bbb)
+---
+
+[Content] =
+[Removal] = 0:4-0:12
+ >--------<
+0| foo(aaa, bbb)
+
+[Domain] = 0:0-0:13
+ >-------------<
+0| foo(aaa, bbb)
+
+[Insertion delimiter] = ", "
diff --git a/resources/fixtures/scopes/swift/argumentList/argumentList.formal.constructor.empty.scope b/resources/fixtures/scopes/swift/argumentList/argumentList.formal.constructor.empty.scope
new file mode 100644
index 0000000000..6fdc84d7a4
--- /dev/null
+++ b/resources/fixtures/scopes/swift/argumentList/argumentList.formal.constructor.empty.scope
@@ -0,0 +1,15 @@
+struct Foo {
+ init() {}
+}
+---
+
+[Content] =
+[Removal] = 1:7-1:7
+ ><
+1| init() {}
+
+[Domain] = 1:2-1:11
+ >---------<
+1| init() {}
+
+[Insertion delimiter] = ""
diff --git a/resources/fixtures/scopes/swift/argumentList/argumentList.formal.constructor.multiLine.scope b/resources/fixtures/scopes/swift/argumentList/argumentList.formal.constructor.multiLine.scope
new file mode 100644
index 0000000000..ca9d1f7455
--- /dev/null
+++ b/resources/fixtures/scopes/swift/argumentList/argumentList.formal.constructor.multiLine.scope
@@ -0,0 +1,35 @@
+struct Foo {
+ init(
+ aaa: Int,
+ bbb: Int
+ ) {}
+}
+---
+
+[Content] = 2:4-3:12
+ >---------
+2| aaa: Int,
+3| bbb: Int
+ ------------<
+
+[Removal] = 1:7-4:2
+ >
+1| init(
+2| aaa: Int,
+3| bbb: Int
+4| ) {}
+ --<
+
+[Leading delimiter] = 2:0-2:4
+ >----<
+2| aaa: Int,
+
+[Domain] = 1:2-4:6
+ >-----
+1| init(
+2| aaa: Int,
+3| bbb: Int
+4| ) {}
+ ------<
+
+[Insertion delimiter] = ",\n"
diff --git a/resources/fixtures/scopes/swift/argumentList/argumentList.formal.constructor.singleLine.scope b/resources/fixtures/scopes/swift/argumentList/argumentList.formal.constructor.singleLine.scope
new file mode 100644
index 0000000000..a2790ae897
--- /dev/null
+++ b/resources/fixtures/scopes/swift/argumentList/argumentList.formal.constructor.singleLine.scope
@@ -0,0 +1,15 @@
+struct Foo {
+ init(aaa: Int, bbb: Int) {}
+}
+---
+
+[Content] =
+[Removal] = 1:7-1:25
+ >------------------<
+1| init(aaa: Int, bbb: Int) {}
+
+[Domain] = 1:2-1:29
+ >---------------------------<
+1| init(aaa: Int, bbb: Int) {}
+
+[Insertion delimiter] = ", "
diff --git a/resources/fixtures/scopes/swift/argumentList/argumentList.formal.empty.scope b/resources/fixtures/scopes/swift/argumentList/argumentList.formal.empty.scope
new file mode 100644
index 0000000000..cdfade5856
--- /dev/null
+++ b/resources/fixtures/scopes/swift/argumentList/argumentList.formal.empty.scope
@@ -0,0 +1,13 @@
+func foo() {}
+---
+
+[Content] =
+[Removal] = 0:9-0:9
+ ><
+0| func foo() {}
+
+[Domain] = 0:0-0:13
+ >-------------<
+0| func foo() {}
+
+[Insertion delimiter] = ""
diff --git a/resources/fixtures/scopes/swift/argumentList/argumentList.formal.lambda.empty.scope b/resources/fixtures/scopes/swift/argumentList/argumentList.formal.lambda.empty.scope
new file mode 100644
index 0000000000..1185750bd1
--- /dev/null
+++ b/resources/fixtures/scopes/swift/argumentList/argumentList.formal.lambda.empty.scope
@@ -0,0 +1,13 @@
+{ () in }
+---
+
+[Content] =
+[Removal] = 0:3-0:3
+ ><
+0| { () in }
+
+[Domain] = 0:0-0:9
+ >---------<
+0| { () in }
+
+[Insertion delimiter] = ""
diff --git a/resources/fixtures/scopes/swift/argumentList/argumentList.formal.lambda.multiLine.scope b/resources/fixtures/scopes/swift/argumentList/argumentList.formal.lambda.multiLine.scope
new file mode 100644
index 0000000000..53816b96ad
--- /dev/null
+++ b/resources/fixtures/scopes/swift/argumentList/argumentList.formal.lambda.multiLine.scope
@@ -0,0 +1,33 @@
+{ (
+ aaa,
+ bbb: Int
+) in }
+---
+
+[Content] = 1:2-2:10
+ >----
+1| aaa,
+2| bbb: Int
+ ----------<
+
+[Removal] = 0:3-3:0
+ >
+0| { (
+1| aaa,
+2| bbb: Int
+3| ) in }
+ <
+
+[Leading delimiter] = 1:0-1:2
+ >--<
+1| aaa,
+
+[Domain] = 0:0-3:6
+ >---
+0| { (
+1| aaa,
+2| bbb: Int
+3| ) in }
+ ------<
+
+[Insertion delimiter] = ",\n"
diff --git a/resources/fixtures/scopes/swift/argumentList/argumentList.formal.lambda.singleLine.scope b/resources/fixtures/scopes/swift/argumentList/argumentList.formal.lambda.singleLine.scope
new file mode 100644
index 0000000000..4a3b19814b
--- /dev/null
+++ b/resources/fixtures/scopes/swift/argumentList/argumentList.formal.lambda.singleLine.scope
@@ -0,0 +1,13 @@
+{ (aaa, bbb: Int) in }
+---
+
+[Content] =
+[Removal] = 0:3-0:16
+ >-------------<
+0| { (aaa, bbb: Int) in }
+
+[Domain] = 0:0-0:22
+ >----------------------<
+0| { (aaa, bbb: Int) in }
+
+[Insertion delimiter] = ", "
diff --git a/resources/fixtures/scopes/swift/argumentList/argumentList.formal.method.empty.scope b/resources/fixtures/scopes/swift/argumentList/argumentList.formal.method.empty.scope
new file mode 100644
index 0000000000..d0ca6bd71d
--- /dev/null
+++ b/resources/fixtures/scopes/swift/argumentList/argumentList.formal.method.empty.scope
@@ -0,0 +1,15 @@
+struct Foo {
+ func bar() {}
+}
+---
+
+[Content] =
+[Removal] = 1:11-1:11
+ ><
+1| func bar() {}
+
+[Domain] = 1:2-1:15
+ >-------------<
+1| func bar() {}
+
+[Insertion delimiter] = ""
diff --git a/resources/fixtures/scopes/swift/argumentList/argumentList.formal.method.multiLine.scope b/resources/fixtures/scopes/swift/argumentList/argumentList.formal.method.multiLine.scope
new file mode 100644
index 0000000000..34cda8c506
--- /dev/null
+++ b/resources/fixtures/scopes/swift/argumentList/argumentList.formal.method.multiLine.scope
@@ -0,0 +1,35 @@
+struct Foo {
+ func bar(
+ aaa: Int,
+ bbb: Int
+ ) {}
+}
+---
+
+[Content] = 2:4-3:12
+ >---------
+2| aaa: Int,
+3| bbb: Int
+ ------------<
+
+[Removal] = 1:11-4:2
+ >
+1| func bar(
+2| aaa: Int,
+3| bbb: Int
+4| ) {}
+ --<
+
+[Leading delimiter] = 2:0-2:4
+ >----<
+2| aaa: Int,
+
+[Domain] = 1:2-4:6
+ >---------
+1| func bar(
+2| aaa: Int,
+3| bbb: Int
+4| ) {}
+ ------<
+
+[Insertion delimiter] = ",\n"
diff --git a/resources/fixtures/scopes/swift/argumentList/argumentList.formal.method.singleLine.scope b/resources/fixtures/scopes/swift/argumentList/argumentList.formal.method.singleLine.scope
new file mode 100644
index 0000000000..2154ef3884
--- /dev/null
+++ b/resources/fixtures/scopes/swift/argumentList/argumentList.formal.method.singleLine.scope
@@ -0,0 +1,15 @@
+struct Foo {
+ func bar(aaa: Int, bbb: Int) {}
+}
+---
+
+[Content] =
+[Removal] = 1:11-1:29
+ >------------------<
+1| func bar(aaa: Int, bbb: Int) {}
+
+[Domain] = 1:2-1:33
+ >-------------------------------<
+1| func bar(aaa: Int, bbb: Int) {}
+
+[Insertion delimiter] = ", "
diff --git a/resources/fixtures/scopes/swift/argumentList/argumentList.formal.multiLine.scope b/resources/fixtures/scopes/swift/argumentList/argumentList.formal.multiLine.scope
new file mode 100644
index 0000000000..b2361ed3e6
--- /dev/null
+++ b/resources/fixtures/scopes/swift/argumentList/argumentList.formal.multiLine.scope
@@ -0,0 +1,33 @@
+func foo(
+ aaa: Int,
+ bbb: Int
+) {}
+---
+
+[Content] = 1:2-2:10
+ >---------
+1| aaa: Int,
+2| bbb: Int
+ ----------<
+
+[Removal] = 0:9-3:0
+ >
+0| func foo(
+1| aaa: Int,
+2| bbb: Int
+3| ) {}
+ <
+
+[Leading delimiter] = 1:0-1:2
+ >--<
+1| aaa: Int,
+
+[Domain] = 0:0-3:4
+ >---------
+0| func foo(
+1| aaa: Int,
+2| bbb: Int
+3| ) {}
+ ----<
+
+[Insertion delimiter] = ",\n"
diff --git a/resources/fixtures/scopes/swift/argumentList/argumentList.formal.singleLine.scope b/resources/fixtures/scopes/swift/argumentList/argumentList.formal.singleLine.scope
new file mode 100644
index 0000000000..ebb35c0583
--- /dev/null
+++ b/resources/fixtures/scopes/swift/argumentList/argumentList.formal.singleLine.scope
@@ -0,0 +1,13 @@
+func foo(aaa: Int, bbb: Int) {}
+---
+
+[Content] =
+[Removal] = 0:9-0:27
+ >------------------<
+0| func foo(aaa: Int, bbb: Int) {}
+
+[Domain] = 0:0-0:31
+ >-------------------------------<
+0| func foo(aaa: Int, bbb: Int) {}
+
+[Insertion delimiter] = ", "
diff --git a/resources/fixtures/scopes/swift/branch/branch.if.elif.else.scope b/resources/fixtures/scopes/swift/branch/branch.if.elif.else.scope
new file mode 100644
index 0000000000..f3854ad3d7
--- /dev/null
+++ b/resources/fixtures/scopes/swift/branch/branch.if.elif.else.scope
@@ -0,0 +1,45 @@
+if foo {}
+else if bar {}
+else {}
+---
+
+[#1 Content] =
+[#1 Domain] = 0:0-0:9
+ >---------<
+0| if foo {}
+
+[#1 Removal] = 0:0-1:5
+ >---------
+0| if foo {}
+1| else if bar {}
+ -----<
+
+[#1 Insertion delimiter] = "\n"
+
+
+[#2 Content] =
+[#2 Domain] = 1:0-1:14
+ >--------------<
+1| else if bar {}
+
+[#2 Removal] = 1:0-2:0
+ >--------------
+1| else if bar {}
+2| else {}
+ <
+
+[#2 Insertion delimiter] = "\n"
+
+
+[#3 Content] =
+[#3 Domain] = 2:0-2:7
+ >-------<
+2| else {}
+
+[#3 Removal] = 1:14-2:7
+ >
+1| else if bar {}
+2| else {}
+ -------<
+
+[#3 Insertion delimiter] = "\n"
diff --git a/resources/fixtures/scopes/swift/branch/branch.if.else.scope b/resources/fixtures/scopes/swift/branch/branch.if.else.scope
new file mode 100644
index 0000000000..9720b629a7
--- /dev/null
+++ b/resources/fixtures/scopes/swift/branch/branch.if.else.scope
@@ -0,0 +1,30 @@
+if true {}
+else {}
+---
+
+[#1 Content] =
+[#1 Domain] = 0:0-0:10
+ >----------<
+0| if true {}
+
+[#1 Removal] = 0:0-1:0
+ >----------
+0| if true {}
+1| else {}
+ <
+
+[#1 Insertion delimiter] = "\n"
+
+
+[#2 Content] =
+[#2 Domain] = 1:0-1:7
+ >-------<
+1| else {}
+
+[#2 Removal] = 0:10-1:7
+ >
+0| if true {}
+1| else {}
+ -------<
+
+[#2 Insertion delimiter] = "\n"
diff --git a/resources/fixtures/scopes/swift/branch/branch.if.iteration.scope b/resources/fixtures/scopes/swift/branch/branch.if.iteration.scope
new file mode 100644
index 0000000000..5a5ed880ea
--- /dev/null
+++ b/resources/fixtures/scopes/swift/branch/branch.if.iteration.scope
@@ -0,0 +1,12 @@
+if true {}
+else if false {}
+else {}
+---
+
+[Content] =
+[Domain] = 0:0-2:7
+ >----------
+0| if true {}
+1| else if false {}
+2| else {}
+ -------<
diff --git a/resources/fixtures/scopes/swift/branch/branch.if.scope b/resources/fixtures/scopes/swift/branch/branch.if.scope
new file mode 100644
index 0000000000..95d75aa3fb
--- /dev/null
+++ b/resources/fixtures/scopes/swift/branch/branch.if.scope
@@ -0,0 +1,10 @@
+if true {}
+---
+
+[Content] =
+[Removal] =
+[Domain] = 0:0-0:10
+ >----------<
+0| if true {}
+
+[Insertion delimiter] = "\n"
diff --git a/resources/fixtures/scopes/swift/branch/branch.switchCase.iteration.scope b/resources/fixtures/scopes/swift/branch/branch.switchCase.iteration.scope
new file mode 100644
index 0000000000..d3a9cac808
--- /dev/null
+++ b/resources/fixtures/scopes/swift/branch/branch.switchCase.iteration.scope
@@ -0,0 +1,7 @@
+switch value { }
+---
+
+[Content] =
+[Domain] = 0:14-0:15
+ >-<
+0| switch value { }
diff --git a/resources/fixtures/scopes/swift/branch/branch.switchCase.scope b/resources/fixtures/scopes/swift/branch/branch.switchCase.scope
new file mode 100644
index 0000000000..bfddb08ac4
--- /dev/null
+++ b/resources/fixtures/scopes/swift/branch/branch.switchCase.scope
@@ -0,0 +1,26 @@
+switch value {
+ case 0:
+ break
+}
+---
+
+[Content] =
+[Domain] = 1:4-3:0
+ >-------
+1| case 0:
+2| break
+3| }
+ <
+
+[Removal] = 1:0-3:0
+ >-----------
+1| case 0:
+2| break
+3| }
+ <
+
+[Leading delimiter] = 1:0-1:4
+ >----<
+1| case 0:
+
+[Insertion delimiter] = "\n"
diff --git a/resources/fixtures/scopes/swift/branch/branch.switchCase2.scope b/resources/fixtures/scopes/swift/branch/branch.switchCase2.scope
new file mode 100644
index 0000000000..d131381fbd
--- /dev/null
+++ b/resources/fixtures/scopes/swift/branch/branch.switchCase2.scope
@@ -0,0 +1,26 @@
+switch value {
+ default:
+ break
+}
+---
+
+[Content] =
+[Domain] = 1:4-3:0
+ >--------
+1| default:
+2| break
+3| }
+ <
+
+[Removal] = 1:0-3:0
+ >------------
+1| default:
+2| break
+3| }
+ <
+
+[Leading delimiter] = 1:0-1:4
+ >----<
+1| default:
+
+[Insertion delimiter] = "\n"
diff --git a/resources/fixtures/scopes/swift/branch/branch.ternary.iteration.scope b/resources/fixtures/scopes/swift/branch/branch.ternary.iteration.scope
new file mode 100644
index 0000000000..b1deb5daa4
--- /dev/null
+++ b/resources/fixtures/scopes/swift/branch/branch.ternary.iteration.scope
@@ -0,0 +1,7 @@
+foo ? 0 : 1
+---
+
+[Content] =
+[Domain] = 0:0-0:11
+ >-----------<
+0| foo ? 0 : 1
diff --git a/resources/fixtures/scopes/swift/branch/branch.ternary.scope b/resources/fixtures/scopes/swift/branch/branch.ternary.scope
new file mode 100644
index 0000000000..2a30971d42
--- /dev/null
+++ b/resources/fixtures/scopes/swift/branch/branch.ternary.scope
@@ -0,0 +1,37 @@
+foo ? 0 : 1
+---
+
+[#1 Content] =
+[#1 Domain] = 0:6-0:7
+ >-<
+0| foo ? 0 : 1
+
+[#1 Removal] = 0:6-0:8
+ >--<
+0| foo ? 0 : 1
+
+[#1 Leading delimiter] = 0:5-0:6
+ >-<
+0| foo ? 0 : 1
+
+[#1 Trailing delimiter] = 0:7-0:8
+ >-<
+0| foo ? 0 : 1
+
+[#1 Insertion delimiter] = "\n"
+
+
+[#2 Content] =
+[#2 Domain] = 0:10-0:11
+ >-<
+0| foo ? 0 : 1
+
+[#2 Removal] = 0:9-0:11
+ >--<
+0| foo ? 0 : 1
+
+[#2 Leading delimiter] = 0:9-0:10
+ >-<
+0| foo ? 0 : 1
+
+[#2 Insertion delimiter] = "\n"
diff --git a/resources/fixtures/scopes/swift/branch/branch.try.iteration.scope b/resources/fixtures/scopes/swift/branch/branch.try.iteration.scope
new file mode 100644
index 0000000000..a2d557db66
--- /dev/null
+++ b/resources/fixtures/scopes/swift/branch/branch.try.iteration.scope
@@ -0,0 +1,10 @@
+do {}
+catch {}
+---
+
+[Content] =
+[Domain] = 0:0-1:8
+ >-----
+0| do {}
+1| catch {}
+ --------<
diff --git a/resources/fixtures/scopes/swift/branch/branch.try.scope b/resources/fixtures/scopes/swift/branch/branch.try.scope
new file mode 100644
index 0000000000..b92d53331e
--- /dev/null
+++ b/resources/fixtures/scopes/swift/branch/branch.try.scope
@@ -0,0 +1,30 @@
+do {}
+catch {}
+---
+
+[#1 Content] =
+[#1 Domain] = 0:0-0:5
+ >-----<
+0| do {}
+
+[#1 Removal] = 0:0-1:0
+ >-----
+0| do {}
+1| catch {}
+ <
+
+[#1 Insertion delimiter] = "\n"
+
+
+[#2 Content] =
+[#2 Domain] = 1:0-1:8
+ >--------<
+1| catch {}
+
+[#2 Removal] = 0:5-1:8
+ >
+0| do {}
+1| catch {}
+ --------<
+
+[#2 Insertion delimiter] = "\n"
diff --git a/resources/fixtures/scopes/swift/class.iteration.class.scope b/resources/fixtures/scopes/swift/class.iteration.class.scope
new file mode 100644
index 0000000000..a3ec5f3456
--- /dev/null
+++ b/resources/fixtures/scopes/swift/class.iteration.class.scope
@@ -0,0 +1,13 @@
+class Foo { }
+---
+
+[#1 Content] =
+[#1 Domain] = 0:0-0:13
+ >-------------<
+0| class Foo { }
+
+
+[#2 Content] =
+[#2 Domain] = 0:11-0:12
+ >-<
+0| class Foo { }
diff --git a/resources/fixtures/scopes/swift/class.iteration.document.scope b/resources/fixtures/scopes/swift/class.iteration.document.scope
new file mode 100644
index 0000000000..c3d14f02e1
--- /dev/null
+++ b/resources/fixtures/scopes/swift/class.iteration.document.scope
@@ -0,0 +1,12 @@
+
+struct Foo {}
+
+---
+
+[Content] =
+[Domain] = 0:0-2:0
+ >
+0|
+1| struct Foo {}
+2|
+ <
diff --git a/resources/fixtures/scopes/swift/class.scope b/resources/fixtures/scopes/swift/class.scope
new file mode 100644
index 0000000000..80a9ab592c
--- /dev/null
+++ b/resources/fixtures/scopes/swift/class.scope
@@ -0,0 +1,10 @@
+struct Foo {}
+---
+
+[Content] =
+[Removal] =
+[Domain] = 0:0-0:13
+ >-------------<
+0| struct Foo {}
+
+[Insertion delimiter] = "\n\n"
diff --git a/resources/fixtures/scopes/swift/comment.block.scope b/resources/fixtures/scopes/swift/comment.block.scope
new file mode 100644
index 0000000000..5e8b51111c
--- /dev/null
+++ b/resources/fixtures/scopes/swift/comment.block.scope
@@ -0,0 +1,10 @@
+/* Hello world */
+---
+
+[Content] =
+[Removal] =
+[Domain] = 0:0-0:17
+ >-----------------<
+0| /* Hello world */
+
+[Insertion delimiter] = "\n"
diff --git a/resources/fixtures/scopes/swift/comment.line.scope b/resources/fixtures/scopes/swift/comment.line.scope
new file mode 100644
index 0000000000..7d1477b8a1
--- /dev/null
+++ b/resources/fixtures/scopes/swift/comment.line.scope
@@ -0,0 +1,10 @@
+// Hello world
+---
+
+[Content] =
+[Removal] =
+[Domain] = 0:0-0:14
+ >--------------<
+0| // Hello world
+
+[Insertion delimiter] = "\n"
diff --git a/resources/fixtures/scopes/swift/condition/condition.doWhile.scope b/resources/fixtures/scopes/swift/condition/condition.doWhile.scope
new file mode 100644
index 0000000000..e6fd0bfcb0
--- /dev/null
+++ b/resources/fixtures/scopes/swift/condition/condition.doWhile.scope
@@ -0,0 +1,20 @@
+repeat {} while true
+---
+
+[Content] = 0:16-0:20
+ >----<
+0| repeat {} while true
+
+[Removal] = 0:15-0:20
+ >-----<
+0| repeat {} while true
+
+[Leading delimiter] = 0:15-0:16
+ >-<
+0| repeat {} while true
+
+[Domain] = 0:0-0:20
+ >--------------------<
+0| repeat {} while true
+
+[Insertion delimiter] = " "
diff --git a/resources/fixtures/scopes/swift/condition/condition.if.scope b/resources/fixtures/scopes/swift/condition/condition.if.scope
new file mode 100644
index 0000000000..c4bc11ae65
--- /dev/null
+++ b/resources/fixtures/scopes/swift/condition/condition.if.scope
@@ -0,0 +1,52 @@
+if true {}
+else if false {}
+else {}
+---
+
+[#1 Content] = 0:3-0:7
+ >----<
+0| if true {}
+
+[#1 Removal] = 0:3-0:8
+ >-----<
+0| if true {}
+
+[#1 Leading delimiter] = 0:2-0:3
+ >-<
+0| if true {}
+
+[#1 Trailing delimiter] = 0:7-0:8
+ >-<
+0| if true {}
+
+[#1 Domain] = 0:0-2:7
+ >----------
+0| if true {}
+1| else if false {}
+2| else {}
+ -------<
+
+[#1 Insertion delimiter] = " "
+
+
+[#2 Content] = 1:8-1:13
+ >-----<
+1| else if false {}
+
+[#2 Removal] = 1:8-1:14
+ >------<
+1| else if false {}
+
+[#2 Leading delimiter] = 1:7-1:8
+ >-<
+1| else if false {}
+
+[#2 Trailing delimiter] = 1:13-1:14
+ >-<
+1| else if false {}
+
+[#2 Domain] = 1:0-1:16
+ >----------------<
+1| else if false {}
+
+[#2 Insertion delimiter] = " "
diff --git a/resources/fixtures/scopes/swift/condition/condition.switchCase.iteration.scope b/resources/fixtures/scopes/swift/condition/condition.switchCase.iteration.scope
new file mode 100644
index 0000000000..d3a9cac808
--- /dev/null
+++ b/resources/fixtures/scopes/swift/condition/condition.switchCase.iteration.scope
@@ -0,0 +1,7 @@
+switch value { }
+---
+
+[Content] =
+[Domain] = 0:14-0:15
+ >-<
+0| switch value { }
diff --git a/resources/fixtures/scopes/swift/condition/condition.switchCase.scope b/resources/fixtures/scopes/swift/condition/condition.switchCase.scope
new file mode 100644
index 0000000000..b2c9b9dfc3
--- /dev/null
+++ b/resources/fixtures/scopes/swift/condition/condition.switchCase.scope
@@ -0,0 +1,24 @@
+switch value {
+ case 0: break
+}
+---
+
+[Content] = 1:9-1:10
+ >-<
+1| case 0: break
+
+[Removal] = 1:8-1:10
+ >--<
+1| case 0: break
+
+[Leading delimiter] = 1:8-1:9
+ >-<
+1| case 0: break
+
+[Domain] = 1:4-2:0
+ >-------------
+1| case 0: break
+2| }
+ <
+
+[Insertion delimiter] = " "
diff --git a/resources/fixtures/scopes/swift/condition/condition.switchCase2.scope b/resources/fixtures/scopes/swift/condition/condition.switchCase2.scope
new file mode 100644
index 0000000000..15953d7311
--- /dev/null
+++ b/resources/fixtures/scopes/swift/condition/condition.switchCase2.scope
@@ -0,0 +1,24 @@
+switch value {
+ case 0, 1: break
+}
+---
+
+[Content] = 1:9-1:13
+ >----<
+1| case 0, 1: break
+
+[Removal] = 1:8-1:13
+ >-----<
+1| case 0, 1: break
+
+[Leading delimiter] = 1:8-1:9
+ >-<
+1| case 0, 1: break
+
+[Domain] = 1:4-2:0
+ >----------------
+1| case 0, 1: break
+2| }
+ <
+
+[Insertion delimiter] = " "
diff --git a/resources/fixtures/scopes/swift/condition/condition.ternary.scope b/resources/fixtures/scopes/swift/condition/condition.ternary.scope
new file mode 100644
index 0000000000..de80654a5f
--- /dev/null
+++ b/resources/fixtures/scopes/swift/condition/condition.ternary.scope
@@ -0,0 +1,20 @@
+foo ? 0 : 1
+---
+
+[Content] = 0:0-0:3
+ >---<
+0| foo ? 0 : 1
+
+[Removal] = 0:0-0:4
+ >----<
+0| foo ? 0 : 1
+
+[Trailing delimiter] = 0:3-0:4
+ >-<
+0| foo ? 0 : 1
+
+[Domain] = 0:0-0:11
+ >-----------<
+0| foo ? 0 : 1
+
+[Insertion delimiter] = " "
diff --git a/resources/fixtures/scopes/swift/condition/condition.while.scope b/resources/fixtures/scopes/swift/condition/condition.while.scope
new file mode 100644
index 0000000000..ef535c29be
--- /dev/null
+++ b/resources/fixtures/scopes/swift/condition/condition.while.scope
@@ -0,0 +1,24 @@
+while foo {}
+---
+
+[Content] = 0:6-0:9
+ >---<
+0| while foo {}
+
+[Removal] = 0:6-0:10
+ >----<
+0| while foo {}
+
+[Leading delimiter] = 0:5-0:6
+ >-<
+0| while foo {}
+
+[Trailing delimiter] = 0:9-0:10
+ >-<
+0| while foo {}
+
+[Domain] = 0:0-0:12
+ >------------<
+0| while foo {}
+
+[Insertion delimiter] = " "
diff --git a/resources/fixtures/scopes/swift/disqualifyDelimiter.scope b/resources/fixtures/scopes/swift/disqualifyDelimiter.scope
new file mode 100644
index 0000000000..44151ad901
--- /dev/null
+++ b/resources/fixtures/scopes/swift/disqualifyDelimiter.scope
@@ -0,0 +1,85 @@
+1 < 2
+1 > 2
+1 <= 2
+1 >= 2
+a << 2
+a >> 2
+a <<= 2
+a >>= 2
+a &<< 2
+a &>> 2
+a &<<= 2
+a &>>= 2
+a <~ 2
+a >~ 2
+0..<2
+..<2
+let foo: () -> Int
+---
+[#1 Content] = 0:2-0:3
+ >-<
+0| 1 < 2
+
+[#2 Content] = 1:2-1:3
+ >-<
+1| 1 > 2
+
+[#3 Content] = 2:2-2:4
+ >--<
+2| 1 <= 2
+
+[#4 Content] = 3:2-3:4
+ >--<
+3| 1 >= 2
+
+[#5 Content] = 4:2-4:4
+ >--<
+4| a << 2
+
+[#6 Content] = 5:2-5:4
+ >--<
+5| a >> 2
+
+[#7 Content] = 6:2-6:5
+ >---<
+6| a <<= 2
+
+[#8 Content] = 7:2-7:5
+ >---<
+7| a >>= 2
+
+[#9 Content] = 8:2-8:5
+ >---<
+8| a &<< 2
+
+[#10 Content] = 9:2-9:5
+ >---<
+9| a &>> 2
+
+[#11 Content] = 10:2-10:6
+ >----<
+10| a &<<= 2
+
+[#12 Content] = 11:2-11:6
+ >----<
+11| a &>>= 2
+
+[#13 Content] = 12:2-12:4
+ >--<
+12| a <~ 2
+
+[#14 Content] = 13:2-13:4
+ >--<
+13| a >~ 2
+
+[#15 Content] = 14:1-14:4
+ >---<
+14| 0..<2
+
+[#16 Content] = 15:0-15:3
+ >---<
+15| ..<2
+
+[#17 Content] = 16:12-16:14
+ >--<
+16| let foo: () -> Int
diff --git a/resources/fixtures/scopes/swift/functionCall/functionCall.chain.scope b/resources/fixtures/scopes/swift/functionCall/functionCall.chain.scope
new file mode 100644
index 0000000000..c73434c70d
--- /dev/null
+++ b/resources/fixtures/scopes/swift/functionCall/functionCall.chain.scope
@@ -0,0 +1,19 @@
+foo().bar()
+---
+
+[#1 Content] =
+[#1 Removal] =
+[#1 Domain] = 0:0-0:5
+ >-----<
+0| foo().bar()
+
+[#1 Insertion delimiter] = " "
+
+
+[#2 Content] =
+[#2 Removal] =
+[#2 Domain] = 0:0-0:11
+ >-----------<
+0| foo().bar()
+
+[#2 Insertion delimiter] = " "
diff --git a/resources/fixtures/scopes/swift/functionCall/functionCall.constructor.scope b/resources/fixtures/scopes/swift/functionCall/functionCall.constructor.scope
new file mode 100644
index 0000000000..c6d74f15a1
--- /dev/null
+++ b/resources/fixtures/scopes/swift/functionCall/functionCall.constructor.scope
@@ -0,0 +1,10 @@
+Foo()
+---
+
+[Content] =
+[Removal] =
+[Domain] = 0:0-0:5
+ >-----<
+0| Foo()
+
+[Insertion delimiter] = " "
diff --git a/resources/fixtures/scopes/swift/functionCall/functionCall.method.scope b/resources/fixtures/scopes/swift/functionCall/functionCall.method.scope
new file mode 100644
index 0000000000..6ab0ba4c3a
--- /dev/null
+++ b/resources/fixtures/scopes/swift/functionCall/functionCall.method.scope
@@ -0,0 +1,10 @@
+foo.bar()
+---
+
+[Content] =
+[Removal] =
+[Domain] = 0:0-0:9
+ >---------<
+0| foo.bar()
+
+[Insertion delimiter] = " "
diff --git a/resources/fixtures/scopes/swift/functionCall/functionCall.scope b/resources/fixtures/scopes/swift/functionCall/functionCall.scope
new file mode 100644
index 0000000000..00162e317c
--- /dev/null
+++ b/resources/fixtures/scopes/swift/functionCall/functionCall.scope
@@ -0,0 +1,10 @@
+foo()
+---
+
+[Content] =
+[Removal] =
+[Domain] = 0:0-0:5
+ >-----<
+0| foo()
+
+[Insertion delimiter] = " "
diff --git a/resources/fixtures/scopes/swift/functionCallee/functionCallee.chain.scope b/resources/fixtures/scopes/swift/functionCallee/functionCallee.chain.scope
new file mode 100644
index 0000000000..b0b9872650
--- /dev/null
+++ b/resources/fixtures/scopes/swift/functionCallee/functionCallee.chain.scope
@@ -0,0 +1,25 @@
+foo().bar()
+---
+
+[#1 Content] =
+[#1 Removal] = 0:0-0:3
+ >---<
+0| foo().bar()
+
+[#1 Domain] = 0:0-0:5
+ >-----<
+0| foo().bar()
+
+[#1 Insertion delimiter] = " "
+
+
+[#2 Content] =
+[#2 Removal] = 0:0-0:9
+ >---------<
+0| foo().bar()
+
+[#2 Domain] = 0:0-0:11
+ >-----------<
+0| foo().bar()
+
+[#2 Insertion delimiter] = " "
diff --git a/resources/fixtures/scopes/swift/functionCallee/functionCallee.constructor.scope b/resources/fixtures/scopes/swift/functionCallee/functionCallee.constructor.scope
new file mode 100644
index 0000000000..16cc5263eb
--- /dev/null
+++ b/resources/fixtures/scopes/swift/functionCallee/functionCallee.constructor.scope
@@ -0,0 +1,13 @@
+Foo()
+---
+
+[Content] =
+[Removal] = 0:0-0:3
+ >---<
+0| Foo()
+
+[Domain] = 0:0-0:5
+ >-----<
+0| Foo()
+
+[Insertion delimiter] = " "
diff --git a/resources/fixtures/scopes/swift/functionCallee/functionCallee.method.scope b/resources/fixtures/scopes/swift/functionCallee/functionCallee.method.scope
new file mode 100644
index 0000000000..e77bc361ec
--- /dev/null
+++ b/resources/fixtures/scopes/swift/functionCallee/functionCallee.method.scope
@@ -0,0 +1,13 @@
+foo.bar()
+---
+
+[Content] =
+[Removal] = 0:0-0:7
+ >-------<
+0| foo.bar()
+
+[Domain] = 0:0-0:9
+ >---------<
+0| foo.bar()
+
+[Insertion delimiter] = " "
diff --git a/resources/fixtures/scopes/swift/functionCallee/functionCallee.scope b/resources/fixtures/scopes/swift/functionCallee/functionCallee.scope
new file mode 100644
index 0000000000..2b075b5c33
--- /dev/null
+++ b/resources/fixtures/scopes/swift/functionCallee/functionCallee.scope
@@ -0,0 +1,13 @@
+foo()
+---
+
+[Content] =
+[Removal] = 0:0-0:3
+ >---<
+0| foo()
+
+[Domain] = 0:0-0:5
+ >-----<
+0| foo()
+
+[Insertion delimiter] = " "
diff --git a/resources/fixtures/scopes/swift/ifStatement.scope b/resources/fixtures/scopes/swift/ifStatement.scope
new file mode 100644
index 0000000000..e0d492e889
--- /dev/null
+++ b/resources/fixtures/scopes/swift/ifStatement.scope
@@ -0,0 +1,15 @@
+if true {}
+else if false {}
+else {}
+---
+
+[Content] =
+[Removal] =
+[Domain] = 0:0-2:7
+ >----------
+0| if true {}
+1| else if false {}
+2| else {}
+ -------<
+
+[Insertion delimiter] = "\n"
diff --git a/resources/fixtures/scopes/swift/interior/interior.class.scope b/resources/fixtures/scopes/swift/interior/interior.class.scope
new file mode 100644
index 0000000000..13ef2f4d94
--- /dev/null
+++ b/resources/fixtures/scopes/swift/interior/interior.class.scope
@@ -0,0 +1,10 @@
+class Foo { }
+---
+
+[Content] =
+[Removal] =
+[Domain] = 0:11-0:12
+ >-<
+0| class Foo { }
+
+[Insertion delimiter] = " "
diff --git a/resources/fixtures/scopes/swift/interior/interior.constructor.scope b/resources/fixtures/scopes/swift/interior/interior.constructor.scope
new file mode 100644
index 0000000000..8503cb88bb
--- /dev/null
+++ b/resources/fixtures/scopes/swift/interior/interior.constructor.scope
@@ -0,0 +1,27 @@
+struct Foo {
+ init() { }
+}
+---
+
+[#1 Content] = 1:2-1:12
+ >----------<
+1| init() { }
+
+[#1 Removal] =
+[#1 Domain] = 0:12-2:0
+ >
+0| struct Foo {
+1| init() { }
+2| }
+ <
+
+[#1 Insertion delimiter] = " "
+
+
+[#2 Content] =
+[#2 Removal] =
+[#2 Domain] = 1:10-1:11
+ >-<
+1| init() { }
+
+[#2 Insertion delimiter] = " "
diff --git a/resources/fixtures/scopes/swift/interior/interior.doWhile.scope b/resources/fixtures/scopes/swift/interior/interior.doWhile.scope
new file mode 100644
index 0000000000..16e7fb5fb8
--- /dev/null
+++ b/resources/fixtures/scopes/swift/interior/interior.doWhile.scope
@@ -0,0 +1,10 @@
+repeat { } while foo
+---
+
+[Content] =
+[Removal] =
+[Domain] = 0:8-0:9
+ >-<
+0| repeat { } while foo
+
+[Insertion delimiter] = " "
diff --git a/resources/fixtures/scopes/swift/interior/interior.enum.scope b/resources/fixtures/scopes/swift/interior/interior.enum.scope
new file mode 100644
index 0000000000..d96875b078
--- /dev/null
+++ b/resources/fixtures/scopes/swift/interior/interior.enum.scope
@@ -0,0 +1,10 @@
+enum Foo { }
+---
+
+[Content] =
+[Removal] =
+[Domain] = 0:10-0:11
+ >-<
+0| enum Foo { }
+
+[Insertion delimiter] = " "
diff --git a/resources/fixtures/scopes/swift/interior/interior.foreach.scope b/resources/fixtures/scopes/swift/interior/interior.foreach.scope
new file mode 100644
index 0000000000..b1842875b3
--- /dev/null
+++ b/resources/fixtures/scopes/swift/interior/interior.foreach.scope
@@ -0,0 +1,10 @@
+for v in values { }
+---
+
+[Content] =
+[Removal] =
+[Domain] = 0:17-0:18
+ >-<
+0| for v in values { }
+
+[Insertion delimiter] = " "
diff --git a/resources/fixtures/scopes/swift/interior/interior.function.scope b/resources/fixtures/scopes/swift/interior/interior.function.scope
new file mode 100644
index 0000000000..7c395916ef
--- /dev/null
+++ b/resources/fixtures/scopes/swift/interior/interior.function.scope
@@ -0,0 +1,10 @@
+func foo() { }
+---
+
+[Content] =
+[Removal] =
+[Domain] = 0:12-0:13
+ >-<
+0| func foo() { }
+
+[Insertion delimiter] = " "
diff --git a/resources/fixtures/scopes/swift/interior/interior.if.scope b/resources/fixtures/scopes/swift/interior/interior.if.scope
new file mode 100644
index 0000000000..407453929f
--- /dev/null
+++ b/resources/fixtures/scopes/swift/interior/interior.if.scope
@@ -0,0 +1,30 @@
+if (true) { }
+else if (false) { }
+else { }
+---
+
+[#1 Content] =
+[#1 Removal] =
+[#1 Domain] = 0:11-0:12
+ >-<
+0| if (true) { }
+
+[#1 Insertion delimiter] = " "
+
+
+[#2 Content] =
+[#2 Removal] =
+[#2 Domain] = 1:17-1:18
+ >-<
+1| else if (false) { }
+
+[#2 Insertion delimiter] = " "
+
+
+[#3 Content] =
+[#3 Removal] =
+[#3 Domain] = 2:6-2:7
+ >-<
+2| else { }
+
+[#3 Insertion delimiter] = " "
diff --git a/resources/fixtures/scopes/swift/interior/interior.if2.scope b/resources/fixtures/scopes/swift/interior/interior.if2.scope
new file mode 100644
index 0000000000..a47d3ff21a
--- /dev/null
+++ b/resources/fixtures/scopes/swift/interior/interior.if2.scope
@@ -0,0 +1,10 @@
+if (true) { }
+---
+
+[Content] =
+[Removal] =
+[Domain] = 0:11-0:12
+ >-<
+0| if (true) { }
+
+[Insertion delimiter] = " "
diff --git a/resources/fixtures/scopes/swift/interior/interior.if3.scope b/resources/fixtures/scopes/swift/interior/interior.if3.scope
new file mode 100644
index 0000000000..68458d6dd2
--- /dev/null
+++ b/resources/fixtures/scopes/swift/interior/interior.if3.scope
@@ -0,0 +1,20 @@
+if (true) { }
+else { }
+---
+
+[#1 Content] =
+[#1 Removal] =
+[#1 Domain] = 0:11-0:12
+ >-<
+0| if (true) { }
+
+[#1 Insertion delimiter] = " "
+
+
+[#2 Content] =
+[#2 Removal] =
+[#2 Domain] = 1:6-1:7
+ >-<
+1| else { }
+
+[#2 Insertion delimiter] = " "
diff --git a/resources/fixtures/scopes/swift/interior/interior.if4.scope b/resources/fixtures/scopes/swift/interior/interior.if4.scope
new file mode 100644
index 0000000000..00317b0cca
--- /dev/null
+++ b/resources/fixtures/scopes/swift/interior/interior.if4.scope
@@ -0,0 +1,20 @@
+if (true) { }
+else if (false) { }
+---
+
+[#1 Content] =
+[#1 Removal] =
+[#1 Domain] = 0:11-0:12
+ >-<
+0| if (true) { }
+
+[#1 Insertion delimiter] = " "
+
+
+[#2 Content] =
+[#2 Removal] =
+[#2 Domain] = 1:17-1:18
+ >-<
+1| else if (false) { }
+
+[#2 Insertion delimiter] = " "
diff --git a/resources/fixtures/scopes/swift/interior/interior.interface.scope b/resources/fixtures/scopes/swift/interior/interior.interface.scope
new file mode 100644
index 0000000000..675578b704
--- /dev/null
+++ b/resources/fixtures/scopes/swift/interior/interior.interface.scope
@@ -0,0 +1,10 @@
+protocol Foo { }
+---
+
+[Content] =
+[Removal] =
+[Domain] = 0:14-0:15
+ >-<
+0| protocol Foo { }
+
+[Insertion delimiter] = " "
diff --git a/resources/fixtures/scopes/swift/interior/interior.lambda.scope b/resources/fixtures/scopes/swift/interior/interior.lambda.scope
new file mode 100644
index 0000000000..cc18a8f151
--- /dev/null
+++ b/resources/fixtures/scopes/swift/interior/interior.lambda.scope
@@ -0,0 +1,10 @@
+{ () in 0 }
+---
+
+[Content] =
+[Removal] =
+[Domain] = 0:8-0:9
+ >-<
+0| { () in 0 }
+
+[Insertion delimiter] = " "
diff --git a/resources/fixtures/scopes/swift/interior/interior.method.scope b/resources/fixtures/scopes/swift/interior/interior.method.scope
new file mode 100644
index 0000000000..e5063171eb
--- /dev/null
+++ b/resources/fixtures/scopes/swift/interior/interior.method.scope
@@ -0,0 +1,27 @@
+struct Foo {
+ func bar() { }
+}
+---
+
+[#1 Content] = 1:2-1:16
+ >--------------<
+1| func bar() { }
+
+[#1 Removal] =
+[#1 Domain] = 0:12-2:0
+ >
+0| struct Foo {
+1| func bar() { }
+2| }
+ <
+
+[#1 Insertion delimiter] = " "
+
+
+[#2 Content] =
+[#2 Removal] =
+[#2 Domain] = 1:14-1:15
+ >-<
+1| func bar() { }
+
+[#2 Insertion delimiter] = " "
diff --git a/resources/fixtures/scopes/swift/interior/interior.switch.scope b/resources/fixtures/scopes/swift/interior/interior.switch.scope
new file mode 100644
index 0000000000..5cabb1a765
--- /dev/null
+++ b/resources/fixtures/scopes/swift/interior/interior.switch.scope
@@ -0,0 +1,10 @@
+switch value { }
+---
+
+[Content] =
+[Removal] =
+[Domain] = 0:14-0:15
+ >-<
+0| switch value { }
+
+[Insertion delimiter] = " "
diff --git a/resources/fixtures/scopes/swift/interior/interior.switchCase.scope b/resources/fixtures/scopes/swift/interior/interior.switchCase.scope
new file mode 100644
index 0000000000..2922310d29
--- /dev/null
+++ b/resources/fixtures/scopes/swift/interior/interior.switchCase.scope
@@ -0,0 +1,69 @@
+switch value {
+ case 0:
+ bar
+ break
+ default:
+ bar
+ break
+}
+---
+
+[#1 Content] = 1:4-6:13
+ >-------
+1| case 0:
+2| bar
+3| break
+4| default:
+5| bar
+6| break
+ -------------<
+
+[#1 Removal] =
+[#1 Domain] = 0:14-7:0
+ >
+0| switch value {
+1| case 0:
+2| bar
+3| break
+4| default:
+5| bar
+6| break
+7| }
+ <
+
+[#1 Insertion delimiter] = " "
+
+
+[#2 Content] = 2:8-3:13
+ >---
+2| bar
+3| break
+ -------------<
+
+[#2 Removal] =
+[#2 Domain] = 1:11-3:13
+ >
+1| case 0:
+2| bar
+3| break
+ -------------<
+
+[#2 Insertion delimiter] = " "
+
+
+[#3 Content] = 5:8-6:13
+ >---
+5| bar
+6| break
+ -------------<
+
+[#3 Removal] =
+[#3 Domain] = 4:12-7:0
+ >
+4| default:
+5| bar
+6| break
+7| }
+ <
+
+[#3 Insertion delimiter] = " "
diff --git a/resources/fixtures/scopes/swift/interior/interior.try.scope b/resources/fixtures/scopes/swift/interior/interior.try.scope
new file mode 100644
index 0000000000..16d560261c
--- /dev/null
+++ b/resources/fixtures/scopes/swift/interior/interior.try.scope
@@ -0,0 +1,20 @@
+do { }
+catch { }
+---
+
+[#1 Content] =
+[#1 Removal] =
+[#1 Domain] = 0:4-0:5
+ >-<
+0| do { }
+
+[#1 Insertion delimiter] = " "
+
+
+[#2 Content] =
+[#2 Removal] =
+[#2 Domain] = 1:7-1:8
+ >-<
+1| catch { }
+
+[#2 Insertion delimiter] = " "
diff --git a/resources/fixtures/scopes/swift/interior/interior.while.scope b/resources/fixtures/scopes/swift/interior/interior.while.scope
new file mode 100644
index 0000000000..cf2a2a635d
--- /dev/null
+++ b/resources/fixtures/scopes/swift/interior/interior.while.scope
@@ -0,0 +1,10 @@
+while foo { }
+---
+
+[Content] =
+[Removal] =
+[Domain] = 0:11-0:12
+ >-<
+0| while foo { }
+
+[Insertion delimiter] = " "
diff --git a/resources/fixtures/scopes/swift/key.mapPair.iteration.scope b/resources/fixtures/scopes/swift/key.mapPair.iteration.scope
new file mode 100644
index 0000000000..e57fae7b83
--- /dev/null
+++ b/resources/fixtures/scopes/swift/key.mapPair.iteration.scope
@@ -0,0 +1,7 @@
+[foo: 0, bar: 1]
+---
+
+[Content] =
+[Domain] = 0:1-0:15
+ >--------------<
+0| [foo: 0, bar: 1]
diff --git a/resources/fixtures/scopes/swift/key.mapPair.scope b/resources/fixtures/scopes/swift/key.mapPair.scope
new file mode 100644
index 0000000000..654be8d548
--- /dev/null
+++ b/resources/fixtures/scopes/swift/key.mapPair.scope
@@ -0,0 +1,39 @@
+[foo: 0, bar: 1]
+---
+
+[#1 Content] = 0:1-0:4
+ >---<
+0| [foo: 0, bar: 1]
+
+[#1 Removal] = 0:1-0:6
+ >-----<
+0| [foo: 0, bar: 1]
+
+[#1 Trailing delimiter] = 0:4-0:6
+ >--<
+0| [foo: 0, bar: 1]
+
+[#1 Domain] = 0:1-0:7
+ >------<
+0| [foo: 0, bar: 1]
+
+[#1 Insertion delimiter] = " "
+
+
+[#2 Content] = 0:9-0:12
+ >---<
+0| [foo: 0, bar: 1]
+
+[#2 Removal] = 0:9-0:14
+ >-----<
+0| [foo: 0, bar: 1]
+
+[#2 Trailing delimiter] = 0:12-0:14
+ >--<
+0| [foo: 0, bar: 1]
+
+[#2 Domain] = 0:9-0:15
+ >------<
+0| [foo: 0, bar: 1]
+
+[#2 Insertion delimiter] = " "
diff --git a/resources/fixtures/scopes/swift/list.scope b/resources/fixtures/scopes/swift/list.scope
new file mode 100644
index 0000000000..053c607f96
--- /dev/null
+++ b/resources/fixtures/scopes/swift/list.scope
@@ -0,0 +1,10 @@
+[aaa, bbb]
+---
+
+[Content] =
+[Removal] =
+[Domain] = 0:0-0:10
+ >----------<
+0| [aaa, bbb]
+
+[Insertion delimiter] = " "
diff --git a/resources/fixtures/scopes/swift/map.scope b/resources/fixtures/scopes/swift/map.scope
new file mode 100644
index 0000000000..de639006a0
--- /dev/null
+++ b/resources/fixtures/scopes/swift/map.scope
@@ -0,0 +1,10 @@
+[aaa: 0, bbb: 1]
+---
+
+[Content] =
+[Removal] =
+[Domain] = 0:0-0:16
+ >----------------<
+0| [aaa: 0, bbb: 1]
+
+[Insertion delimiter] = " "
diff --git a/resources/fixtures/scopes/swift/name/name.argument.actual.iteration.scope b/resources/fixtures/scopes/swift/name/name.argument.actual.iteration.scope
new file mode 100644
index 0000000000..c25ba7b1bd
--- /dev/null
+++ b/resources/fixtures/scopes/swift/name/name.argument.actual.iteration.scope
@@ -0,0 +1,13 @@
+foo(aaa: 0, bbb: 1)
+---
+
+[#1 Content] =
+[#1 Domain] = 0:0-0:19
+ >-------------------<
+0| foo(aaa: 0, bbb: 1)
+
+
+[#2 Content] =
+[#2 Domain] = 0:4-0:18
+ >--------------<
+0| foo(aaa: 0, bbb: 1)
diff --git a/resources/fixtures/scopes/swift/name/name.argument.actual.scope b/resources/fixtures/scopes/swift/name/name.argument.actual.scope
new file mode 100644
index 0000000000..8f76744ee7
--- /dev/null
+++ b/resources/fixtures/scopes/swift/name/name.argument.actual.scope
@@ -0,0 +1,39 @@
+foo(aaa: 0, bbb: 1)
+---
+
+[#1 Content] = 0:4-0:7
+ >---<
+0| foo(aaa: 0, bbb: 1)
+
+[#1 Removal] = 0:4-0:9
+ >-----<
+0| foo(aaa: 0, bbb: 1)
+
+[#1 Trailing delimiter] = 0:7-0:9
+ >--<
+0| foo(aaa: 0, bbb: 1)
+
+[#1 Domain] = 0:4-0:10
+ >------<
+0| foo(aaa: 0, bbb: 1)
+
+[#1 Insertion delimiter] = " "
+
+
+[#2 Content] = 0:12-0:15
+ >---<
+0| foo(aaa: 0, bbb: 1)
+
+[#2 Removal] = 0:12-0:17
+ >-----<
+0| foo(aaa: 0, bbb: 1)
+
+[#2 Trailing delimiter] = 0:15-0:17
+ >--<
+0| foo(aaa: 0, bbb: 1)
+
+[#2 Domain] = 0:12-0:18
+ >------<
+0| foo(aaa: 0, bbb: 1)
+
+[#2 Insertion delimiter] = " "
diff --git a/resources/fixtures/scopes/swift/name/name.argument.catch.scope b/resources/fixtures/scopes/swift/name/name.argument.catch.scope
new file mode 100644
index 0000000000..7f95e7b858
--- /dev/null
+++ b/resources/fixtures/scopes/swift/name/name.argument.catch.scope
@@ -0,0 +1,25 @@
+do {}
+catch let e as Error {}
+---
+
+[Content] = 1:10-1:11
+ >-<
+1| catch let e as Error {}
+
+[Removal] = 1:10-1:12
+ >--<
+1| catch let e as Error {}
+
+[Leading delimiter] = 1:9-1:10
+ >-<
+1| catch let e as Error {}
+
+[Trailing delimiter] = 1:11-1:12
+ >-<
+1| catch let e as Error {}
+
+[Domain] = 1:6-1:20
+ >--------------<
+1| catch let e as Error {}
+
+[Insertion delimiter] = " "
diff --git a/resources/fixtures/scopes/swift/name/name.argument.catch2.scope b/resources/fixtures/scopes/swift/name/name.argument.catch2.scope
new file mode 100644
index 0000000000..8306ff8094
--- /dev/null
+++ b/resources/fixtures/scopes/swift/name/name.argument.catch2.scope
@@ -0,0 +1,25 @@
+do {}
+catch let e {}
+---
+
+[Content] = 1:10-1:11
+ >-<
+1| catch let e {}
+
+[Removal] = 1:10-1:12
+ >--<
+1| catch let e {}
+
+[Leading delimiter] = 1:9-1:10
+ >-<
+1| catch let e {}
+
+[Trailing delimiter] = 1:11-1:12
+ >-<
+1| catch let e {}
+
+[Domain] = 1:6-1:11
+ >-----<
+1| catch let e {}
+
+[Insertion delimiter] = " "
diff --git a/resources/fixtures/scopes/swift/name/name.argument.formal.constructor.iteration.scope b/resources/fixtures/scopes/swift/name/name.argument.formal.constructor.iteration.scope
new file mode 100644
index 0000000000..eb9d3a4746
--- /dev/null
+++ b/resources/fixtures/scopes/swift/name/name.argument.formal.constructor.iteration.scope
@@ -0,0 +1,27 @@
+struct Foo {
+ init(aaa: Int, bbb: Int = 0) {}
+}
+---
+
+[#1 Content] =
+[#1 Domain] = 0:0-2:1
+ >------------
+0| struct Foo {
+1| init(aaa: Int, bbb: Int = 0) {}
+2| }
+ -<
+
+
+[#2 Content] =
+[#2 Domain] = 0:12-2:0
+ >
+0| struct Foo {
+1| init(aaa: Int, bbb: Int = 0) {}
+2| }
+ <
+
+
+[#3 Content] =
+[#3 Domain] = 1:9-1:31
+ >----------------------<
+1| init(aaa: Int, bbb: Int = 0) {}
diff --git a/resources/fixtures/scopes/swift/name/name.argument.formal.constructor.scope b/resources/fixtures/scopes/swift/name/name.argument.formal.constructor.scope
new file mode 100644
index 0000000000..fe163c95ef
--- /dev/null
+++ b/resources/fixtures/scopes/swift/name/name.argument.formal.constructor.scope
@@ -0,0 +1,76 @@
+struct Foo {
+ init(aaa: Int, bbb: Int = 0) {}
+}
+---
+
+[#1 Content] = 0:7-0:10
+ >---<
+0| struct Foo {
+
+[#1 Removal] = 0:7-0:11
+ >----<
+0| struct Foo {
+
+[#1 Leading delimiter] = 0:6-0:7
+ >-<
+0| struct Foo {
+
+[#1 Trailing delimiter] = 0:10-0:11
+ >-<
+0| struct Foo {
+
+[#1 Domain] = 0:0-2:1
+ >------------
+0| struct Foo {
+1| init(aaa: Int, bbb: Int = 0) {}
+2| }
+ -<
+
+[#1 Insertion delimiter] = " "
+
+
+[#2 Content] =
+[#2 Removal] = 1:4-1:8
+ >----<
+1| init(aaa: Int, bbb: Int = 0) {}
+
+[#2 Leading delimiter] = 1:0-1:4
+ >----<
+1| init(aaa: Int, bbb: Int = 0) {}
+
+[#2 Domain] = 1:4-1:35
+ >-------------------------------<
+1| init(aaa: Int, bbb: Int = 0) {}
+
+[#2 Insertion delimiter] = " "
+
+
+[#3 Content] =
+[#3 Removal] = 1:9-1:12
+ >---<
+1| init(aaa: Int, bbb: Int = 0) {}
+
+[#3 Domain] = 1:9-1:17
+ >--------<
+1| init(aaa: Int, bbb: Int = 0) {}
+
+[#3 Insertion delimiter] = " "
+
+
+[#4 Content] = 1:19-1:22
+ >---<
+1| init(aaa: Int, bbb: Int = 0) {}
+
+[#4 Removal] = 1:18-1:22
+ >----<
+1| init(aaa: Int, bbb: Int = 0) {}
+
+[#4 Leading delimiter] = 1:18-1:19
+ >-<
+1| init(aaa: Int, bbb: Int = 0) {}
+
+[#4 Domain] = 1:19-1:31
+ >------------<
+1| init(aaa: Int, bbb: Int = 0) {}
+
+[#4 Insertion delimiter] = " "
diff --git a/resources/fixtures/scopes/swift/name/name.argument.formal.iteration.scope b/resources/fixtures/scopes/swift/name/name.argument.formal.iteration.scope
new file mode 100644
index 0000000000..46db93737a
--- /dev/null
+++ b/resources/fixtures/scopes/swift/name/name.argument.formal.iteration.scope
@@ -0,0 +1,13 @@
+func foo(aaa: Int, bbb: Int = 0) {}
+---
+
+[#1 Content] =
+[#1 Domain] = 0:0-0:35
+ >-----------------------------------<
+0| func foo(aaa: Int, bbb: Int = 0) {}
+
+
+[#2 Content] =
+[#2 Domain] = 0:9-0:31
+ >----------------------<
+0| func foo(aaa: Int, bbb: Int = 0) {}
diff --git a/resources/fixtures/scopes/swift/name/name.argument.formal.lambda.iteration.scope b/resources/fixtures/scopes/swift/name/name.argument.formal.lambda.iteration.scope
new file mode 100644
index 0000000000..e5b3470074
--- /dev/null
+++ b/resources/fixtures/scopes/swift/name/name.argument.formal.lambda.iteration.scope
@@ -0,0 +1,13 @@
+{ (aaa, bbb: Int) in }
+---
+
+[#1 Content] =
+[#1 Domain] = 0:0-0:22
+ >----------------------<
+0| { (aaa, bbb: Int) in }
+
+
+[#2 Content] =
+[#2 Domain] = 0:3-0:16
+ >-------------<
+0| { (aaa, bbb: Int) in }
diff --git a/resources/fixtures/scopes/swift/name/name.argument.formal.lambda.scope b/resources/fixtures/scopes/swift/name/name.argument.formal.lambda.scope
new file mode 100644
index 0000000000..c666a20406
--- /dev/null
+++ b/resources/fixtures/scopes/swift/name/name.argument.formal.lambda.scope
@@ -0,0 +1,26 @@
+{ (aaa, bbb: Int) in }
+---
+
+[#1 Content] =
+[#1 Removal] =
+[#1 Domain] = 0:3-0:6
+ >---<
+0| { (aaa, bbb: Int) in }
+
+[#1 Insertion delimiter] = " "
+
+
+[#2 Content] =
+[#2 Domain] = 0:8-0:11
+ >---<
+0| { (aaa, bbb: Int) in }
+
+[#2 Removal] = 0:7-0:11
+ >----<
+0| { (aaa, bbb: Int) in }
+
+[#2 Leading delimiter] = 0:7-0:8
+ >-<
+0| { (aaa, bbb: Int) in }
+
+[#2 Insertion delimiter] = " "
diff --git a/resources/fixtures/scopes/swift/name/name.argument.formal.method.iteration.scope b/resources/fixtures/scopes/swift/name/name.argument.formal.method.iteration.scope
new file mode 100644
index 0000000000..4f21aa2787
--- /dev/null
+++ b/resources/fixtures/scopes/swift/name/name.argument.formal.method.iteration.scope
@@ -0,0 +1,27 @@
+struct Foo {
+ func bar(aaa: Int, bbb: Int = 0) {}
+}
+---
+
+[#1 Content] =
+[#1 Domain] = 0:0-2:1
+ >------------
+0| struct Foo {
+1| func bar(aaa: Int, bbb: Int = 0) {}
+2| }
+ -<
+
+
+[#2 Content] =
+[#2 Domain] = 0:12-2:0
+ >
+0| struct Foo {
+1| func bar(aaa: Int, bbb: Int = 0) {}
+2| }
+ <
+
+
+[#3 Content] =
+[#3 Domain] = 1:13-1:35
+ >----------------------<
+1| func bar(aaa: Int, bbb: Int = 0) {}
diff --git a/resources/fixtures/scopes/swift/name/name.argument.formal.method.scope b/resources/fixtures/scopes/swift/name/name.argument.formal.method.scope
new file mode 100644
index 0000000000..c629a828b6
--- /dev/null
+++ b/resources/fixtures/scopes/swift/name/name.argument.formal.method.scope
@@ -0,0 +1,76 @@
+struct Foo {
+ func bar(aaa: Int, bbb: Int) {}
+}
+---
+
+[#1 Content] = 0:7-0:10
+ >---<
+0| struct Foo {
+
+[#1 Removal] = 0:7-0:11
+ >----<
+0| struct Foo {
+
+[#1 Leading delimiter] = 0:6-0:7
+ >-<
+0| struct Foo {
+
+[#1 Trailing delimiter] = 0:10-0:11
+ >-<
+0| struct Foo {
+
+[#1 Domain] = 0:0-2:1
+ >------------
+0| struct Foo {
+1| func bar(aaa: Int, bbb: Int) {}
+2| }
+ -<
+
+[#1 Insertion delimiter] = " "
+
+
+[#2 Content] =
+[#2 Removal] = 1:9-1:12
+ >---<
+1| func bar(aaa: Int, bbb: Int) {}
+
+[#2 Leading delimiter] = 1:8-1:9
+ >-<
+1| func bar(aaa: Int, bbb: Int) {}
+
+[#2 Domain] = 1:4-1:35
+ >-------------------------------<
+1| func bar(aaa: Int, bbb: Int) {}
+
+[#2 Insertion delimiter] = " "
+
+
+[#3 Content] =
+[#3 Removal] = 1:13-1:16
+ >---<
+1| func bar(aaa: Int, bbb: Int) {}
+
+[#3 Domain] = 1:13-1:21
+ >--------<
+1| func bar(aaa: Int, bbb: Int) {}
+
+[#3 Insertion delimiter] = " "
+
+
+[#4 Content] = 1:23-1:26
+ >---<
+1| func bar(aaa: Int, bbb: Int) {}
+
+[#4 Removal] = 1:22-1:26
+ >----<
+1| func bar(aaa: Int, bbb: Int) {}
+
+[#4 Leading delimiter] = 1:22-1:23
+ >-<
+1| func bar(aaa: Int, bbb: Int) {}
+
+[#4 Domain] = 1:23-1:31
+ >--------<
+1| func bar(aaa: Int, bbb: Int) {}
+
+[#4 Insertion delimiter] = " "
diff --git a/resources/fixtures/scopes/swift/name/name.argument.formal.scope b/resources/fixtures/scopes/swift/name/name.argument.formal.scope
new file mode 100644
index 0000000000..b1d50a3735
--- /dev/null
+++ b/resources/fixtures/scopes/swift/name/name.argument.formal.scope
@@ -0,0 +1,48 @@
+func foo(aaa: Int, bbb: Int = 0) {}
+---
+
+[#1 Content] =
+[#1 Removal] = 0:5-0:8
+ >---<
+0| func foo(aaa: Int, bbb: Int = 0) {}
+
+[#1 Leading delimiter] = 0:4-0:5
+ >-<
+0| func foo(aaa: Int, bbb: Int = 0) {}
+
+[#1 Domain] = 0:0-0:35
+ >-----------------------------------<
+0| func foo(aaa: Int, bbb: Int = 0) {}
+
+[#1 Insertion delimiter] = " "
+
+
+[#2 Content] =
+[#2 Removal] = 0:9-0:12
+ >---<
+0| func foo(aaa: Int, bbb: Int = 0) {}
+
+[#2 Domain] = 0:9-0:17
+ >--------<
+0| func foo(aaa: Int, bbb: Int = 0) {}
+
+[#2 Insertion delimiter] = " "
+
+
+[#3 Content] = 0:19-0:22
+ >---<
+0| func foo(aaa: Int, bbb: Int = 0) {}
+
+[#3 Removal] = 0:18-0:22
+ >----<
+0| func foo(aaa: Int, bbb: Int = 0) {}
+
+[#3 Leading delimiter] = 0:18-0:19
+ >-<
+0| func foo(aaa: Int, bbb: Int = 0) {}
+
+[#3 Domain] = 0:19-0:31
+ >------------<
+0| func foo(aaa: Int, bbb: Int = 0) {}
+
+[#3 Insertion delimiter] = " "
diff --git a/resources/fixtures/scopes/swift/name/name.assignment.compound.scope b/resources/fixtures/scopes/swift/name/name.assignment.compound.scope
new file mode 100644
index 0000000000..443bb5b0a3
--- /dev/null
+++ b/resources/fixtures/scopes/swift/name/name.assignment.compound.scope
@@ -0,0 +1,20 @@
+foo += 0
+---
+
+[Content] = 0:0-0:3
+ >---<
+0| foo += 0
+
+[Removal] = 0:0-0:4
+ >----<
+0| foo += 0
+
+[Trailing delimiter] = 0:3-0:4
+ >-<
+0| foo += 0
+
+[Domain] = 0:0-0:8
+ >--------<
+0| foo += 0
+
+[Insertion delimiter] = " "
diff --git a/resources/fixtures/scopes/swift/name/name.assignment.destructuring.scope b/resources/fixtures/scopes/swift/name/name.assignment.destructuring.scope
new file mode 100644
index 0000000000..64188e3a7a
--- /dev/null
+++ b/resources/fixtures/scopes/swift/name/name.assignment.destructuring.scope
@@ -0,0 +1,20 @@
+(foo, bar) = (0, 1)
+---
+
+[Content] = 0:0-0:10
+ >----------<
+0| (foo, bar) = (0, 1)
+
+[Removal] = 0:0-0:11
+ >-----------<
+0| (foo, bar) = (0, 1)
+
+[Trailing delimiter] = 0:10-0:11
+ >-<
+0| (foo, bar) = (0, 1)
+
+[Domain] = 0:0-0:19
+ >-------------------<
+0| (foo, bar) = (0, 1)
+
+[Insertion delimiter] = " "
diff --git a/resources/fixtures/scopes/swift/name/name.assignment.scope b/resources/fixtures/scopes/swift/name/name.assignment.scope
new file mode 100644
index 0000000000..ccbd90c654
--- /dev/null
+++ b/resources/fixtures/scopes/swift/name/name.assignment.scope
@@ -0,0 +1,20 @@
+foo = 0
+---
+
+[Content] = 0:0-0:3
+ >---<
+0| foo = 0
+
+[Removal] = 0:0-0:4
+ >----<
+0| foo = 0
+
+[Trailing delimiter] = 0:3-0:4
+ >-<
+0| foo = 0
+
+[Domain] = 0:0-0:7
+ >-------<
+0| foo = 0
+
+[Insertion delimiter] = " "
diff --git a/resources/fixtures/scopes/swift/name/name.class.scope b/resources/fixtures/scopes/swift/name/name.class.scope
new file mode 100644
index 0000000000..211086562c
--- /dev/null
+++ b/resources/fixtures/scopes/swift/name/name.class.scope
@@ -0,0 +1,24 @@
+class Foo {}
+---
+
+[Content] = 0:6-0:9
+ >---<
+0| class Foo {}
+
+[Removal] = 0:6-0:10
+ >----<
+0| class Foo {}
+
+[Leading delimiter] = 0:5-0:6
+ >-<
+0| class Foo {}
+
+[Trailing delimiter] = 0:9-0:10
+ >-<
+0| class Foo {}
+
+[Domain] = 0:0-0:12
+ >------------<
+0| class Foo {}
+
+[Insertion delimiter] = " "
diff --git a/resources/fixtures/scopes/swift/name/name.constant.scope b/resources/fixtures/scopes/swift/name/name.constant.scope
new file mode 100644
index 0000000000..07ca5d9f60
--- /dev/null
+++ b/resources/fixtures/scopes/swift/name/name.constant.scope
@@ -0,0 +1,24 @@
+let foo = 0
+---
+
+[Content] = 0:4-0:7
+ >---<
+0| let foo = 0
+
+[Removal] = 0:4-0:8
+ >----<
+0| let foo = 0
+
+[Leading delimiter] = 0:3-0:4
+ >-<
+0| let foo = 0
+
+[Trailing delimiter] = 0:7-0:8
+ >-<
+0| let foo = 0
+
+[Domain] = 0:0-0:11
+ >-----------<
+0| let foo = 0
+
+[Insertion delimiter] = " "
diff --git a/resources/fixtures/scopes/swift/name/name.constructor.scope b/resources/fixtures/scopes/swift/name/name.constructor.scope
new file mode 100644
index 0000000000..2be5987c57
--- /dev/null
+++ b/resources/fixtures/scopes/swift/name/name.constructor.scope
@@ -0,0 +1,45 @@
+struct Foo {
+ init() {}
+}
+---
+
+[#1 Content] = 0:7-0:10
+ >---<
+0| struct Foo {
+
+[#1 Removal] = 0:7-0:11
+ >----<
+0| struct Foo {
+
+[#1 Leading delimiter] = 0:6-0:7
+ >-<
+0| struct Foo {
+
+[#1 Trailing delimiter] = 0:10-0:11
+ >-<
+0| struct Foo {
+
+[#1 Domain] = 0:0-2:1
+ >------------
+0| struct Foo {
+1| init() {}
+2| }
+ -<
+
+[#1 Insertion delimiter] = " "
+
+
+[#2 Content] =
+[#2 Removal] = 1:2-1:6
+ >----<
+1| init() {}
+
+[#2 Leading delimiter] = 1:0-1:2
+ >--<
+1| init() {}
+
+[#2 Domain] = 1:2-1:11
+ >---------<
+1| init() {}
+
+[#2 Insertion delimiter] = " "
diff --git a/resources/fixtures/scopes/swift/name/name.enum.scope b/resources/fixtures/scopes/swift/name/name.enum.scope
new file mode 100644
index 0000000000..09d2849071
--- /dev/null
+++ b/resources/fixtures/scopes/swift/name/name.enum.scope
@@ -0,0 +1,24 @@
+enum Foo {}
+---
+
+[Content] = 0:5-0:8
+ >---<
+0| enum Foo {}
+
+[Removal] = 0:5-0:9
+ >----<
+0| enum Foo {}
+
+[Leading delimiter] = 0:4-0:5
+ >-<
+0| enum Foo {}
+
+[Trailing delimiter] = 0:8-0:9
+ >-<
+0| enum Foo {}
+
+[Domain] = 0:0-0:11
+ >-----------<
+0| enum Foo {}
+
+[Insertion delimiter] = " "
diff --git a/resources/fixtures/scopes/swift/name/name.field.class.scope b/resources/fixtures/scopes/swift/name/name.field.class.scope
new file mode 100644
index 0000000000..acc2e9ccca
--- /dev/null
+++ b/resources/fixtures/scopes/swift/name/name.field.class.scope
@@ -0,0 +1,69 @@
+struct Foo {
+ var bar: Int
+ var baz: Int = 0
+}
+---
+
+[#1 Content] = 0:7-0:10
+ >---<
+0| struct Foo {
+
+[#1 Removal] = 0:7-0:11
+ >----<
+0| struct Foo {
+
+[#1 Leading delimiter] = 0:6-0:7
+ >-<
+0| struct Foo {
+
+[#1 Trailing delimiter] = 0:10-0:11
+ >-<
+0| struct Foo {
+
+[#1 Domain] = 0:0-3:1
+ >------------
+0| struct Foo {
+1| var bar: Int
+2| var baz: Int = 0
+3| }
+ -<
+
+[#1 Insertion delimiter] = " "
+
+
+[#2 Content] = 1:8-1:11
+ >---<
+1| var bar: Int
+
+[#2 Removal] = 1:7-1:11
+ >----<
+1| var bar: Int
+
+[#2 Leading delimiter] = 1:7-1:8
+ >-<
+1| var bar: Int
+
+[#2 Domain] = 1:4-1:16
+ >------------<
+1| var bar: Int
+
+[#2 Insertion delimiter] = " "
+
+
+[#3 Content] = 2:8-2:11
+ >---<
+2| var baz: Int = 0
+
+[#3 Removal] = 2:7-2:11
+ >----<
+2| var baz: Int = 0
+
+[#3 Leading delimiter] = 2:7-2:8
+ >-<
+2| var baz: Int = 0
+
+[#3 Domain] = 2:4-2:20
+ >----------------<
+2| var baz: Int = 0
+
+[#3 Insertion delimiter] = " "
diff --git a/resources/fixtures/scopes/swift/name/name.field.enum.scope b/resources/fixtures/scopes/swift/name/name.field.enum.scope
new file mode 100644
index 0000000000..620d0d31c3
--- /dev/null
+++ b/resources/fixtures/scopes/swift/name/name.field.enum.scope
@@ -0,0 +1,73 @@
+enum Foo: Int {
+ case bar = 0
+ case baz = 1
+}
+---
+
+[#1 Content] = 0:5-0:8
+ >---<
+0| enum Foo: Int {
+
+[#1 Removal] = 0:4-0:8
+ >----<
+0| enum Foo: Int {
+
+[#1 Leading delimiter] = 0:4-0:5
+ >-<
+0| enum Foo: Int {
+
+[#1 Domain] = 0:0-3:1
+ >---------------
+0| enum Foo: Int {
+1| case bar = 0
+2| case baz = 1
+3| }
+ -<
+
+[#1 Insertion delimiter] = " "
+
+
+[#2 Content] = 1:7-1:10
+ >---<
+1| case bar = 0
+
+[#2 Removal] = 1:7-1:11
+ >----<
+1| case bar = 0
+
+[#2 Leading delimiter] = 1:6-1:7
+ >-<
+1| case bar = 0
+
+[#2 Trailing delimiter] = 1:10-1:11
+ >-<
+1| case bar = 0
+
+[#2 Domain] = 1:2-1:14
+ >------------<
+1| case bar = 0
+
+[#2 Insertion delimiter] = " "
+
+
+[#3 Content] = 2:7-2:10
+ >---<
+2| case baz = 1
+
+[#3 Removal] = 2:7-2:11
+ >----<
+2| case baz = 1
+
+[#3 Leading delimiter] = 2:6-2:7
+ >-<
+2| case baz = 1
+
+[#3 Trailing delimiter] = 2:10-2:11
+ >-<
+2| case baz = 1
+
+[#3 Domain] = 2:2-2:14
+ >------------<
+2| case baz = 1
+
+[#3 Insertion delimiter] = " "
diff --git a/resources/fixtures/scopes/swift/name/name.field.interface.scope b/resources/fixtures/scopes/swift/name/name.field.interface.scope
new file mode 100644
index 0000000000..79748a14dd
--- /dev/null
+++ b/resources/fixtures/scopes/swift/name/name.field.interface.scope
@@ -0,0 +1,48 @@
+protocol Foo {
+ var bar: Int { get set }
+}
+---
+
+[#1 Content] = 0:9-0:12
+ >---<
+0| protocol Foo {
+
+[#1 Removal] = 0:9-0:13
+ >----<
+0| protocol Foo {
+
+[#1 Leading delimiter] = 0:8-0:9
+ >-<
+0| protocol Foo {
+
+[#1 Trailing delimiter] = 0:12-0:13
+ >-<
+0| protocol Foo {
+
+[#1 Domain] = 0:0-2:1
+ >--------------
+0| protocol Foo {
+1| var bar: Int { get set }
+2| }
+ -<
+
+[#1 Insertion delimiter] = " "
+
+
+[#2 Content] = 1:6-1:9
+ >---<
+1| var bar: Int { get set }
+
+[#2 Removal] = 1:5-1:9
+ >----<
+1| var bar: Int { get set }
+
+[#2 Leading delimiter] = 1:5-1:6
+ >-<
+1| var bar: Int { get set }
+
+[#2 Domain] = 1:2-1:26
+ >------------------------<
+1| var bar: Int { get set }
+
+[#2 Insertion delimiter] = " "
diff --git a/resources/fixtures/scopes/swift/name/name.foreach.scope b/resources/fixtures/scopes/swift/name/name.foreach.scope
new file mode 100644
index 0000000000..76a1dd8dda
--- /dev/null
+++ b/resources/fixtures/scopes/swift/name/name.foreach.scope
@@ -0,0 +1,24 @@
+for v in values {}
+---
+
+[Content] = 0:4-0:5
+ >-<
+0| for v in values {}
+
+[Removal] = 0:4-0:6
+ >--<
+0| for v in values {}
+
+[Leading delimiter] = 0:3-0:4
+ >-<
+0| for v in values {}
+
+[Trailing delimiter] = 0:5-0:6
+ >-<
+0| for v in values {}
+
+[Domain] = 0:0-0:18
+ >------------------<
+0| for v in values {}
+
+[Insertion delimiter] = " "
diff --git a/resources/fixtures/scopes/swift/name/name.function.scope b/resources/fixtures/scopes/swift/name/name.function.scope
new file mode 100644
index 0000000000..d9a1dd759b
--- /dev/null
+++ b/resources/fixtures/scopes/swift/name/name.function.scope
@@ -0,0 +1,17 @@
+func foo() {}
+---
+
+[Content] =
+[Removal] = 0:5-0:8
+ >---<
+0| func foo() {}
+
+[Leading delimiter] = 0:4-0:5
+ >-<
+0| func foo() {}
+
+[Domain] = 0:0-0:13
+ >-------------<
+0| func foo() {}
+
+[Insertion delimiter] = " "
diff --git a/resources/fixtures/scopes/swift/name/name.interface.scope b/resources/fixtures/scopes/swift/name/name.interface.scope
new file mode 100644
index 0000000000..6327dc4e46
--- /dev/null
+++ b/resources/fixtures/scopes/swift/name/name.interface.scope
@@ -0,0 +1,24 @@
+protocol Foo {}
+---
+
+[Content] = 0:9-0:12
+ >---<
+0| protocol Foo {}
+
+[Removal] = 0:9-0:13
+ >----<
+0| protocol Foo {}
+
+[Leading delimiter] = 0:8-0:9
+ >-<
+0| protocol Foo {}
+
+[Trailing delimiter] = 0:12-0:13
+ >-<
+0| protocol Foo {}
+
+[Domain] = 0:0-0:15
+ >---------------<
+0| protocol Foo {}
+
+[Insertion delimiter] = " "
diff --git a/resources/fixtures/scopes/swift/name/name.iteration.block.scope b/resources/fixtures/scopes/swift/name/name.iteration.block.scope
new file mode 100644
index 0000000000..fd2ecf6f7a
--- /dev/null
+++ b/resources/fixtures/scopes/swift/name/name.iteration.block.scope
@@ -0,0 +1,27 @@
+struct Foo {
+ func bar() { }
+}
+---
+
+[#1 Content] =
+[#1 Domain] = 0:0-2:1
+ >------------
+0| struct Foo {
+1| func bar() { }
+2| }
+ -<
+
+
+[#2 Content] =
+[#2 Domain] = 0:12-2:0
+ >
+0| struct Foo {
+1| func bar() { }
+2| }
+ <
+
+
+[#3 Content] =
+[#3 Domain] = 1:16-1:17
+ >-<
+1| func bar() { }
diff --git a/resources/fixtures/scopes/swift/name/name.iteration.block2.scope b/resources/fixtures/scopes/swift/name/name.iteration.block2.scope
new file mode 100644
index 0000000000..eb1487158f
--- /dev/null
+++ b/resources/fixtures/scopes/swift/name/name.iteration.block2.scope
@@ -0,0 +1,13 @@
+func foo() { }
+---
+
+[#1 Content] =
+[#1 Domain] = 0:0-0:14
+ >--------------<
+0| func foo() { }
+
+
+[#2 Content] =
+[#2 Domain] = 0:12-0:13
+ >-<
+0| func foo() { }
diff --git a/resources/fixtures/scopes/swift/name/name.iteration.block3.scope b/resources/fixtures/scopes/swift/name/name.iteration.block3.scope
new file mode 100644
index 0000000000..0ffb1c499a
--- /dev/null
+++ b/resources/fixtures/scopes/swift/name/name.iteration.block3.scope
@@ -0,0 +1,30 @@
+if true { }
+else if false { }
+else { }
+---
+
+[#1 Content] =
+[#1 Domain] = 0:0-2:8
+ >-----------
+0| if true { }
+1| else if false { }
+2| else { }
+ --------<
+
+
+[#2 Content] =
+[#2 Domain] = 0:9-0:10
+ >-<
+0| if true { }
+
+
+[#3 Content] =
+[#3 Domain] = 1:15-1:16
+ >-<
+1| else if false { }
+
+
+[#4 Content] =
+[#4 Domain] = 2:6-2:7
+ >-<
+2| else { }
diff --git a/resources/fixtures/scopes/swift/name/name.iteration.block4.scope b/resources/fixtures/scopes/swift/name/name.iteration.block4.scope
new file mode 100644
index 0000000000..e7b3236d45
--- /dev/null
+++ b/resources/fixtures/scopes/swift/name/name.iteration.block4.scope
@@ -0,0 +1,13 @@
+while true { }
+---
+
+[#1 Content] =
+[#1 Domain] = 0:0-0:14
+ >--------------<
+0| while true { }
+
+
+[#2 Content] =
+[#2 Domain] = 0:12-0:13
+ >-<
+0| while true { }
diff --git a/resources/fixtures/scopes/swift/name/name.iteration.class.scope b/resources/fixtures/scopes/swift/name/name.iteration.class.scope
new file mode 100644
index 0000000000..a3ec5f3456
--- /dev/null
+++ b/resources/fixtures/scopes/swift/name/name.iteration.class.scope
@@ -0,0 +1,13 @@
+class Foo { }
+---
+
+[#1 Content] =
+[#1 Domain] = 0:0-0:13
+ >-------------<
+0| class Foo { }
+
+
+[#2 Content] =
+[#2 Domain] = 0:11-0:12
+ >-<
+0| class Foo { }
diff --git a/resources/fixtures/scopes/swift/name/name.iteration.document.scope b/resources/fixtures/scopes/swift/name/name.iteration.document.scope
new file mode 100644
index 0000000000..ab3e11e7af
--- /dev/null
+++ b/resources/fixtures/scopes/swift/name/name.iteration.document.scope
@@ -0,0 +1,14 @@
+
+let foo = 0
+let bar = 1
+
+---
+
+[Content] =
+[Domain] = 0:0-3:0
+ >
+0|
+1| let foo = 0
+2| let bar = 1
+3|
+ <
diff --git a/resources/fixtures/scopes/swift/name/name.iteration.enum.scope b/resources/fixtures/scopes/swift/name/name.iteration.enum.scope
new file mode 100644
index 0000000000..9034c4ee11
--- /dev/null
+++ b/resources/fixtures/scopes/swift/name/name.iteration.enum.scope
@@ -0,0 +1,13 @@
+enum Foo { }
+---
+
+[#1 Content] =
+[#1 Domain] = 0:0-0:12
+ >------------<
+0| enum Foo { }
+
+
+[#2 Content] =
+[#2 Domain] = 0:10-0:11
+ >-<
+0| enum Foo { }
diff --git a/resources/fixtures/scopes/swift/name/name.iteration.interface.scope b/resources/fixtures/scopes/swift/name/name.iteration.interface.scope
new file mode 100644
index 0000000000..7db5025f1b
--- /dev/null
+++ b/resources/fixtures/scopes/swift/name/name.iteration.interface.scope
@@ -0,0 +1,13 @@
+protocol Foo { }
+---
+
+[#1 Content] =
+[#1 Domain] = 0:0-0:16
+ >----------------<
+0| protocol Foo { }
+
+
+[#2 Content] =
+[#2 Domain] = 0:14-0:15
+ >-<
+0| protocol Foo { }
diff --git a/resources/fixtures/scopes/swift/name/name.method.interface.scope b/resources/fixtures/scopes/swift/name/name.method.interface.scope
new file mode 100644
index 0000000000..2ac409a430
--- /dev/null
+++ b/resources/fixtures/scopes/swift/name/name.method.interface.scope
@@ -0,0 +1,45 @@
+protocol Foo {
+ func bar()
+}
+---
+
+[#1 Content] = 0:9-0:12
+ >---<
+0| protocol Foo {
+
+[#1 Removal] = 0:9-0:13
+ >----<
+0| protocol Foo {
+
+[#1 Leading delimiter] = 0:8-0:9
+ >-<
+0| protocol Foo {
+
+[#1 Trailing delimiter] = 0:12-0:13
+ >-<
+0| protocol Foo {
+
+[#1 Domain] = 0:0-2:1
+ >--------------
+0| protocol Foo {
+1| func bar()
+2| }
+ -<
+
+[#1 Insertion delimiter] = " "
+
+
+[#2 Content] =
+[#2 Removal] = 1:7-1:10
+ >---<
+1| func bar()
+
+[#2 Leading delimiter] = 1:6-1:7
+ >-<
+1| func bar()
+
+[#2 Domain] = 1:2-1:12
+ >----------<
+1| func bar()
+
+[#2 Insertion delimiter] = " "
diff --git a/resources/fixtures/scopes/swift/name/name.method.scope b/resources/fixtures/scopes/swift/name/name.method.scope
new file mode 100644
index 0000000000..4d07fa559a
--- /dev/null
+++ b/resources/fixtures/scopes/swift/name/name.method.scope
@@ -0,0 +1,45 @@
+struct Foo {
+ func bar() {}
+}
+---
+
+[#1 Content] = 0:7-0:10
+ >---<
+0| struct Foo {
+
+[#1 Removal] = 0:7-0:11
+ >----<
+0| struct Foo {
+
+[#1 Leading delimiter] = 0:6-0:7
+ >-<
+0| struct Foo {
+
+[#1 Trailing delimiter] = 0:10-0:11
+ >-<
+0| struct Foo {
+
+[#1 Domain] = 0:0-2:1
+ >------------
+0| struct Foo {
+1| func bar() {}
+2| }
+ -<
+
+[#1 Insertion delimiter] = " "
+
+
+[#2 Content] =
+[#2 Removal] = 1:7-1:10
+ >---<
+1| func bar() {}
+
+[#2 Leading delimiter] = 1:6-1:7
+ >-<
+1| func bar() {}
+
+[#2 Domain] = 1:2-1:15
+ >-------------<
+1| func bar() {}
+
+[#2 Insertion delimiter] = " "
diff --git a/resources/fixtures/scopes/swift/name/name.typeAlias.scope b/resources/fixtures/scopes/swift/name/name.typeAlias.scope
new file mode 100644
index 0000000000..e6d5f7655f
--- /dev/null
+++ b/resources/fixtures/scopes/swift/name/name.typeAlias.scope
@@ -0,0 +1,24 @@
+typealias Foo = Int
+---
+
+[Content] = 0:10-0:13
+ >---<
+0| typealias Foo = Int
+
+[Removal] = 0:10-0:14
+ >----<
+0| typealias Foo = Int
+
+[Leading delimiter] = 0:9-0:10
+ >-<
+0| typealias Foo = Int
+
+[Trailing delimiter] = 0:13-0:14
+ >-<
+0| typealias Foo = Int
+
+[Domain] = 0:0-0:19
+ >-------------------<
+0| typealias Foo = Int
+
+[Insertion delimiter] = " "
diff --git a/resources/fixtures/scopes/swift/name/name.variable.destructuring.scope b/resources/fixtures/scopes/swift/name/name.variable.destructuring.scope
new file mode 100644
index 0000000000..4441500242
--- /dev/null
+++ b/resources/fixtures/scopes/swift/name/name.variable.destructuring.scope
@@ -0,0 +1,24 @@
+let (foo, bar) = (0, 1)
+---
+
+[Content] = 0:4-0:14
+ >----------<
+0| let (foo, bar) = (0, 1)
+
+[Removal] = 0:4-0:15
+ >-----------<
+0| let (foo, bar) = (0, 1)
+
+[Leading delimiter] = 0:3-0:4
+ >-<
+0| let (foo, bar) = (0, 1)
+
+[Trailing delimiter] = 0:14-0:15
+ >-<
+0| let (foo, bar) = (0, 1)
+
+[Domain] = 0:0-0:23
+ >-----------------------<
+0| let (foo, bar) = (0, 1)
+
+[Insertion delimiter] = " "
diff --git a/resources/fixtures/scopes/swift/name/name.variable.initialized.scope b/resources/fixtures/scopes/swift/name/name.variable.initialized.scope
new file mode 100644
index 0000000000..1cd9475d1d
--- /dev/null
+++ b/resources/fixtures/scopes/swift/name/name.variable.initialized.scope
@@ -0,0 +1,24 @@
+var foo = 0
+---
+
+[Content] = 0:4-0:7
+ >---<
+0| var foo = 0
+
+[Removal] = 0:4-0:8
+ >----<
+0| var foo = 0
+
+[Leading delimiter] = 0:3-0:4
+ >-<
+0| var foo = 0
+
+[Trailing delimiter] = 0:7-0:8
+ >-<
+0| var foo = 0
+
+[Domain] = 0:0-0:11
+ >-----------<
+0| var foo = 0
+
+[Insertion delimiter] = " "
diff --git a/resources/fixtures/scopes/swift/name/name.variable.uninitialized.scope b/resources/fixtures/scopes/swift/name/name.variable.uninitialized.scope
new file mode 100644
index 0000000000..aadb078077
--- /dev/null
+++ b/resources/fixtures/scopes/swift/name/name.variable.uninitialized.scope
@@ -0,0 +1,20 @@
+var foo: Int
+---
+
+[Content] = 0:4-0:7
+ >---<
+0| var foo: Int
+
+[Removal] = 0:3-0:7
+ >----<
+0| var foo: Int
+
+[Leading delimiter] = 0:3-0:4
+ >-<
+0| var foo: Int
+
+[Domain] = 0:0-0:12
+ >------------<
+0| var foo: Int
+
+[Insertion delimiter] = " "
diff --git a/resources/fixtures/scopes/swift/namedFunction/namedFunction.constructor.scope b/resources/fixtures/scopes/swift/namedFunction/namedFunction.constructor.scope
new file mode 100644
index 0000000000..6ec4d8e822
--- /dev/null
+++ b/resources/fixtures/scopes/swift/namedFunction/namedFunction.constructor.scope
@@ -0,0 +1,21 @@
+struct Foo {
+ init() {}
+}
+---
+
+[Content] =
+[Domain] = 1:2-1:11
+ >---------<
+1| init() {}
+
+[Removal] = 1:0-2:0
+ >-----------
+1| init() {}
+2| }
+ <
+
+[Leading delimiter] = 1:0-1:2
+ >--<
+1| init() {}
+
+[Insertion delimiter] = "\n\n"
diff --git a/resources/fixtures/scopes/swift/namedFunction/namedFunction.iteration.class.scope b/resources/fixtures/scopes/swift/namedFunction/namedFunction.iteration.class.scope
new file mode 100644
index 0000000000..10699070e9
--- /dev/null
+++ b/resources/fixtures/scopes/swift/namedFunction/namedFunction.iteration.class.scope
@@ -0,0 +1,13 @@
+struct Foo { }
+---
+
+[#1 Content] =
+[#1 Domain] = 0:0-0:14
+ >--------------<
+0| struct Foo { }
+
+
+[#2 Content] =
+[#2 Domain] = 0:12-0:13
+ >-<
+0| struct Foo { }
diff --git a/resources/fixtures/scopes/swift/namedFunction/namedFunction.iteration.document.scope b/resources/fixtures/scopes/swift/namedFunction/namedFunction.iteration.document.scope
new file mode 100644
index 0000000000..46eb837954
--- /dev/null
+++ b/resources/fixtures/scopes/swift/namedFunction/namedFunction.iteration.document.scope
@@ -0,0 +1,12 @@
+
+func foo() {}
+
+---
+
+[Content] =
+[Domain] = 0:0-2:0
+ >
+0|
+1| func foo() {}
+2|
+ <
diff --git a/resources/fixtures/scopes/swift/namedFunction/namedFunction.method.scope b/resources/fixtures/scopes/swift/namedFunction/namedFunction.method.scope
new file mode 100644
index 0000000000..aa9dcbf1e7
--- /dev/null
+++ b/resources/fixtures/scopes/swift/namedFunction/namedFunction.method.scope
@@ -0,0 +1,21 @@
+struct Foo {
+ func bar() {}
+}
+---
+
+[Content] =
+[Domain] = 1:2-1:15
+ >-------------<
+1| func bar() {}
+
+[Removal] = 1:0-2:0
+ >---------------
+1| func bar() {}
+2| }
+ <
+
+[Leading delimiter] = 1:0-1:2
+ >--<
+1| func bar() {}
+
+[Insertion delimiter] = "\n\n"
diff --git a/resources/fixtures/scopes/swift/namedFunction/namedFunction.scope b/resources/fixtures/scopes/swift/namedFunction/namedFunction.scope
new file mode 100644
index 0000000000..73d215f7eb
--- /dev/null
+++ b/resources/fixtures/scopes/swift/namedFunction/namedFunction.scope
@@ -0,0 +1,10 @@
+func foo() {}
+---
+
+[Content] =
+[Removal] =
+[Domain] = 0:0-0:13
+ >-------------<
+0| func foo() {}
+
+[Insertion delimiter] = "\n\n"
diff --git a/resources/fixtures/scopes/swift/regularExpression.scope b/resources/fixtures/scopes/swift/regularExpression.scope
new file mode 100644
index 0000000000..baee4f3624
--- /dev/null
+++ b/resources/fixtures/scopes/swift/regularExpression.scope
@@ -0,0 +1,10 @@
+/\d+$/
+---
+
+[Content] =
+[Removal] =
+[Domain] = 0:0-0:6
+ >------<
+0| /\d+$/
+
+[Insertion delimiter] = " "
diff --git a/resources/fixtures/scopes/swift/statement/statement.assignment.compound.scope b/resources/fixtures/scopes/swift/statement/statement.assignment.compound.scope
new file mode 100644
index 0000000000..b8bce690bc
--- /dev/null
+++ b/resources/fixtures/scopes/swift/statement/statement.assignment.compound.scope
@@ -0,0 +1,10 @@
+foo += 0
+---
+
+[Content] =
+[Removal] =
+[Domain] = 0:0-0:8
+ >--------<
+0| foo += 0
+
+[Insertion delimiter] = "\n"
diff --git a/resources/fixtures/scopes/swift/statement/statement.assignment.destructuring.scope b/resources/fixtures/scopes/swift/statement/statement.assignment.destructuring.scope
new file mode 100644
index 0000000000..7fb478aaa2
--- /dev/null
+++ b/resources/fixtures/scopes/swift/statement/statement.assignment.destructuring.scope
@@ -0,0 +1,10 @@
+(foo, bar) = (0, 1)
+---
+
+[Content] =
+[Removal] =
+[Domain] = 0:0-0:19
+ >-------------------<
+0| (foo, bar) = (0, 1)
+
+[Insertion delimiter] = "\n"
diff --git a/resources/fixtures/scopes/swift/statement/statement.assignment.scope b/resources/fixtures/scopes/swift/statement/statement.assignment.scope
new file mode 100644
index 0000000000..acdb2b1498
--- /dev/null
+++ b/resources/fixtures/scopes/swift/statement/statement.assignment.scope
@@ -0,0 +1,10 @@
+foo = 0
+---
+
+[Content] =
+[Removal] =
+[Domain] = 0:0-0:7
+ >-------<
+0| foo = 0
+
+[Insertion delimiter] = "\n"
diff --git a/resources/fixtures/scopes/swift/statement/statement.break.scope b/resources/fixtures/scopes/swift/statement/statement.break.scope
new file mode 100644
index 0000000000..28b797eae4
--- /dev/null
+++ b/resources/fixtures/scopes/swift/statement/statement.break.scope
@@ -0,0 +1,33 @@
+while true {
+ break
+}
+---
+
+[#1 Content] =
+[#1 Removal] =
+[#1 Domain] = 0:0-2:1
+ >------------
+0| while true {
+1| break
+2| }
+ -<
+
+[#1 Insertion delimiter] = "\n"
+
+
+[#2 Content] =
+[#2 Domain] = 1:4-1:9
+ >-----<
+1| break
+
+[#2 Removal] = 1:0-2:0
+ >---------
+1| break
+2| }
+ <
+
+[#2 Leading delimiter] = 1:0-1:4
+ >----<
+1| break
+
+[#2 Insertion delimiter] = "\n"
diff --git a/resources/fixtures/scopes/swift/statement/statement.class.scope b/resources/fixtures/scopes/swift/statement/statement.class.scope
new file mode 100644
index 0000000000..a6008d311f
--- /dev/null
+++ b/resources/fixtures/scopes/swift/statement/statement.class.scope
@@ -0,0 +1,10 @@
+class Foo {}
+---
+
+[Content] =
+[Removal] =
+[Domain] = 0:0-0:12
+ >------------<
+0| class Foo {}
+
+[Insertion delimiter] = "\n"
diff --git a/resources/fixtures/scopes/swift/statement/statement.constant.scope b/resources/fixtures/scopes/swift/statement/statement.constant.scope
new file mode 100644
index 0000000000..837abc1652
--- /dev/null
+++ b/resources/fixtures/scopes/swift/statement/statement.constant.scope
@@ -0,0 +1,10 @@
+let foo = 0
+---
+
+[Content] =
+[Removal] =
+[Domain] = 0:0-0:11
+ >-----------<
+0| let foo = 0
+
+[Insertion delimiter] = "\n"
diff --git a/resources/fixtures/scopes/swift/statement/statement.constructor.scope b/resources/fixtures/scopes/swift/statement/statement.constructor.scope
new file mode 100644
index 0000000000..078e314d6a
--- /dev/null
+++ b/resources/fixtures/scopes/swift/statement/statement.constructor.scope
@@ -0,0 +1,33 @@
+struct Foo {
+ init() {}
+}
+---
+
+[#1 Content] =
+[#1 Removal] =
+[#1 Domain] = 0:0-2:1
+ >------------
+0| struct Foo {
+1| init() {}
+2| }
+ -<
+
+[#1 Insertion delimiter] = "\n"
+
+
+[#2 Content] =
+[#2 Domain] = 1:2-1:11
+ >---------<
+1| init() {}
+
+[#2 Removal] = 1:0-2:0
+ >-----------
+1| init() {}
+2| }
+ <
+
+[#2 Leading delimiter] = 1:0-1:2
+ >--<
+1| init() {}
+
+[#2 Insertion delimiter] = "\n"
diff --git a/resources/fixtures/scopes/swift/statement/statement.continue.scope b/resources/fixtures/scopes/swift/statement/statement.continue.scope
new file mode 100644
index 0000000000..aed5ce8033
--- /dev/null
+++ b/resources/fixtures/scopes/swift/statement/statement.continue.scope
@@ -0,0 +1,33 @@
+while true {
+ continue
+}
+---
+
+[#1 Content] =
+[#1 Removal] =
+[#1 Domain] = 0:0-2:1
+ >------------
+0| while true {
+1| continue
+2| }
+ -<
+
+[#1 Insertion delimiter] = "\n"
+
+
+[#2 Content] =
+[#2 Domain] = 1:4-1:12
+ >--------<
+1| continue
+
+[#2 Removal] = 1:0-2:0
+ >------------
+1| continue
+2| }
+ <
+
+[#2 Leading delimiter] = 1:0-1:4
+ >----<
+1| continue
+
+[#2 Insertion delimiter] = "\n"
diff --git a/resources/fixtures/scopes/swift/statement/statement.doWhile.scope b/resources/fixtures/scopes/swift/statement/statement.doWhile.scope
new file mode 100644
index 0000000000..94a69ac137
--- /dev/null
+++ b/resources/fixtures/scopes/swift/statement/statement.doWhile.scope
@@ -0,0 +1,10 @@
+repeat {} while foo
+---
+
+[Content] =
+[Removal] =
+[Domain] = 0:0-0:19
+ >-------------------<
+0| repeat {} while foo
+
+[Insertion delimiter] = "\n"
diff --git a/resources/fixtures/scopes/swift/statement/statement.enum.scope b/resources/fixtures/scopes/swift/statement/statement.enum.scope
new file mode 100644
index 0000000000..88dd9cd028
--- /dev/null
+++ b/resources/fixtures/scopes/swift/statement/statement.enum.scope
@@ -0,0 +1,10 @@
+enum Foo {}
+---
+
+[Content] =
+[Removal] =
+[Domain] = 0:0-0:11
+ >-----------<
+0| enum Foo {}
+
+[Insertion delimiter] = "\n"
diff --git a/resources/fixtures/scopes/swift/statement/statement.field.class.scope b/resources/fixtures/scopes/swift/statement/statement.field.class.scope
new file mode 100644
index 0000000000..a84287473b
--- /dev/null
+++ b/resources/fixtures/scopes/swift/statement/statement.field.class.scope
@@ -0,0 +1,33 @@
+struct Foo {
+ var bar = 0
+}
+---
+
+[#1 Content] =
+[#1 Removal] =
+[#1 Domain] = 0:0-2:1
+ >------------
+0| struct Foo {
+1| var bar = 0
+2| }
+ -<
+
+[#1 Insertion delimiter] = "\n"
+
+
+[#2 Content] =
+[#2 Domain] = 1:2-1:13
+ >-----------<
+1| var bar = 0
+
+[#2 Removal] = 1:0-2:0
+ >-------------
+1| var bar = 0
+2| }
+ <
+
+[#2 Leading delimiter] = 1:0-1:2
+ >--<
+1| var bar = 0
+
+[#2 Insertion delimiter] = "\n"
diff --git a/resources/fixtures/scopes/swift/statement/statement.field.interface.scope b/resources/fixtures/scopes/swift/statement/statement.field.interface.scope
new file mode 100644
index 0000000000..b1180b554a
--- /dev/null
+++ b/resources/fixtures/scopes/swift/statement/statement.field.interface.scope
@@ -0,0 +1,33 @@
+protocol Foo {
+ var bar: Int { get set }
+}
+---
+
+[#1 Content] =
+[#1 Removal] =
+[#1 Domain] = 0:0-2:1
+ >--------------
+0| protocol Foo {
+1| var bar: Int { get set }
+2| }
+ -<
+
+[#1 Insertion delimiter] = "\n"
+
+
+[#2 Content] =
+[#2 Domain] = 1:2-1:26
+ >------------------------<
+1| var bar: Int { get set }
+
+[#2 Removal] = 1:0-2:0
+ >--------------------------
+1| var bar: Int { get set }
+2| }
+ <
+
+[#2 Leading delimiter] = 1:0-1:2
+ >--<
+1| var bar: Int { get set }
+
+[#2 Insertion delimiter] = "\n"
diff --git a/resources/fixtures/scopes/swift/statement/statement.foreach.scope b/resources/fixtures/scopes/swift/statement/statement.foreach.scope
new file mode 100644
index 0000000000..823a899261
--- /dev/null
+++ b/resources/fixtures/scopes/swift/statement/statement.foreach.scope
@@ -0,0 +1,10 @@
+for v in values {}
+---
+
+[Content] =
+[Removal] =
+[Domain] = 0:0-0:18
+ >------------------<
+0| for v in values {}
+
+[Insertion delimiter] = "\n"
diff --git a/resources/fixtures/scopes/swift/statement/statement.function.scope b/resources/fixtures/scopes/swift/statement/statement.function.scope
new file mode 100644
index 0000000000..118724d315
--- /dev/null
+++ b/resources/fixtures/scopes/swift/statement/statement.function.scope
@@ -0,0 +1,10 @@
+func foo() {}
+---
+
+[Content] =
+[Removal] =
+[Domain] = 0:0-0:13
+ >-------------<
+0| func foo() {}
+
+[Insertion delimiter] = "\n"
diff --git a/resources/fixtures/scopes/swift/statement/statement.functionCall.scope b/resources/fixtures/scopes/swift/statement/statement.functionCall.scope
new file mode 100644
index 0000000000..fb55b4580a
--- /dev/null
+++ b/resources/fixtures/scopes/swift/statement/statement.functionCall.scope
@@ -0,0 +1,10 @@
+foo()
+---
+
+[Content] =
+[Removal] =
+[Domain] = 0:0-0:5
+ >-----<
+0| foo()
+
+[Insertion delimiter] = "\n"
diff --git a/resources/fixtures/scopes/swift/statement/statement.if.scope b/resources/fixtures/scopes/swift/statement/statement.if.scope
new file mode 100644
index 0000000000..e0d492e889
--- /dev/null
+++ b/resources/fixtures/scopes/swift/statement/statement.if.scope
@@ -0,0 +1,15 @@
+if true {}
+else if false {}
+else {}
+---
+
+[Content] =
+[Removal] =
+[Domain] = 0:0-2:7
+ >----------
+0| if true {}
+1| else if false {}
+2| else {}
+ -------<
+
+[Insertion delimiter] = "\n"
diff --git a/resources/fixtures/scopes/swift/statement/statement.import.scope b/resources/fixtures/scopes/swift/statement/statement.import.scope
new file mode 100644
index 0000000000..26c78c04aa
--- /dev/null
+++ b/resources/fixtures/scopes/swift/statement/statement.import.scope
@@ -0,0 +1,10 @@
+import Foo
+---
+
+[Content] =
+[Removal] =
+[Domain] = 0:0-0:10
+ >----------<
+0| import Foo
+
+[Insertion delimiter] = "\n"
diff --git a/resources/fixtures/scopes/swift/statement/statement.interface.scope b/resources/fixtures/scopes/swift/statement/statement.interface.scope
new file mode 100644
index 0000000000..ea6dad63a6
--- /dev/null
+++ b/resources/fixtures/scopes/swift/statement/statement.interface.scope
@@ -0,0 +1,10 @@
+protocol Foo {}
+---
+
+[Content] =
+[Removal] =
+[Domain] = 0:0-0:15
+ >---------------<
+0| protocol Foo {}
+
+[Insertion delimiter] = "\n"
diff --git a/resources/fixtures/scopes/swift/statement/statement.iteration.block.scope b/resources/fixtures/scopes/swift/statement/statement.iteration.block.scope
new file mode 100644
index 0000000000..fd2ecf6f7a
--- /dev/null
+++ b/resources/fixtures/scopes/swift/statement/statement.iteration.block.scope
@@ -0,0 +1,27 @@
+struct Foo {
+ func bar() { }
+}
+---
+
+[#1 Content] =
+[#1 Domain] = 0:0-2:1
+ >------------
+0| struct Foo {
+1| func bar() { }
+2| }
+ -<
+
+
+[#2 Content] =
+[#2 Domain] = 0:12-2:0
+ >
+0| struct Foo {
+1| func bar() { }
+2| }
+ <
+
+
+[#3 Content] =
+[#3 Domain] = 1:16-1:17
+ >-<
+1| func bar() { }
diff --git a/resources/fixtures/scopes/swift/statement/statement.iteration.block2.scope b/resources/fixtures/scopes/swift/statement/statement.iteration.block2.scope
new file mode 100644
index 0000000000..eb1487158f
--- /dev/null
+++ b/resources/fixtures/scopes/swift/statement/statement.iteration.block2.scope
@@ -0,0 +1,13 @@
+func foo() { }
+---
+
+[#1 Content] =
+[#1 Domain] = 0:0-0:14
+ >--------------<
+0| func foo() { }
+
+
+[#2 Content] =
+[#2 Domain] = 0:12-0:13
+ >-<
+0| func foo() { }
diff --git a/resources/fixtures/scopes/swift/statement/statement.iteration.block3.scope b/resources/fixtures/scopes/swift/statement/statement.iteration.block3.scope
new file mode 100644
index 0000000000..0ffb1c499a
--- /dev/null
+++ b/resources/fixtures/scopes/swift/statement/statement.iteration.block3.scope
@@ -0,0 +1,30 @@
+if true { }
+else if false { }
+else { }
+---
+
+[#1 Content] =
+[#1 Domain] = 0:0-2:8
+ >-----------
+0| if true { }
+1| else if false { }
+2| else { }
+ --------<
+
+
+[#2 Content] =
+[#2 Domain] = 0:9-0:10
+ >-<
+0| if true { }
+
+
+[#3 Content] =
+[#3 Domain] = 1:15-1:16
+ >-<
+1| else if false { }
+
+
+[#4 Content] =
+[#4 Domain] = 2:6-2:7
+ >-<
+2| else { }
diff --git a/resources/fixtures/scopes/swift/statement/statement.iteration.block4.scope b/resources/fixtures/scopes/swift/statement/statement.iteration.block4.scope
new file mode 100644
index 0000000000..e7b3236d45
--- /dev/null
+++ b/resources/fixtures/scopes/swift/statement/statement.iteration.block4.scope
@@ -0,0 +1,13 @@
+while true { }
+---
+
+[#1 Content] =
+[#1 Domain] = 0:0-0:14
+ >--------------<
+0| while true { }
+
+
+[#2 Content] =
+[#2 Domain] = 0:12-0:13
+ >-<
+0| while true { }
diff --git a/resources/fixtures/scopes/swift/statement/statement.iteration.class.scope b/resources/fixtures/scopes/swift/statement/statement.iteration.class.scope
new file mode 100644
index 0000000000..a3ec5f3456
--- /dev/null
+++ b/resources/fixtures/scopes/swift/statement/statement.iteration.class.scope
@@ -0,0 +1,13 @@
+class Foo { }
+---
+
+[#1 Content] =
+[#1 Domain] = 0:0-0:13
+ >-------------<
+0| class Foo { }
+
+
+[#2 Content] =
+[#2 Domain] = 0:11-0:12
+ >-<
+0| class Foo { }
diff --git a/resources/fixtures/scopes/swift/statement/statement.iteration.document.scope b/resources/fixtures/scopes/swift/statement/statement.iteration.document.scope
new file mode 100644
index 0000000000..54abd7726c
--- /dev/null
+++ b/resources/fixtures/scopes/swift/statement/statement.iteration.document.scope
@@ -0,0 +1,12 @@
+
+var foo: Int
+
+---
+
+[Content] =
+[Domain] = 0:0-2:0
+ >
+0|
+1| var foo: Int
+2|
+ <
diff --git a/resources/fixtures/scopes/swift/statement/statement.iteration.interface.scope b/resources/fixtures/scopes/swift/statement/statement.iteration.interface.scope
new file mode 100644
index 0000000000..7db5025f1b
--- /dev/null
+++ b/resources/fixtures/scopes/swift/statement/statement.iteration.interface.scope
@@ -0,0 +1,13 @@
+protocol Foo { }
+---
+
+[#1 Content] =
+[#1 Domain] = 0:0-0:16
+ >----------------<
+0| protocol Foo { }
+
+
+[#2 Content] =
+[#2 Domain] = 0:14-0:15
+ >-<
+0| protocol Foo { }
diff --git a/resources/fixtures/scopes/swift/statement/statement.method.interface.scope b/resources/fixtures/scopes/swift/statement/statement.method.interface.scope
new file mode 100644
index 0000000000..5f58bf8606
--- /dev/null
+++ b/resources/fixtures/scopes/swift/statement/statement.method.interface.scope
@@ -0,0 +1,33 @@
+protocol Foo {
+ func bar()
+}
+---
+
+[#1 Content] =
+[#1 Removal] =
+[#1 Domain] = 0:0-2:1
+ >--------------
+0| protocol Foo {
+1| func bar()
+2| }
+ -<
+
+[#1 Insertion delimiter] = "\n"
+
+
+[#2 Content] =
+[#2 Domain] = 1:2-1:12
+ >----------<
+1| func bar()
+
+[#2 Removal] = 1:0-2:0
+ >------------
+1| func bar()
+2| }
+ <
+
+[#2 Leading delimiter] = 1:0-1:2
+ >--<
+1| func bar()
+
+[#2 Insertion delimiter] = "\n"
diff --git a/resources/fixtures/scopes/swift/statement/statement.method.scope b/resources/fixtures/scopes/swift/statement/statement.method.scope
new file mode 100644
index 0000000000..339299f8ca
--- /dev/null
+++ b/resources/fixtures/scopes/swift/statement/statement.method.scope
@@ -0,0 +1,33 @@
+struct Foo {
+ func bar() {}
+}
+---
+
+[#1 Content] =
+[#1 Removal] =
+[#1 Domain] = 0:0-2:1
+ >------------
+0| struct Foo {
+1| func bar() {}
+2| }
+ -<
+
+[#1 Insertion delimiter] = "\n"
+
+
+[#2 Content] =
+[#2 Domain] = 1:2-1:15
+ >-------------<
+1| func bar() {}
+
+[#2 Removal] = 1:0-2:0
+ >---------------
+1| func bar() {}
+2| }
+ <
+
+[#2 Leading delimiter] = 1:0-1:2
+ >--<
+1| func bar() {}
+
+[#2 Insertion delimiter] = "\n"
diff --git a/resources/fixtures/scopes/swift/statement/statement.return.scope b/resources/fixtures/scopes/swift/statement/statement.return.scope
new file mode 100644
index 0000000000..3645950693
--- /dev/null
+++ b/resources/fixtures/scopes/swift/statement/statement.return.scope
@@ -0,0 +1,33 @@
+func foo() {
+ return 0
+}
+---
+
+[#1 Content] =
+[#1 Removal] =
+[#1 Domain] = 0:0-2:1
+ >------------
+0| func foo() {
+1| return 0
+2| }
+ -<
+
+[#1 Insertion delimiter] = "\n"
+
+
+[#2 Content] =
+[#2 Domain] = 1:4-1:12
+ >--------<
+1| return 0
+
+[#2 Removal] = 1:0-2:0
+ >------------
+1| return 0
+2| }
+ <
+
+[#2 Leading delimiter] = 1:0-1:4
+ >----<
+1| return 0
+
+[#2 Insertion delimiter] = "\n"
diff --git a/resources/fixtures/scopes/swift/statement/statement.switch.scope b/resources/fixtures/scopes/swift/statement/statement.switch.scope
new file mode 100644
index 0000000000..88ba119033
--- /dev/null
+++ b/resources/fixtures/scopes/swift/statement/statement.switch.scope
@@ -0,0 +1,10 @@
+switch value {}
+---
+
+[Content] =
+[Removal] =
+[Domain] = 0:0-0:15
+ >---------------<
+0| switch value {}
+
+[Insertion delimiter] = "\n"
diff --git a/resources/fixtures/scopes/swift/statement/statement.throw.scope b/resources/fixtures/scopes/swift/statement/statement.throw.scope
new file mode 100644
index 0000000000..bd051cdf16
--- /dev/null
+++ b/resources/fixtures/scopes/swift/statement/statement.throw.scope
@@ -0,0 +1,33 @@
+func foo() throws {
+ throw Error
+}
+---
+
+[#1 Content] =
+[#1 Removal] =
+[#1 Domain] = 0:0-2:1
+ >-------------------
+0| func foo() throws {
+1| throw Error
+2| }
+ -<
+
+[#1 Insertion delimiter] = "\n"
+
+
+[#2 Content] =
+[#2 Domain] = 1:4-1:15
+ >-----------<
+1| throw Error
+
+[#2 Removal] = 1:0-2:0
+ >---------------
+1| throw Error
+2| }
+ <
+
+[#2 Leading delimiter] = 1:0-1:4
+ >----<
+1| throw Error
+
+[#2 Insertion delimiter] = "\n"
diff --git a/resources/fixtures/scopes/swift/statement/statement.try.scope b/resources/fixtures/scopes/swift/statement/statement.try.scope
new file mode 100644
index 0000000000..1105e8f94f
--- /dev/null
+++ b/resources/fixtures/scopes/swift/statement/statement.try.scope
@@ -0,0 +1,13 @@
+do {}
+catch {}
+---
+
+[Content] =
+[Removal] =
+[Domain] = 0:0-1:8
+ >-----
+0| do {}
+1| catch {}
+ --------<
+
+[Insertion delimiter] = "\n"
diff --git a/resources/fixtures/scopes/swift/statement/statement.typeAlias.scope b/resources/fixtures/scopes/swift/statement/statement.typeAlias.scope
new file mode 100644
index 0000000000..3d8aef8034
--- /dev/null
+++ b/resources/fixtures/scopes/swift/statement/statement.typeAlias.scope
@@ -0,0 +1,10 @@
+typealias Foo = Int
+---
+
+[Content] =
+[Removal] =
+[Domain] = 0:0-0:19
+ >-------------------<
+0| typealias Foo = Int
+
+[Insertion delimiter] = "\n"
diff --git a/resources/fixtures/scopes/swift/statement/statement.variable.destructuring.scope b/resources/fixtures/scopes/swift/statement/statement.variable.destructuring.scope
new file mode 100644
index 0000000000..ab68eacf01
--- /dev/null
+++ b/resources/fixtures/scopes/swift/statement/statement.variable.destructuring.scope
@@ -0,0 +1,10 @@
+let (foo, bar) = (0, 1)
+---
+
+[Content] =
+[Removal] =
+[Domain] = 0:0-0:23
+ >-----------------------<
+0| let (foo, bar) = (0, 1)
+
+[Insertion delimiter] = "\n"
diff --git a/resources/fixtures/scopes/swift/statement/statement.variable.initialized.scope b/resources/fixtures/scopes/swift/statement/statement.variable.initialized.scope
new file mode 100644
index 0000000000..4934548475
--- /dev/null
+++ b/resources/fixtures/scopes/swift/statement/statement.variable.initialized.scope
@@ -0,0 +1,10 @@
+var foo = 0
+---
+
+[Content] =
+[Removal] =
+[Domain] = 0:0-0:11
+ >-----------<
+0| var foo = 0
+
+[Insertion delimiter] = "\n"
diff --git a/resources/fixtures/scopes/swift/statement/statement.variable.uninitialized.scope b/resources/fixtures/scopes/swift/statement/statement.variable.uninitialized.scope
new file mode 100644
index 0000000000..0c4f8800bd
--- /dev/null
+++ b/resources/fixtures/scopes/swift/statement/statement.variable.uninitialized.scope
@@ -0,0 +1,10 @@
+var foo: Int
+---
+
+[Content] =
+[Removal] =
+[Domain] = 0:0-0:12
+ >------------<
+0| var foo: Int
+
+[Insertion delimiter] = "\n"
diff --git a/resources/fixtures/scopes/swift/statement/statement.while.scope b/resources/fixtures/scopes/swift/statement/statement.while.scope
new file mode 100644
index 0000000000..fbccae0780
--- /dev/null
+++ b/resources/fixtures/scopes/swift/statement/statement.while.scope
@@ -0,0 +1,10 @@
+while true {}
+---
+
+[Content] =
+[Removal] =
+[Domain] = 0:0-0:13
+ >-------------<
+0| while true {}
+
+[Insertion delimiter] = "\n"
diff --git a/resources/fixtures/scopes/swift/statement/statement.yield.scope b/resources/fixtures/scopes/swift/statement/statement.yield.scope
new file mode 100644
index 0000000000..289f80ddc8
--- /dev/null
+++ b/resources/fixtures/scopes/swift/statement/statement.yield.scope
@@ -0,0 +1,60 @@
+var foo: Int {
+ _read {
+ yield 0
+ }
+}
+---
+
+[#1 Content] =
+[#1 Removal] =
+[#1 Domain] = 0:0-4:1
+ >--------------
+0| var foo: Int {
+1| _read {
+2| yield 0
+3| }
+4| }
+ -<
+
+[#1 Insertion delimiter] = "\n"
+
+
+[#2 Content] =
+[#2 Domain] = 1:4-3:5
+ >-------
+1| _read {
+2| yield 0
+3| }
+ -----<
+
+[#2 Removal] = 1:0-4:0
+ >-----------
+1| _read {
+2| yield 0
+3| }
+4| }
+ <
+
+[#2 Leading delimiter] = 1:0-1:4
+ >----<
+1| _read {
+
+[#2 Insertion delimiter] = "\n"
+
+
+[#3 Content] =
+[#3 Domain] = 2:8-2:15
+ >-------<
+2| yield 0
+
+[#3 Removal] = 2:0-3:0
+ >---------------
+2| yield 0
+3| }
+ <
+
+[#3 Leading delimiter] = 2:0-2:8
+ >--------<
+2| yield 0
+
+[#3 Insertion delimiter] = "\n"
diff --git a/resources/fixtures/scopes/swift/string.multiLine.scope b/resources/fixtures/scopes/swift/string.multiLine.scope
new file mode 100644
index 0000000000..322d7a6860
--- /dev/null
+++ b/resources/fixtures/scopes/swift/string.multiLine.scope
@@ -0,0 +1,17 @@
+"""
+Hello
+world
+"""
+---
+
+[Content] =
+[Removal] =
+[Domain] = 0:0-3:3
+ >---
+0| """
+1| Hello
+2| world
+3| """
+ ---<
+
+[Insertion delimiter] = " "
diff --git a/resources/fixtures/scopes/swift/string.singleLine.scope b/resources/fixtures/scopes/swift/string.singleLine.scope
new file mode 100644
index 0000000000..4b26cf31b3
--- /dev/null
+++ b/resources/fixtures/scopes/swift/string.singleLine.scope
@@ -0,0 +1,10 @@
+"Hello world"
+---
+
+[Content] =
+[Removal] =
+[Domain] = 0:0-0:13
+ >-------------<
+0| "Hello world"
+
+[Insertion delimiter] = " "
diff --git a/resources/fixtures/scopes/swift/string.singleLine2.scope b/resources/fixtures/scopes/swift/string.singleLine2.scope
new file mode 100644
index 0000000000..daad707e18
--- /dev/null
+++ b/resources/fixtures/scopes/swift/string.singleLine2.scope
@@ -0,0 +1,10 @@
+#"Hello world"#
+---
+
+[Content] =
+[Removal] =
+[Domain] = 0:0-0:15
+ >---------------<
+0| #"Hello world"#
+
+[Insertion delimiter] = " "
diff --git a/resources/fixtures/scopes/swift/textFragment/textFragment.comment.block.scope b/resources/fixtures/scopes/swift/textFragment/textFragment.comment.block.scope
new file mode 100644
index 0000000000..af33f95d00
--- /dev/null
+++ b/resources/fixtures/scopes/swift/textFragment/textFragment.comment.block.scope
@@ -0,0 +1,10 @@
+/* Hello world */
+---
+
+[Content] =
+[Removal] =
+[Domain] = 0:0-0:17
+ >-----------------<
+0| /* Hello world */
+
+[Insertion delimiter] = " "
diff --git a/resources/fixtures/scopes/swift/textFragment/textFragment.comment.line.scope b/resources/fixtures/scopes/swift/textFragment/textFragment.comment.line.scope
new file mode 100644
index 0000000000..6758f81490
--- /dev/null
+++ b/resources/fixtures/scopes/swift/textFragment/textFragment.comment.line.scope
@@ -0,0 +1,10 @@
+// Hello world
+---
+
+[Content] =
+[Removal] =
+[Domain] = 0:0-0:14
+ >--------------<
+0| // Hello world
+
+[Insertion delimiter] = " "
diff --git a/resources/fixtures/scopes/swift/textFragment/textFragment.regularExpression.scope b/resources/fixtures/scopes/swift/textFragment/textFragment.regularExpression.scope
new file mode 100644
index 0000000000..c8c2a5013d
--- /dev/null
+++ b/resources/fixtures/scopes/swift/textFragment/textFragment.regularExpression.scope
@@ -0,0 +1,10 @@
+/\d+$/
+---
+
+[Content] =
+[Removal] =
+[Domain] = 0:1-0:5
+ >----<
+0| /\d+$/
+
+[Insertion delimiter] = " "
diff --git a/resources/fixtures/scopes/swift/textFragment/textFragment.string.multiLine.scope b/resources/fixtures/scopes/swift/textFragment/textFragment.string.multiLine.scope
new file mode 100644
index 0000000000..a5531210d9
--- /dev/null
+++ b/resources/fixtures/scopes/swift/textFragment/textFragment.string.multiLine.scope
@@ -0,0 +1,17 @@
+"""
+Hello
+world
+"""
+---
+
+[Content] =
+[Removal] =
+[Domain] = 0:3-3:0
+ >
+0| """
+1| Hello
+2| world
+3| """
+ <
+
+[Insertion delimiter] = " "
diff --git a/resources/fixtures/scopes/swift/textFragment/textFragment.string.singleLine.scope b/resources/fixtures/scopes/swift/textFragment/textFragment.string.singleLine.scope
new file mode 100644
index 0000000000..85dcf5fa7f
--- /dev/null
+++ b/resources/fixtures/scopes/swift/textFragment/textFragment.string.singleLine.scope
@@ -0,0 +1,10 @@
+"Hello world"
+---
+
+[Content] =
+[Removal] =
+[Domain] = 0:1-0:12
+ >-----------<
+0| "Hello world"
+
+[Insertion delimiter] = " "
diff --git a/resources/fixtures/scopes/swift/textFragment/textFragment.string.singleLine2.scope b/resources/fixtures/scopes/swift/textFragment/textFragment.string.singleLine2.scope
new file mode 100644
index 0000000000..c6a28ce2a4
--- /dev/null
+++ b/resources/fixtures/scopes/swift/textFragment/textFragment.string.singleLine2.scope
@@ -0,0 +1,10 @@
+#"Hello world"#
+---
+
+[Content] =
+[Removal] =
+[Domain] = 0:2-0:13
+ >-----------<
+0| #"Hello world"#
+
+[Insertion delimiter] = " "
diff --git a/resources/fixtures/scopes/swift/textFragment/textFragment.string.singleLine3.scope b/resources/fixtures/scopes/swift/textFragment/textFragment.string.singleLine3.scope
new file mode 100644
index 0000000000..2f778e88bd
--- /dev/null
+++ b/resources/fixtures/scopes/swift/textFragment/textFragment.string.singleLine3.scope
@@ -0,0 +1,10 @@
+###"Hello world"###
+---
+
+[Content] =
+[Removal] =
+[Domain] = 0:4-0:15
+ >-----------<
+0| ###"Hello world"###
+
+[Insertion delimiter] = " "
diff --git a/resources/fixtures/scopes/swift/type/type.alias.scope b/resources/fixtures/scopes/swift/type/type.alias.scope
new file mode 100644
index 0000000000..6509f283b1
--- /dev/null
+++ b/resources/fixtures/scopes/swift/type/type.alias.scope
@@ -0,0 +1,10 @@
+typealias Foo = Int
+---
+
+[Content] =
+[Removal] =
+[Domain] = 0:0-0:19
+ >-------------------<
+0| typealias Foo = Int
+
+[Insertion delimiter] = " "
diff --git a/resources/fixtures/scopes/swift/type/type.argument.catch.scope b/resources/fixtures/scopes/swift/type/type.argument.catch.scope
new file mode 100644
index 0000000000..6f75d60964
--- /dev/null
+++ b/resources/fixtures/scopes/swift/type/type.argument.catch.scope
@@ -0,0 +1,25 @@
+do {}
+catch let e as Error {}
+---
+
+[Content] = 1:15-1:20
+ >-----<
+1| catch let e as Error {}
+
+[Removal] = 1:15-1:21
+ >------<
+1| catch let e as Error {}
+
+[Leading delimiter] = 1:14-1:15
+ >-<
+1| catch let e as Error {}
+
+[Trailing delimiter] = 1:20-1:21
+ >-<
+1| catch let e as Error {}
+
+[Domain] = 1:6-1:20
+ >--------------<
+1| catch let e as Error {}
+
+[Insertion delimiter] = " "
diff --git a/resources/fixtures/scopes/swift/type/type.argument.formal.constructor.iteration.scope b/resources/fixtures/scopes/swift/type/type.argument.formal.constructor.iteration.scope
new file mode 100644
index 0000000000..eb9d3a4746
--- /dev/null
+++ b/resources/fixtures/scopes/swift/type/type.argument.formal.constructor.iteration.scope
@@ -0,0 +1,27 @@
+struct Foo {
+ init(aaa: Int, bbb: Int = 0) {}
+}
+---
+
+[#1 Content] =
+[#1 Domain] = 0:0-2:1
+ >------------
+0| struct Foo {
+1| init(aaa: Int, bbb: Int = 0) {}
+2| }
+ -<
+
+
+[#2 Content] =
+[#2 Domain] = 0:12-2:0
+ >
+0| struct Foo {
+1| init(aaa: Int, bbb: Int = 0) {}
+2| }
+ <
+
+
+[#3 Content] =
+[#3 Domain] = 1:9-1:31
+ >----------------------<
+1| init(aaa: Int, bbb: Int = 0) {}
diff --git a/resources/fixtures/scopes/swift/type/type.argument.formal.constructor.scope b/resources/fixtures/scopes/swift/type/type.argument.formal.constructor.scope
new file mode 100644
index 0000000000..5d621b860d
--- /dev/null
+++ b/resources/fixtures/scopes/swift/type/type.argument.formal.constructor.scope
@@ -0,0 +1,53 @@
+struct Foo {
+ init(aaa: Int, bbb: Int = 0) {}
+}
+---
+
+[#1 Content] =
+[#1 Removal] =
+[#1 Domain] = 0:0-2:1
+ >------------
+0| struct Foo {
+1| init(aaa: Int, bbb: Int = 0) {}
+2| }
+ -<
+
+[#1 Insertion delimiter] = " "
+
+
+[#2 Content] = 1:14-1:17
+ >---<
+1| init(aaa: Int, bbb: Int = 0) {}
+
+[#2 Removal] = 1:12-1:17
+ >-----<
+1| init(aaa: Int, bbb: Int = 0) {}
+
+[#2 Leading delimiter] = 1:12-1:14
+ >--<
+1| init(aaa: Int, bbb: Int = 0) {}
+
+[#2 Domain] = 1:9-1:17
+ >--------<
+1| init(aaa: Int, bbb: Int = 0) {}
+
+[#2 Insertion delimiter] = " "
+
+
+[#3 Content] = 1:24-1:27
+ >---<
+1| init(aaa: Int, bbb: Int = 0) {}
+
+[#3 Removal] = 1:22-1:27
+ >-----<
+1| init(aaa: Int, bbb: Int = 0) {}
+
+[#3 Leading delimiter] = 1:22-1:24
+ >--<
+1| init(aaa: Int, bbb: Int = 0) {}
+
+[#3 Domain] = 1:19-1:31
+ >------------<
+1| init(aaa: Int, bbb: Int = 0) {}
+
+[#3 Insertion delimiter] = " "
diff --git a/resources/fixtures/scopes/swift/type/type.argument.formal.iteration.scope b/resources/fixtures/scopes/swift/type/type.argument.formal.iteration.scope
new file mode 100644
index 0000000000..46db93737a
--- /dev/null
+++ b/resources/fixtures/scopes/swift/type/type.argument.formal.iteration.scope
@@ -0,0 +1,13 @@
+func foo(aaa: Int, bbb: Int = 0) {}
+---
+
+[#1 Content] =
+[#1 Domain] = 0:0-0:35
+ >-----------------------------------<
+0| func foo(aaa: Int, bbb: Int = 0) {}
+
+
+[#2 Content] =
+[#2 Domain] = 0:9-0:31
+ >----------------------<
+0| func foo(aaa: Int, bbb: Int = 0) {}
diff --git a/resources/fixtures/scopes/swift/type/type.argument.formal.lambda.iteration.scope b/resources/fixtures/scopes/swift/type/type.argument.formal.lambda.iteration.scope
new file mode 100644
index 0000000000..49babe6ec2
--- /dev/null
+++ b/resources/fixtures/scopes/swift/type/type.argument.formal.lambda.iteration.scope
@@ -0,0 +1,13 @@
+{ (aaa: Int, bbb: Int) in }
+---
+
+[#1 Content] =
+[#1 Domain] = 0:0-0:27
+ >---------------------------<
+0| { (aaa: Int, bbb: Int) in }
+
+
+[#2 Content] =
+[#2 Domain] = 0:3-0:21
+ >------------------<
+0| { (aaa: Int, bbb: Int) in }
diff --git a/resources/fixtures/scopes/swift/type/type.argument.formal.lambda.scope b/resources/fixtures/scopes/swift/type/type.argument.formal.lambda.scope
new file mode 100644
index 0000000000..4bddf99f5f
--- /dev/null
+++ b/resources/fixtures/scopes/swift/type/type.argument.formal.lambda.scope
@@ -0,0 +1,33 @@
+{ (aaa: Int, bbb: Int) in }
+---
+
+[#1 Content] =
+[#1 Domain] = 0:8-0:11
+ >---<
+0| { (aaa: Int, bbb: Int) in }
+
+[#1 Removal] = 0:6-0:11
+ >-----<
+0| { (aaa: Int, bbb: Int) in }
+
+[#1 Leading delimiter] = 0:6-0:8
+ >--<
+0| { (aaa: Int, bbb: Int) in }
+
+[#1 Insertion delimiter] = " "
+
+
+[#2 Content] =
+[#2 Domain] = 0:18-0:21
+ >---<
+0| { (aaa: Int, bbb: Int) in }
+
+[#2 Removal] = 0:16-0:21
+ >-----<
+0| { (aaa: Int, bbb: Int) in }
+
+[#2 Leading delimiter] = 0:16-0:18
+ >--<
+0| { (aaa: Int, bbb: Int) in }
+
+[#2 Insertion delimiter] = " "
diff --git a/resources/fixtures/scopes/swift/type/type.argument.formal.method.iteration.scope b/resources/fixtures/scopes/swift/type/type.argument.formal.method.iteration.scope
new file mode 100644
index 0000000000..4f21aa2787
--- /dev/null
+++ b/resources/fixtures/scopes/swift/type/type.argument.formal.method.iteration.scope
@@ -0,0 +1,27 @@
+struct Foo {
+ func bar(aaa: Int, bbb: Int = 0) {}
+}
+---
+
+[#1 Content] =
+[#1 Domain] = 0:0-2:1
+ >------------
+0| struct Foo {
+1| func bar(aaa: Int, bbb: Int = 0) {}
+2| }
+ -<
+
+
+[#2 Content] =
+[#2 Domain] = 0:12-2:0
+ >
+0| struct Foo {
+1| func bar(aaa: Int, bbb: Int = 0) {}
+2| }
+ <
+
+
+[#3 Content] =
+[#3 Domain] = 1:13-1:35
+ >----------------------<
+1| func bar(aaa: Int, bbb: Int = 0) {}
diff --git a/resources/fixtures/scopes/swift/type/type.argument.formal.method.scope b/resources/fixtures/scopes/swift/type/type.argument.formal.method.scope
new file mode 100644
index 0000000000..ba7353120d
--- /dev/null
+++ b/resources/fixtures/scopes/swift/type/type.argument.formal.method.scope
@@ -0,0 +1,53 @@
+struct Foo {
+ func bar(aaa: Int, bbb: Int = 0) {}
+}
+---
+
+[#1 Content] =
+[#1 Removal] =
+[#1 Domain] = 0:0-2:1
+ >------------
+0| struct Foo {
+1| func bar(aaa: Int, bbb: Int = 0) {}
+2| }
+ -<
+
+[#1 Insertion delimiter] = " "
+
+
+[#2 Content] = 1:18-1:21
+ >---<
+1| func bar(aaa: Int, bbb: Int = 0) {}
+
+[#2 Removal] = 1:16-1:21
+ >-----<
+1| func bar(aaa: Int, bbb: Int = 0) {}
+
+[#2 Leading delimiter] = 1:16-1:18
+ >--<
+1| func bar(aaa: Int, bbb: Int = 0) {}
+
+[#2 Domain] = 1:13-1:21
+ >--------<
+1| func bar(aaa: Int, bbb: Int = 0) {}
+
+[#2 Insertion delimiter] = " "
+
+
+[#3 Content] = 1:28-1:31
+ >---<
+1| func bar(aaa: Int, bbb: Int = 0) {}
+
+[#3 Removal] = 1:26-1:31
+ >-----<
+1| func bar(aaa: Int, bbb: Int = 0) {}
+
+[#3 Leading delimiter] = 1:26-1:28
+ >--<
+1| func bar(aaa: Int, bbb: Int = 0) {}
+
+[#3 Domain] = 1:23-1:35
+ >------------<
+1| func bar(aaa: Int, bbb: Int = 0) {}
+
+[#3 Insertion delimiter] = " "
diff --git a/resources/fixtures/scopes/swift/type/type.argument.formal.scope b/resources/fixtures/scopes/swift/type/type.argument.formal.scope
new file mode 100644
index 0000000000..18bbe43646
--- /dev/null
+++ b/resources/fixtures/scopes/swift/type/type.argument.formal.scope
@@ -0,0 +1,39 @@
+func foo(aaa: Int, bbb: Int = 0) {}
+---
+
+[#1 Content] = 0:14-0:17
+ >---<
+0| func foo(aaa: Int, bbb: Int = 0) {}
+
+[#1 Removal] = 0:12-0:17
+ >-----<
+0| func foo(aaa: Int, bbb: Int = 0) {}
+
+[#1 Leading delimiter] = 0:12-0:14
+ >--<
+0| func foo(aaa: Int, bbb: Int = 0) {}
+
+[#1 Domain] = 0:9-0:17
+ >--------<
+0| func foo(aaa: Int, bbb: Int = 0) {}
+
+[#1 Insertion delimiter] = " "
+
+
+[#2 Content] = 0:24-0:27
+ >---<
+0| func foo(aaa: Int, bbb: Int = 0) {}
+
+[#2 Removal] = 0:22-0:27
+ >-----<
+0| func foo(aaa: Int, bbb: Int = 0) {}
+
+[#2 Leading delimiter] = 0:22-0:24
+ >--<
+0| func foo(aaa: Int, bbb: Int = 0) {}
+
+[#2 Domain] = 0:19-0:31
+ >------------<
+0| func foo(aaa: Int, bbb: Int = 0) {}
+
+[#2 Insertion delimiter] = " "
diff --git a/resources/fixtures/scopes/swift/type/type.cast.scope b/resources/fixtures/scopes/swift/type/type.cast.scope
new file mode 100644
index 0000000000..db48958a91
--- /dev/null
+++ b/resources/fixtures/scopes/swift/type/type.cast.scope
@@ -0,0 +1,20 @@
+foo as Int
+---
+
+[Content] = 0:7-0:10
+ >---<
+0| foo as Int
+
+[Removal] = 0:3-0:10
+ >-------<
+0| foo as Int
+
+[Leading delimiter] = 0:3-0:7
+ >----<
+0| foo as Int
+
+[Domain] = 0:0-0:10
+ >----------<
+0| foo as Int
+
+[Insertion delimiter] = " "
diff --git a/resources/fixtures/scopes/swift/type/type.class.scope b/resources/fixtures/scopes/swift/type/type.class.scope
new file mode 100644
index 0000000000..b23e5da403
--- /dev/null
+++ b/resources/fixtures/scopes/swift/type/type.class.scope
@@ -0,0 +1,10 @@
+class Foo: Bar {}
+---
+
+[Content] =
+[Removal] =
+[Domain] = 0:0-0:17
+ >-----------------<
+0| class Foo: Bar {}
+
+[Insertion delimiter] = " "
diff --git a/resources/fixtures/scopes/swift/type/type.constant.scope b/resources/fixtures/scopes/swift/type/type.constant.scope
new file mode 100644
index 0000000000..2e5df8e802
--- /dev/null
+++ b/resources/fixtures/scopes/swift/type/type.constant.scope
@@ -0,0 +1,20 @@
+let foo: Int = 0
+---
+
+[Content] = 0:9-0:12
+ >---<
+0| let foo: Int = 0
+
+[Removal] = 0:7-0:12
+ >-----<
+0| let foo: Int = 0
+
+[Leading delimiter] = 0:7-0:9
+ >--<
+0| let foo: Int = 0
+
+[Domain] = 0:0-0:16
+ >----------------<
+0| let foo: Int = 0
+
+[Insertion delimiter] = " "
diff --git a/resources/fixtures/scopes/swift/type/type.enum.scope b/resources/fixtures/scopes/swift/type/type.enum.scope
new file mode 100644
index 0000000000..70c26e7b58
--- /dev/null
+++ b/resources/fixtures/scopes/swift/type/type.enum.scope
@@ -0,0 +1,10 @@
+enum Foo {}
+---
+
+[Content] =
+[Removal] =
+[Domain] = 0:0-0:11
+ >-----------<
+0| enum Foo {}
+
+[Insertion delimiter] = " "
diff --git a/resources/fixtures/scopes/swift/type/type.field.class.scope b/resources/fixtures/scopes/swift/type/type.field.class.scope
new file mode 100644
index 0000000000..815f507020
--- /dev/null
+++ b/resources/fixtures/scopes/swift/type/type.field.class.scope
@@ -0,0 +1,55 @@
+struct Foo {
+ var bar: Int
+ var baz: Int = 0
+}
+---
+
+[#1 Content] =
+[#1 Removal] =
+[#1 Domain] = 0:0-3:1
+ >------------
+0| struct Foo {
+1| var bar: Int
+2| var baz: Int = 0
+3| }
+ -<
+
+[#1 Insertion delimiter] = " "
+
+
+[#2 Content] = 1:13-1:16
+ >---<
+1| var bar: Int
+
+[#2 Removal] = 1:11-1:16
+ >-----<
+1| var bar: Int
+
+[#2 Leading delimiter] = 1:11-1:13
+ >--<
+1| var bar: Int
+
+[#2 Domain] = 1:4-1:16
+ >------------<
+1| var bar: Int
+
+[#2 Insertion delimiter] = " "
+
+
+[#3 Content] = 2:13-2:16
+ >---<
+2| var baz: Int = 0
+
+[#3 Removal] = 2:11-2:16
+ >-----<
+2| var baz: Int = 0
+
+[#3 Leading delimiter] = 2:11-2:13
+ >--<
+2| var baz: Int = 0
+
+[#3 Domain] = 2:4-2:20
+ >----------------<
+2| var baz: Int = 0
+
+[#3 Insertion delimiter] = " "
diff --git a/resources/fixtures/scopes/swift/type/type.field.interface.scope b/resources/fixtures/scopes/swift/type/type.field.interface.scope
new file mode 100644
index 0000000000..48767adca8
--- /dev/null
+++ b/resources/fixtures/scopes/swift/type/type.field.interface.scope
@@ -0,0 +1,34 @@
+protocol Foo {
+ var foo: Int { get set }
+}
+---
+
+[#1 Content] =
+[#1 Removal] =
+[#1 Domain] = 0:0-2:1
+ >--------------
+0| protocol Foo {
+1| var foo: Int { get set }
+2| }
+ -<
+
+[#1 Insertion delimiter] = " "
+
+
+[#2 Content] = 1:13-1:16
+ >---<
+1| var foo: Int { get set }
+
+[#2 Removal] = 1:11-1:16
+ >-----<
+1| var foo: Int { get set }
+
+[#2 Leading delimiter] = 1:11-1:13
+ >--<
+1| var foo: Int { get set }
+
+[#2 Domain] = 1:4-1:28
+ >------------------------<
+1| var foo: Int { get set }
+
+[#2 Insertion delimiter] = " "
diff --git a/resources/fixtures/scopes/swift/type/type.foreach.scope b/resources/fixtures/scopes/swift/type/type.foreach.scope
new file mode 100644
index 0000000000..dc72384111
--- /dev/null
+++ b/resources/fixtures/scopes/swift/type/type.foreach.scope
@@ -0,0 +1,20 @@
+for v: Int in values {}
+---
+
+[Content] = 0:7-0:10
+ >---<
+0| for v: Int in values {}
+
+[Removal] = 0:5-0:10
+ >-----<
+0| for v: Int in values {}
+
+[Leading delimiter] = 0:5-0:7
+ >--<
+0| for v: Int in values {}
+
+[Domain] = 0:0-0:23
+ >-----------------------<
+0| for v: Int in values {}
+
+[Insertion delimiter] = " "
diff --git a/resources/fixtures/scopes/swift/type/type.interface.scope b/resources/fixtures/scopes/swift/type/type.interface.scope
new file mode 100644
index 0000000000..eb75796f70
--- /dev/null
+++ b/resources/fixtures/scopes/swift/type/type.interface.scope
@@ -0,0 +1,10 @@
+protocol Foo {}
+---
+
+[Content] =
+[Removal] =
+[Domain] = 0:0-0:15
+ >---------------<
+0| protocol Foo {}
+
+[Insertion delimiter] = " "
diff --git a/resources/fixtures/scopes/swift/type/type.iteration.block.scope b/resources/fixtures/scopes/swift/type/type.iteration.block.scope
new file mode 100644
index 0000000000..fd2ecf6f7a
--- /dev/null
+++ b/resources/fixtures/scopes/swift/type/type.iteration.block.scope
@@ -0,0 +1,27 @@
+struct Foo {
+ func bar() { }
+}
+---
+
+[#1 Content] =
+[#1 Domain] = 0:0-2:1
+ >------------
+0| struct Foo {
+1| func bar() { }
+2| }
+ -<
+
+
+[#2 Content] =
+[#2 Domain] = 0:12-2:0
+ >
+0| struct Foo {
+1| func bar() { }
+2| }
+ <
+
+
+[#3 Content] =
+[#3 Domain] = 1:16-1:17
+ >-<
+1| func bar() { }
diff --git a/resources/fixtures/scopes/swift/type/type.iteration.block2.scope b/resources/fixtures/scopes/swift/type/type.iteration.block2.scope
new file mode 100644
index 0000000000..eb1487158f
--- /dev/null
+++ b/resources/fixtures/scopes/swift/type/type.iteration.block2.scope
@@ -0,0 +1,13 @@
+func foo() { }
+---
+
+[#1 Content] =
+[#1 Domain] = 0:0-0:14
+ >--------------<
+0| func foo() { }
+
+
+[#2 Content] =
+[#2 Domain] = 0:12-0:13
+ >-<
+0| func foo() { }
diff --git a/resources/fixtures/scopes/swift/type/type.iteration.block3.scope b/resources/fixtures/scopes/swift/type/type.iteration.block3.scope
new file mode 100644
index 0000000000..0ffb1c499a
--- /dev/null
+++ b/resources/fixtures/scopes/swift/type/type.iteration.block3.scope
@@ -0,0 +1,30 @@
+if true { }
+else if false { }
+else { }
+---
+
+[#1 Content] =
+[#1 Domain] = 0:0-2:8
+ >-----------
+0| if true { }
+1| else if false { }
+2| else { }
+ --------<
+
+
+[#2 Content] =
+[#2 Domain] = 0:9-0:10
+ >-<
+0| if true { }
+
+
+[#3 Content] =
+[#3 Domain] = 1:15-1:16
+ >-<
+1| else if false { }
+
+
+[#4 Content] =
+[#4 Domain] = 2:6-2:7
+ >-<
+2| else { }
diff --git a/resources/fixtures/scopes/swift/type/type.iteration.block4.scope b/resources/fixtures/scopes/swift/type/type.iteration.block4.scope
new file mode 100644
index 0000000000..e7b3236d45
--- /dev/null
+++ b/resources/fixtures/scopes/swift/type/type.iteration.block4.scope
@@ -0,0 +1,13 @@
+while true { }
+---
+
+[#1 Content] =
+[#1 Domain] = 0:0-0:14
+ >--------------<
+0| while true { }
+
+
+[#2 Content] =
+[#2 Domain] = 0:12-0:13
+ >-<
+0| while true { }
diff --git a/resources/fixtures/scopes/swift/type/type.iteration.class.scope b/resources/fixtures/scopes/swift/type/type.iteration.class.scope
new file mode 100644
index 0000000000..a3ec5f3456
--- /dev/null
+++ b/resources/fixtures/scopes/swift/type/type.iteration.class.scope
@@ -0,0 +1,13 @@
+class Foo { }
+---
+
+[#1 Content] =
+[#1 Domain] = 0:0-0:13
+ >-------------<
+0| class Foo { }
+
+
+[#2 Content] =
+[#2 Domain] = 0:11-0:12
+ >-<
+0| class Foo { }
diff --git a/resources/fixtures/scopes/swift/type/type.iteration.document.scope b/resources/fixtures/scopes/swift/type/type.iteration.document.scope
new file mode 100644
index 0000000000..41725916d2
--- /dev/null
+++ b/resources/fixtures/scopes/swift/type/type.iteration.document.scope
@@ -0,0 +1,12 @@
+
+let foo: Int
+
+---
+
+[Content] =
+[Domain] = 0:0-2:0
+ >
+0|
+1| let foo: Int
+2|
+ <
diff --git a/resources/fixtures/scopes/swift/type/type.iteration.interface.scope b/resources/fixtures/scopes/swift/type/type.iteration.interface.scope
new file mode 100644
index 0000000000..7db5025f1b
--- /dev/null
+++ b/resources/fixtures/scopes/swift/type/type.iteration.interface.scope
@@ -0,0 +1,13 @@
+protocol Foo { }
+---
+
+[#1 Content] =
+[#1 Domain] = 0:0-0:16
+ >----------------<
+0| protocol Foo { }
+
+
+[#2 Content] =
+[#2 Domain] = 0:14-0:15
+ >-<
+0| protocol Foo { }
diff --git a/resources/fixtures/scopes/swift/type/type.return.lambda.scope b/resources/fixtures/scopes/swift/type/type.return.lambda.scope
new file mode 100644
index 0000000000..349ab30276
--- /dev/null
+++ b/resources/fixtures/scopes/swift/type/type.return.lambda.scope
@@ -0,0 +1,17 @@
+{ () -> Int in 0 }
+---
+
+[Content] =
+[Domain] = 0:8-0:11
+ >---<
+0| { () -> Int in 0 }
+
+[Removal] = 0:4-0:11
+ >-------<
+0| { () -> Int in 0 }
+
+[Leading delimiter] = 0:4-0:8
+ >----<
+0| { () -> Int in 0 }
+
+[Insertion delimiter] = " "
diff --git a/resources/fixtures/scopes/swift/type/type.return.method.scope b/resources/fixtures/scopes/swift/type/type.return.method.scope
new file mode 100644
index 0000000000..4771a5b569
--- /dev/null
+++ b/resources/fixtures/scopes/swift/type/type.return.method.scope
@@ -0,0 +1,34 @@
+struct Foo {
+ func bar() -> Int {}
+}
+---
+
+[#1 Content] =
+[#1 Removal] =
+[#1 Domain] = 0:0-2:1
+ >------------
+0| struct Foo {
+1| func bar() -> Int {}
+2| }
+ -<
+
+[#1 Insertion delimiter] = " "
+
+
+[#2 Content] = 1:18-1:21
+ >---<
+1| func bar() -> Int {}
+
+[#2 Removal] = 1:14-1:21
+ >-------<
+1| func bar() -> Int {}
+
+[#2 Leading delimiter] = 1:14-1:18
+ >----<
+1| func bar() -> Int {}
+
+[#2 Domain] = 1:4-1:24
+ >--------------------<
+1| func bar() -> Int {}
+
+[#2 Insertion delimiter] = " "
diff --git a/resources/fixtures/scopes/swift/type/type.return.scope b/resources/fixtures/scopes/swift/type/type.return.scope
new file mode 100644
index 0000000000..34f6b31410
--- /dev/null
+++ b/resources/fixtures/scopes/swift/type/type.return.scope
@@ -0,0 +1,20 @@
+func foo() -> Int {}
+---
+
+[Content] = 0:14-0:17
+ >---<
+0| func foo() -> Int {}
+
+[Removal] = 0:10-0:17
+ >-------<
+0| func foo() -> Int {}
+
+[Leading delimiter] = 0:10-0:14
+ >----<
+0| func foo() -> Int {}
+
+[Domain] = 0:0-0:20
+ >--------------------<
+0| func foo() -> Int {}
+
+[Insertion delimiter] = " "
diff --git a/resources/fixtures/scopes/swift/type/type.typeArgument.iteration.scope b/resources/fixtures/scopes/swift/type/type.typeArgument.iteration.scope
new file mode 100644
index 0000000000..0628170078
--- /dev/null
+++ b/resources/fixtures/scopes/swift/type/type.typeArgument.iteration.scope
@@ -0,0 +1,13 @@
+let foo: Map
+---
+
+[#1 Content] =
+[#1 Domain] = 0:0-0:22
+ >----------------------<
+0| let foo: Map
+
+
+[#2 Content] =
+[#2 Domain] = 0:13-0:21
+ >--------<
+0| let foo: Map
diff --git a/resources/fixtures/scopes/swift/type/type.typeArgument.scope b/resources/fixtures/scopes/swift/type/type.typeArgument.scope
new file mode 100644
index 0000000000..3d6a00e1d0
--- /dev/null
+++ b/resources/fixtures/scopes/swift/type/type.typeArgument.scope
@@ -0,0 +1,52 @@
+let foo: Map
+---
+
+[#1 Content] = 0:9-0:22
+ >-------------<
+0| let foo: Map
+
+[#1 Removal] = 0:7-0:22
+ >---------------<
+0| let foo: Map
+
+[#1 Leading delimiter] = 0:7-0:9
+ >--<
+0| let foo: Map
+
+[#1 Domain] = 0:0-0:22
+ >----------------------<
+0| let foo: Map
+
+[#1 Insertion delimiter] = " "
+
+
+[#2 Content] =
+[#2 Domain] = 0:13-0:16
+ >---<
+0| let foo: Map
+
+[#2 Removal] = 0:13-0:18
+ >-----<
+0| let foo: Map
+
+[#2 Trailing delimiter] = 0:16-0:18
+ >--<
+0| let foo: Map
+
+[#2 Insertion delimiter] = " "
+
+
+[#3 Content] =
+[#3 Domain] = 0:18-0:21
+ >---<
+0| let foo: Map
+
+[#3 Removal] = 0:16-0:21
+ >-----<
+0| let foo: Map
+
+[#3 Leading delimiter] = 0:16-0:18
+ >--<
+0| let foo: Map
+
+[#3 Insertion delimiter] = " "
diff --git a/resources/fixtures/scopes/swift/type/type.variable.initialized.scope b/resources/fixtures/scopes/swift/type/type.variable.initialized.scope
new file mode 100644
index 0000000000..28043523ca
--- /dev/null
+++ b/resources/fixtures/scopes/swift/type/type.variable.initialized.scope
@@ -0,0 +1,20 @@
+var foo: Int = 0
+---
+
+[Content] = 0:9-0:12
+ >---<
+0| var foo: Int = 0
+
+[Removal] = 0:7-0:12
+ >-----<
+0| var foo: Int = 0
+
+[Leading delimiter] = 0:7-0:9
+ >--<
+0| var foo: Int = 0
+
+[Domain] = 0:0-0:16
+ >----------------<
+0| var foo: Int = 0
+
+[Insertion delimiter] = " "
diff --git a/resources/fixtures/scopes/swift/type/type.variable.uninitialized.scope b/resources/fixtures/scopes/swift/type/type.variable.uninitialized.scope
new file mode 100644
index 0000000000..99f31b1b07
--- /dev/null
+++ b/resources/fixtures/scopes/swift/type/type.variable.uninitialized.scope
@@ -0,0 +1,20 @@
+var foo: Int
+---
+
+[Content] = 0:9-0:12
+ >---<
+0| var foo: Int
+
+[Removal] = 0:7-0:12
+ >-----<
+0| var foo: Int
+
+[Leading delimiter] = 0:7-0:9
+ >--<
+0| var foo: Int
+
+[Domain] = 0:0-0:12
+ >------------<
+0| var foo: Int
+
+[Insertion delimiter] = " "
diff --git a/resources/fixtures/scopes/swift/value/value.argument.actual.iteration.scope b/resources/fixtures/scopes/swift/value/value.argument.actual.iteration.scope
new file mode 100644
index 0000000000..c25ba7b1bd
--- /dev/null
+++ b/resources/fixtures/scopes/swift/value/value.argument.actual.iteration.scope
@@ -0,0 +1,13 @@
+foo(aaa: 0, bbb: 1)
+---
+
+[#1 Content] =
+[#1 Domain] = 0:0-0:19
+ >-------------------<
+0| foo(aaa: 0, bbb: 1)
+
+
+[#2 Content] =
+[#2 Domain] = 0:4-0:18
+ >--------------<
+0| foo(aaa: 0, bbb: 1)
diff --git a/resources/fixtures/scopes/swift/value/value.argument.actual.scope b/resources/fixtures/scopes/swift/value/value.argument.actual.scope
new file mode 100644
index 0000000000..569017e7ed
--- /dev/null
+++ b/resources/fixtures/scopes/swift/value/value.argument.actual.scope
@@ -0,0 +1,39 @@
+foo(aaa: 0, bbb: 1)
+---
+
+[#1 Content] = 0:9-0:10
+ >-<
+0| foo(aaa: 0, bbb: 1)
+
+[#1 Removal] = 0:7-0:10
+ >---<
+0| foo(aaa: 0, bbb: 1)
+
+[#1 Leading delimiter] = 0:7-0:9
+ >--<
+0| foo(aaa: 0, bbb: 1)
+
+[#1 Domain] = 0:4-0:10
+ >------<
+0| foo(aaa: 0, bbb: 1)
+
+[#1 Insertion delimiter] = " "
+
+
+[#2 Content] = 0:17-0:18
+ >-<
+0| foo(aaa: 0, bbb: 1)
+
+[#2 Removal] = 0:15-0:18
+ >---<
+0| foo(aaa: 0, bbb: 1)
+
+[#2 Leading delimiter] = 0:15-0:17
+ >--<
+0| foo(aaa: 0, bbb: 1)
+
+[#2 Domain] = 0:12-0:18
+ >------<
+0| foo(aaa: 0, bbb: 1)
+
+[#2 Insertion delimiter] = " "
diff --git a/resources/fixtures/scopes/swift/value/value.argument.formal.constructor.iteration.scope b/resources/fixtures/scopes/swift/value/value.argument.formal.constructor.iteration.scope
new file mode 100644
index 0000000000..f24a039a82
--- /dev/null
+++ b/resources/fixtures/scopes/swift/value/value.argument.formal.constructor.iteration.scope
@@ -0,0 +1,27 @@
+struct Foo {
+ init(aaa: Int = 0, bbb: Int = 1) {}
+}
+---
+
+[#1 Content] =
+[#1 Domain] = 0:0-2:1
+ >------------
+0| struct Foo {
+1| init(aaa: Int = 0, bbb: Int = 1) {}
+2| }
+ -<
+
+
+[#2 Content] =
+[#2 Domain] = 0:12-2:0
+ >
+0| struct Foo {
+1| init(aaa: Int = 0, bbb: Int = 1) {}
+2| }
+ <
+
+
+[#3 Content] =
+[#3 Domain] = 1:9-1:35
+ >--------------------------<
+1| init(aaa: Int = 0, bbb: Int = 1) {}
diff --git a/resources/fixtures/scopes/swift/value/value.argument.formal.constructor.scope b/resources/fixtures/scopes/swift/value/value.argument.formal.constructor.scope
new file mode 100644
index 0000000000..af370a21c4
--- /dev/null
+++ b/resources/fixtures/scopes/swift/value/value.argument.formal.constructor.scope
@@ -0,0 +1,41 @@
+struct Foo {
+ init(aaa: Int = 0, bbb: Int = 1) {}
+}
+---
+
+[#1 Content] = 1:20-1:21
+ >-<
+1| init(aaa: Int = 0, bbb: Int = 1) {}
+
+[#1 Removal] = 1:17-1:21
+ >----<
+1| init(aaa: Int = 0, bbb: Int = 1) {}
+
+[#1 Leading delimiter] = 1:17-1:20
+ >---<
+1| init(aaa: Int = 0, bbb: Int = 1) {}
+
+[#1 Domain] = 1:9-1:21
+ >------------<
+1| init(aaa: Int = 0, bbb: Int = 1) {}
+
+[#1 Insertion delimiter] = " "
+
+
+[#2 Content] = 1:34-1:35
+ >-<
+1| init(aaa: Int = 0, bbb: Int = 1) {}
+
+[#2 Removal] = 1:31-1:35
+ >----<
+1| init(aaa: Int = 0, bbb: Int = 1) {}
+
+[#2 Leading delimiter] = 1:31-1:34
+ >---<
+1| init(aaa: Int = 0, bbb: Int = 1) {}
+
+[#2 Domain] = 1:23-1:35
+ >------------<
+1| init(aaa: Int = 0, bbb: Int = 1) {}
+
+[#2 Insertion delimiter] = " "
diff --git a/resources/fixtures/scopes/swift/value/value.argument.formal.iteration.scope b/resources/fixtures/scopes/swift/value/value.argument.formal.iteration.scope
new file mode 100644
index 0000000000..5adbead972
--- /dev/null
+++ b/resources/fixtures/scopes/swift/value/value.argument.formal.iteration.scope
@@ -0,0 +1,13 @@
+func foo(aaa: Int = 0, bbb: Int = 1) {}
+---
+
+[#1 Content] =
+[#1 Domain] = 0:0-0:39
+ >---------------------------------------<
+0| func foo(aaa: Int = 0, bbb: Int = 1) {}
+
+
+[#2 Content] =
+[#2 Domain] = 0:9-0:35
+ >--------------------------<
+0| func foo(aaa: Int = 0, bbb: Int = 1) {}
diff --git a/resources/fixtures/scopes/swift/value/value.argument.formal.method.iteration.scope b/resources/fixtures/scopes/swift/value/value.argument.formal.method.iteration.scope
new file mode 100644
index 0000000000..0fa015b79e
--- /dev/null
+++ b/resources/fixtures/scopes/swift/value/value.argument.formal.method.iteration.scope
@@ -0,0 +1,27 @@
+struct Foo {
+ func bar(aaa: Int = 0, bbb: Int = 1) {}
+}
+---
+
+[#1 Content] =
+[#1 Domain] = 0:0-2:1
+ >------------
+0| struct Foo {
+1| func bar(aaa: Int = 0, bbb: Int = 1) {}
+2| }
+ -<
+
+
+[#2 Content] =
+[#2 Domain] = 0:12-2:0
+ >
+0| struct Foo {
+1| func bar(aaa: Int = 0, bbb: Int = 1) {}
+2| }
+ <
+
+
+[#3 Content] =
+[#3 Domain] = 1:13-1:39
+ >--------------------------<
+1| func bar(aaa: Int = 0, bbb: Int = 1) {}
diff --git a/resources/fixtures/scopes/swift/value/value.argument.formal.method.scope b/resources/fixtures/scopes/swift/value/value.argument.formal.method.scope
new file mode 100644
index 0000000000..590300ca50
--- /dev/null
+++ b/resources/fixtures/scopes/swift/value/value.argument.formal.method.scope
@@ -0,0 +1,41 @@
+struct Foo {
+ func bar(aaa: Int = 0, bbb: Int = 1) {}
+}
+---
+
+[#1 Content] = 1:24-1:25
+ >-<
+1| func bar(aaa: Int = 0, bbb: Int = 1) {}
+
+[#1 Removal] = 1:21-1:25
+ >----<
+1| func bar(aaa: Int = 0, bbb: Int = 1) {}
+
+[#1 Leading delimiter] = 1:21-1:24
+ >---<
+1| func bar(aaa: Int = 0, bbb: Int = 1) {}
+
+[#1 Domain] = 1:13-1:25
+ >------------<
+1| func bar(aaa: Int = 0, bbb: Int = 1) {}
+
+[#1 Insertion delimiter] = " "
+
+
+[#2 Content] = 1:38-1:39
+ >-<
+1| func bar(aaa: Int = 0, bbb: Int = 1) {}
+
+[#2 Removal] = 1:35-1:39
+ >----<
+1| func bar(aaa: Int = 0, bbb: Int = 1) {}
+
+[#2 Leading delimiter] = 1:35-1:38
+ >---<
+1| func bar(aaa: Int = 0, bbb: Int = 1) {}
+
+[#2 Domain] = 1:27-1:39
+ >------------<
+1| func bar(aaa: Int = 0, bbb: Int = 1) {}
+
+[#2 Insertion delimiter] = " "
diff --git a/resources/fixtures/scopes/swift/value/value.argument.formal.scope b/resources/fixtures/scopes/swift/value/value.argument.formal.scope
new file mode 100644
index 0000000000..0776b5513c
--- /dev/null
+++ b/resources/fixtures/scopes/swift/value/value.argument.formal.scope
@@ -0,0 +1,39 @@
+func foo(aaa: Int = 0, bbb: Int = 1) {}
+---
+
+[#1 Content] = 0:20-0:21
+ >-<
+0| func foo(aaa: Int = 0, bbb: Int = 1) {}
+
+[#1 Removal] = 0:17-0:21
+ >----<
+0| func foo(aaa: Int = 0, bbb: Int = 1) {}
+
+[#1 Leading delimiter] = 0:17-0:20
+ >---<
+0| func foo(aaa: Int = 0, bbb: Int = 1) {}
+
+[#1 Domain] = 0:9-0:21
+ >------------<
+0| func foo(aaa: Int = 0, bbb: Int = 1) {}
+
+[#1 Insertion delimiter] = " "
+
+
+[#2 Content] = 0:34-0:35
+ >-<
+0| func foo(aaa: Int = 0, bbb: Int = 1) {}
+
+[#2 Removal] = 0:31-0:35
+ >----<
+0| func foo(aaa: Int = 0, bbb: Int = 1) {}
+
+[#2 Leading delimiter] = 0:31-0:34
+ >---<
+0| func foo(aaa: Int = 0, bbb: Int = 1) {}
+
+[#2 Domain] = 0:23-0:35
+ >------------<
+0| func foo(aaa: Int = 0, bbb: Int = 1) {}
+
+[#2 Insertion delimiter] = " "
diff --git a/resources/fixtures/scopes/swift/value/value.assignment.compound.scope b/resources/fixtures/scopes/swift/value/value.assignment.compound.scope
new file mode 100644
index 0000000000..0e71d5ba22
--- /dev/null
+++ b/resources/fixtures/scopes/swift/value/value.assignment.compound.scope
@@ -0,0 +1,20 @@
+foo += 0
+---
+
+[Content] = 0:7-0:8
+ >-<
+0| foo += 0
+
+[Removal] = 0:3-0:8
+ >-----<
+0| foo += 0
+
+[Leading delimiter] = 0:3-0:7
+ >----<
+0| foo += 0
+
+[Domain] = 0:0-0:8
+ >--------<
+0| foo += 0
+
+[Insertion delimiter] = " "
diff --git a/resources/fixtures/scopes/swift/value/value.assignment.destructuring.scope b/resources/fixtures/scopes/swift/value/value.assignment.destructuring.scope
new file mode 100644
index 0000000000..7ecdd946d6
--- /dev/null
+++ b/resources/fixtures/scopes/swift/value/value.assignment.destructuring.scope
@@ -0,0 +1,20 @@
+(foo, bar) = (0, 1)
+---
+
+[Content] = 0:13-0:19
+ >------<
+0| (foo, bar) = (0, 1)
+
+[Removal] = 0:10-0:19
+ >---------<
+0| (foo, bar) = (0, 1)
+
+[Leading delimiter] = 0:10-0:13
+ >---<
+0| (foo, bar) = (0, 1)
+
+[Domain] = 0:0-0:19
+ >-------------------<
+0| (foo, bar) = (0, 1)
+
+[Insertion delimiter] = " "
diff --git a/resources/fixtures/scopes/swift/value/value.assignment.scope b/resources/fixtures/scopes/swift/value/value.assignment.scope
new file mode 100644
index 0000000000..6e89de0927
--- /dev/null
+++ b/resources/fixtures/scopes/swift/value/value.assignment.scope
@@ -0,0 +1,20 @@
+foo = 0
+---
+
+[Content] = 0:6-0:7
+ >-<
+0| foo = 0
+
+[Removal] = 0:3-0:7
+ >----<
+0| foo = 0
+
+[Leading delimiter] = 0:3-0:6
+ >---<
+0| foo = 0
+
+[Domain] = 0:0-0:7
+ >-------<
+0| foo = 0
+
+[Insertion delimiter] = " "
diff --git a/resources/fixtures/scopes/swift/value/value.constant.scope b/resources/fixtures/scopes/swift/value/value.constant.scope
new file mode 100644
index 0000000000..58625925c9
--- /dev/null
+++ b/resources/fixtures/scopes/swift/value/value.constant.scope
@@ -0,0 +1,20 @@
+let foo = 0
+---
+
+[Content] = 0:10-0:11
+ >-<
+0| let foo = 0
+
+[Removal] = 0:7-0:11
+ >----<
+0| let foo = 0
+
+[Leading delimiter] = 0:7-0:10
+ >---<
+0| let foo = 0
+
+[Domain] = 0:0-0:11
+ >-----------<
+0| let foo = 0
+
+[Insertion delimiter] = " "
diff --git a/resources/fixtures/scopes/swift/value/value.field.class.scope b/resources/fixtures/scopes/swift/value/value.field.class.scope
new file mode 100644
index 0000000000..c4b9b04f49
--- /dev/null
+++ b/resources/fixtures/scopes/swift/value/value.field.class.scope
@@ -0,0 +1,42 @@
+struct Foo {
+ var bar = 0
+ var baz: Int = 0
+}
+---
+
+[#1 Content] = 1:12-1:13
+ >-<
+1| var bar = 0
+
+[#1 Removal] = 1:9-1:13
+ >----<
+1| var bar = 0
+
+[#1 Leading delimiter] = 1:9-1:12
+ >---<
+1| var bar = 0
+
+[#1 Domain] = 1:2-1:13
+ >-----------<
+1| var bar = 0
+
+[#1 Insertion delimiter] = " "
+
+
+[#2 Content] = 2:17-2:18
+ >-<
+2| var baz: Int = 0
+
+[#2 Removal] = 2:14-2:18
+ >----<
+2| var baz: Int = 0
+
+[#2 Leading delimiter] = 2:14-2:17
+ >---<
+2| var baz: Int = 0
+
+[#2 Domain] = 2:2-2:18
+ >----------------<
+2| var baz: Int = 0
+
+[#2 Insertion delimiter] = " "
diff --git a/resources/fixtures/scopes/swift/value/value.field.enum.scope b/resources/fixtures/scopes/swift/value/value.field.enum.scope
new file mode 100644
index 0000000000..6261951de7
--- /dev/null
+++ b/resources/fixtures/scopes/swift/value/value.field.enum.scope
@@ -0,0 +1,22 @@
+enum Foo: Int {
+ case bar = 0
+}
+---
+
+[Content] = 1:13-1:14
+ >-<
+1| case bar = 0
+
+[Removal] = 1:10-1:14
+ >----<
+1| case bar = 0
+
+[Leading delimiter] = 1:10-1:13
+ >---<
+1| case bar = 0
+
+[Domain] = 1:2-1:14
+ >------------<
+1| case bar = 0
+
+[Insertion delimiter] = " "
diff --git a/resources/fixtures/scopes/swift/value/value.foreach.scope b/resources/fixtures/scopes/swift/value/value.foreach.scope
new file mode 100644
index 0000000000..d89b2cb282
--- /dev/null
+++ b/resources/fixtures/scopes/swift/value/value.foreach.scope
@@ -0,0 +1,24 @@
+for v in values {}
+---
+
+[Content] = 0:9-0:15
+ >------<
+0| for v in values {}
+
+[Removal] = 0:9-0:16
+ >-------<
+0| for v in values {}
+
+[Leading delimiter] = 0:8-0:9
+ >-<
+0| for v in values {}
+
+[Trailing delimiter] = 0:15-0:16
+ >-<
+0| for v in values {}
+
+[Domain] = 0:0-0:18
+ >------------------<
+0| for v in values {}
+
+[Insertion delimiter] = " "
diff --git a/resources/fixtures/scopes/swift/value/value.iteration.block.scope b/resources/fixtures/scopes/swift/value/value.iteration.block.scope
new file mode 100644
index 0000000000..fd2ecf6f7a
--- /dev/null
+++ b/resources/fixtures/scopes/swift/value/value.iteration.block.scope
@@ -0,0 +1,27 @@
+struct Foo {
+ func bar() { }
+}
+---
+
+[#1 Content] =
+[#1 Domain] = 0:0-2:1
+ >------------
+0| struct Foo {
+1| func bar() { }
+2| }
+ -<
+
+
+[#2 Content] =
+[#2 Domain] = 0:12-2:0
+ >
+0| struct Foo {
+1| func bar() { }
+2| }
+ <
+
+
+[#3 Content] =
+[#3 Domain] = 1:16-1:17
+ >-<
+1| func bar() { }
diff --git a/resources/fixtures/scopes/swift/value/value.iteration.block2.scope b/resources/fixtures/scopes/swift/value/value.iteration.block2.scope
new file mode 100644
index 0000000000..eb1487158f
--- /dev/null
+++ b/resources/fixtures/scopes/swift/value/value.iteration.block2.scope
@@ -0,0 +1,13 @@
+func foo() { }
+---
+
+[#1 Content] =
+[#1 Domain] = 0:0-0:14
+ >--------------<
+0| func foo() { }
+
+
+[#2 Content] =
+[#2 Domain] = 0:12-0:13
+ >-<
+0| func foo() { }
diff --git a/resources/fixtures/scopes/swift/value/value.iteration.block3.scope b/resources/fixtures/scopes/swift/value/value.iteration.block3.scope
new file mode 100644
index 0000000000..0ffb1c499a
--- /dev/null
+++ b/resources/fixtures/scopes/swift/value/value.iteration.block3.scope
@@ -0,0 +1,30 @@
+if true { }
+else if false { }
+else { }
+---
+
+[#1 Content] =
+[#1 Domain] = 0:0-2:8
+ >-----------
+0| if true { }
+1| else if false { }
+2| else { }
+ --------<
+
+
+[#2 Content] =
+[#2 Domain] = 0:9-0:10
+ >-<
+0| if true { }
+
+
+[#3 Content] =
+[#3 Domain] = 1:15-1:16
+ >-<
+1| else if false { }
+
+
+[#4 Content] =
+[#4 Domain] = 2:6-2:7
+ >-<
+2| else { }
diff --git a/resources/fixtures/scopes/swift/value/value.iteration.block4.scope b/resources/fixtures/scopes/swift/value/value.iteration.block4.scope
new file mode 100644
index 0000000000..e7b3236d45
--- /dev/null
+++ b/resources/fixtures/scopes/swift/value/value.iteration.block4.scope
@@ -0,0 +1,13 @@
+while true { }
+---
+
+[#1 Content] =
+[#1 Domain] = 0:0-0:14
+ >--------------<
+0| while true { }
+
+
+[#2 Content] =
+[#2 Domain] = 0:12-0:13
+ >-<
+0| while true { }
diff --git a/resources/fixtures/scopes/swift/value/value.iteration.class.scope b/resources/fixtures/scopes/swift/value/value.iteration.class.scope
new file mode 100644
index 0000000000..10699070e9
--- /dev/null
+++ b/resources/fixtures/scopes/swift/value/value.iteration.class.scope
@@ -0,0 +1,13 @@
+struct Foo { }
+---
+
+[#1 Content] =
+[#1 Domain] = 0:0-0:14
+ >--------------<
+0| struct Foo { }
+
+
+[#2 Content] =
+[#2 Domain] = 0:12-0:13
+ >-<
+0| struct Foo { }
diff --git a/resources/fixtures/scopes/swift/value/value.iteration.document.scope b/resources/fixtures/scopes/swift/value/value.iteration.document.scope
new file mode 100644
index 0000000000..54abd7726c
--- /dev/null
+++ b/resources/fixtures/scopes/swift/value/value.iteration.document.scope
@@ -0,0 +1,12 @@
+
+var foo: Int
+
+---
+
+[Content] =
+[Domain] = 0:0-2:0
+ >
+0|
+1| var foo: Int
+2|
+ <
diff --git a/resources/fixtures/scopes/swift/value/value.iteration.enum.scope b/resources/fixtures/scopes/swift/value/value.iteration.enum.scope
new file mode 100644
index 0000000000..9034c4ee11
--- /dev/null
+++ b/resources/fixtures/scopes/swift/value/value.iteration.enum.scope
@@ -0,0 +1,13 @@
+enum Foo { }
+---
+
+[#1 Content] =
+[#1 Domain] = 0:0-0:12
+ >------------<
+0| enum Foo { }
+
+
+[#2 Content] =
+[#2 Domain] = 0:10-0:11
+ >-<
+0| enum Foo { }
diff --git a/resources/fixtures/scopes/swift/value/value.mapPair.iteration.scope b/resources/fixtures/scopes/swift/value/value.mapPair.iteration.scope
new file mode 100644
index 0000000000..f606502e89
--- /dev/null
+++ b/resources/fixtures/scopes/swift/value/value.mapPair.iteration.scope
@@ -0,0 +1,13 @@
+[foo: 0, bar: 1]
+---
+
+[#1 Content] =
+[#1 Domain] = 0:0-0:16
+ >----------------<
+0| [foo: 0, bar: 1]
+
+
+[#2 Content] =
+[#2 Domain] = 0:1-0:15
+ >--------------<
+0| [foo: 0, bar: 1]
diff --git a/resources/fixtures/scopes/swift/value/value.mapPair.scope b/resources/fixtures/scopes/swift/value/value.mapPair.scope
new file mode 100644
index 0000000000..e0a9e2fd28
--- /dev/null
+++ b/resources/fixtures/scopes/swift/value/value.mapPair.scope
@@ -0,0 +1,39 @@
+[aaa: 0, bbb: 1]
+---
+
+[#1 Content] = 0:6-0:7
+ >-<
+0| [aaa: 0, bbb: 1]
+
+[#1 Removal] = 0:4-0:7
+ >---<
+0| [aaa: 0, bbb: 1]
+
+[#1 Leading delimiter] = 0:4-0:6
+ >--<
+0| [aaa: 0, bbb: 1]
+
+[#1 Domain] = 0:1-0:7
+ >------<
+0| [aaa: 0, bbb: 1]
+
+[#1 Insertion delimiter] = " "
+
+
+[#2 Content] = 0:14-0:15
+ >-<
+0| [aaa: 0, bbb: 1]
+
+[#2 Removal] = 0:12-0:15
+ >---<
+0| [aaa: 0, bbb: 1]
+
+[#2 Leading delimiter] = 0:12-0:14
+ >--<
+0| [aaa: 0, bbb: 1]
+
+[#2 Domain] = 0:9-0:15
+ >------<
+0| [aaa: 0, bbb: 1]
+
+[#2 Insertion delimiter] = " "
diff --git a/resources/fixtures/scopes/swift/value/value.return.lambda.scope b/resources/fixtures/scopes/swift/value/value.return.lambda.scope
new file mode 100644
index 0000000000..d0653a96a5
--- /dev/null
+++ b/resources/fixtures/scopes/swift/value/value.return.lambda.scope
@@ -0,0 +1,24 @@
+{ () -> Int in 0 }
+---
+
+[Content] = 0:15-0:16
+ >-<
+0| { () -> Int in 0 }
+
+[Removal] = 0:15-0:17
+ >--<
+0| { () -> Int in 0 }
+
+[Leading delimiter] = 0:14-0:15
+ >-<
+0| { () -> Int in 0 }
+
+[Trailing delimiter] = 0:16-0:17
+ >-<
+0| { () -> Int in 0 }
+
+[Domain] = 0:0-0:18
+ >------------------<
+0| { () -> Int in 0 }
+
+[Insertion delimiter] = " "
diff --git a/resources/fixtures/scopes/swift/value/value.return.scope b/resources/fixtures/scopes/swift/value/value.return.scope
new file mode 100644
index 0000000000..b80c04ce5d
--- /dev/null
+++ b/resources/fixtures/scopes/swift/value/value.return.scope
@@ -0,0 +1,22 @@
+func foo() {
+ 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:12
+ >--------<
+1| return 0
+
+[Insertion delimiter] = " "
diff --git a/resources/fixtures/scopes/swift/value/value.switch.scope b/resources/fixtures/scopes/swift/value/value.switch.scope
new file mode 100644
index 0000000000..b1f072b5c8
--- /dev/null
+++ b/resources/fixtures/scopes/swift/value/value.switch.scope
@@ -0,0 +1,24 @@
+switch value {}
+---
+
+[Content] = 0:7-0:12
+ >-----<
+0| switch value {}
+
+[Removal] = 0:7-0:13
+ >------<
+0| switch value {}
+
+[Leading delimiter] = 0:6-0:7
+ >-<
+0| switch value {}
+
+[Trailing delimiter] = 0:12-0:13
+ >-<
+0| switch value {}
+
+[Domain] = 0:0-0:15
+ >---------------<
+0| switch value {}
+
+[Insertion delimiter] = " "
diff --git a/resources/fixtures/scopes/swift/value/value.throw.scope b/resources/fixtures/scopes/swift/value/value.throw.scope
new file mode 100644
index 0000000000..846a545b16
--- /dev/null
+++ b/resources/fixtures/scopes/swift/value/value.throw.scope
@@ -0,0 +1,22 @@
+func foo() throws {
+ throw Error
+}
+---
+
+[Content] = 1:10-1:15
+ >-----<
+1| throw Error
+
+[Removal] = 1:9-1:15
+ >------<
+1| throw Error
+
+[Leading delimiter] = 1:9-1:10
+ >-<
+1| throw Error
+
+[Domain] = 1:4-1:15
+ >-----------<
+1| throw Error
+
+[Insertion delimiter] = " "
diff --git a/resources/fixtures/scopes/swift/value/value.typeAlias.scope b/resources/fixtures/scopes/swift/value/value.typeAlias.scope
new file mode 100644
index 0000000000..228a0b5b82
--- /dev/null
+++ b/resources/fixtures/scopes/swift/value/value.typeAlias.scope
@@ -0,0 +1,20 @@
+typealias Foo = Int
+---
+
+[Content] = 0:16-0:19
+ >---<
+0| typealias Foo = Int
+
+[Removal] = 0:13-0:19
+ >------<
+0| typealias Foo = Int
+
+[Leading delimiter] = 0:13-0:16
+ >---<
+0| typealias Foo = Int
+
+[Domain] = 0:0-0:19
+ >-------------------<
+0| typealias Foo = Int
+
+[Insertion delimiter] = " "
diff --git a/resources/fixtures/scopes/swift/value/value.variable.destructuring.scope b/resources/fixtures/scopes/swift/value/value.variable.destructuring.scope
new file mode 100644
index 0000000000..e7b643e077
--- /dev/null
+++ b/resources/fixtures/scopes/swift/value/value.variable.destructuring.scope
@@ -0,0 +1,20 @@
+let (foo, bar) = (0, 1)
+---
+
+[Content] = 0:17-0:23
+ >------<
+0| let (foo, bar) = (0, 1)
+
+[Removal] = 0:14-0:23
+ >---------<
+0| let (foo, bar) = (0, 1)
+
+[Leading delimiter] = 0:14-0:17
+ >---<
+0| let (foo, bar) = (0, 1)
+
+[Domain] = 0:0-0:23
+ >-----------------------<
+0| let (foo, bar) = (0, 1)
+
+[Insertion delimiter] = " "
diff --git a/resources/fixtures/scopes/swift/value/value.variable.scope b/resources/fixtures/scopes/swift/value/value.variable.scope
new file mode 100644
index 0000000000..06dc0be9f8
--- /dev/null
+++ b/resources/fixtures/scopes/swift/value/value.variable.scope
@@ -0,0 +1,20 @@
+var foo = 0
+---
+
+[Content] = 0:10-0:11
+ >-<
+0| var foo = 0
+
+[Removal] = 0:7-0:11
+ >----<
+0| var foo = 0
+
+[Leading delimiter] = 0:7-0:10
+ >---<
+0| var foo = 0
+
+[Domain] = 0:0-0:11
+ >-----------<
+0| var foo = 0
+
+[Insertion delimiter] = " "
diff --git a/resources/fixtures/scopes/swift/value/value.yield.scope b/resources/fixtures/scopes/swift/value/value.yield.scope
new file mode 100644
index 0000000000..87e2819c98
--- /dev/null
+++ b/resources/fixtures/scopes/swift/value/value.yield.scope
@@ -0,0 +1,24 @@
+var foo: Int {
+ _read {
+ yield 0
+ }
+}
+---
+
+[Content] = 2:14-2:15
+ >-<
+2| yield 0
+
+[Removal] = 2:13-2:15
+ >--<
+2| yield 0
+
+[Leading delimiter] = 2:13-2:14
+ >-<
+2| yield 0
+
+[Domain] = 2:8-2:15
+ >-------<
+2| yield 0
+
+[Insertion delimiter] = " "
diff --git a/resources/playground/Java.java b/resources/playground/Java.java
index 2001b365a2..0b65e8e8d2 100644
--- a/resources/playground/Java.java
+++ b/resources/playground/Java.java
@@ -2,5 +2,10 @@ public class Java {
private Java(String name) {
String value = "hello";
System.out.println(value);
+ if (true) {
+ //1
+ } else if (false) {
+ //2
+ }
}
}
diff --git a/resources/playground/rust.rs b/resources/playground/rust.rs
new file mode 100644
index 0000000000..766a2ce1a7
--- /dev/null
+++ b/resources/playground/rust.rs
@@ -0,0 +1,8 @@
+fn hello() {
+ let apple: Bool = false
+ if true {
+ //1
+ } else if false {
+ //2
+ }
+}
diff --git a/resources/playground/swift.swift b/resources/playground/swift.swift
new file mode 100644
index 0000000000..9db2eea02f
--- /dev/null
+++ b/resources/playground/swift.swift
@@ -0,0 +1,15 @@
+protocol ExampleProtocol: ParentProtocol {
+ var foo: Type {set get}
+}
+
+struct ExampleStruct: ParentStruct {
+ var foo: Type
+}
+
+enum ExampleEnumeration: ParentEnumeration {
+
+}
+
+struct MultiInheritanceStruct: ParentStruct, ParentProtocol, OtherParentProtocol {
+
+}
diff --git a/resources/queries/swift.scm b/resources/queries/swift.scm
new file mode 100644
index 0000000000..8556407dc6
--- /dev/null
+++ b/resources/queries/swift.scm
@@ -0,0 +1,711 @@
+;; https://github.com/alex-pinkus/tree-sitter-swift/blob/with-generated-files/src/grammar.json
+
+[
+ (class_declaration)
+ (protocol_declaration)
+ (property_declaration)
+ (function_declaration)
+ (protocol_property_declaration)
+ (protocol_function_declaration)
+ (init_declaration)
+ (import_declaration)
+ (typealias_declaration)
+ (for_statement)
+ (do_statement)
+ (while_statement)
+ (repeat_while_statement)
+ (switch_statement)
+ (control_transfer_statement)
+ (assignment)
+ (call_expression)
+
+ ;; Disabled on purpose. We have a better definition of these below.
+ ;; (if_statement)
+] @statement
+
+;; document-wide
+(
+ (source_file) @statementNameValueType.iteration @class.iteration @namedFunction.iteration
+ (#document-range! @statementNameValueType.iteration @class.iteration @namedFunction.iteration)
+)
+
+;;!! { }
+;;! ^
+(
+ (_
+ "{" @statementNameValueType.iteration.start.endOf @class.iteration.start.endOf @namedFunction.iteration.start.endOf
+ "}" @statementNameValueType.iteration.end.startOf @class.iteration.end.startOf @namedFunction.iteration.end.startOf
+ ) @_dummy
+ (#not-type? @_dummy if_statement lambda_literal)
+)
+
+(
+ (_
+ "{" @interior.start.endOf
+ "}" @interior.end.startOf
+ ) @_dummy
+ (#not-type? @_dummy if_statement lambda_literal)
+)
+
+;;!! // Hello world
+;;! ^^^^^^^^^^^^^^
+(comment) @comment @textFragment
+
+;;!! /* Hello world */
+;;! ^^^^^^^^^^^^^^^^^
+(multiline_comment) @comment @textFragment
+
+;;!! "Hello world"
+;;! ^^^^^^^^^^^^^
+;;! ^^^^^^^^^^^
+(line_string_literal
+ text: (_) @textFragment
+) @string
+
+;;!! #"Hello world"#
+;;! ^^^^^^^^^^^^^^^
+;;! ^^^^^^^^^^^
+(raw_string_literal
+ (_) @textFragment
+ (#shrink-to-match! @textFragment "^#+\"(?.*)\"#+$")
+) @string
+
+;;!! """Hello world"""
+;;! ^^^^^^^^^^^^^^^^^
+;;! ^^^^^^^^^^^
+(multi_line_string_literal
+ text: (_) @textFragment
+) @string
+
+;;!! struct Foo {}
+;;! ^^^
+(class_declaration
+ name: (_) @name
+ (class_body)
+) @class @type @name.domain
+
+;;!! enum Foo {}
+;;! ^^^
+(class_declaration
+ name: (_) @name
+ (enum_class_body)
+) @type @name.domain
+
+;;!! case foo = 0
+;;! ^^^
+;;! ^
+(enum_entry
+ name: (_) @name @value.leading.endOf
+ raw_value: (_) @value
+) @_.domain
+
+;;!! protocol Foo {}
+;;! ^^^
+(protocol_declaration
+ name: (_) @name
+) @type @name.domain
+
+;;!! for v: Int in values {}
+;;! ^
+;;! ^^^
+;;! ^^^^^^
+(for_statement
+ item: (_) @name
+ (type_annotation
+ ":" @type.leading
+ .
+ _ @type
+ )?
+ collection: (_) @value
+) @_.domain
+
+;;!! if true {} else if false {} else {}
+(
+ (if_statement) @ifStatement @statement @branch.iteration
+ (#not-parent-type? @ifStatement if_statement)
+)
+
+(
+ (if_statement
+ condition: (_) @condition
+ ) @condition.domain
+ (#not-parent-type? @condition.domain if_statement)
+)
+
+;;!! if true {}
+(
+ (if_statement
+ "{" @interior.start.endOf
+ "}" @branch.end.endOf @interior.end.startOf
+ ) @branch.start.startOf
+ (#not-parent-type? @branch.start.startOf if_statement)
+ (#not-child-type? @branch.start.startOf else)
+)
+
+;;!! if true { }
+;;! ^
+(
+ (if_statement
+ "{" @statementNameValueType.iteration.start.endOf @class.iteration.start.endOf @namedFunction.iteration.start.endOf
+ "}" @statementNameValueType.iteration.end.startOf @class.iteration.end.startOf @namedFunction.iteration.end.startOf
+ ) @_dummy
+ (#not-child-type? @_dummy else)
+)
+
+;;!! if true {} else {}
+(
+ (if_statement
+ "{" @interior.start.endOf
+ "}" @branch.end.endOf @interior.end.startOf
+ (else) @branch.removal.end.startOf
+ (if_statement)? @branch.removal.end.startOf
+ ) @branch.start.startOf @branch.removal.start.startOf
+ (#not-parent-type? @branch.start.startOf if_statement)
+)
+
+;;!! if true { } else {}
+;;! ^
+(
+ (if_statement
+ "{" @statementNameValueType.iteration.start.endOf @class.iteration.start.endOf @namedFunction.iteration.start.endOf
+ "}" @statementNameValueType.iteration.end.startOf @class.iteration.end.startOf @namedFunction.iteration.end.startOf
+ (else)
+ )
+)
+
+;;!! else if true {} else {}
+(if_statement
+ (else) @branch.start @condition.domain.start
+ (if_statement
+ condition: (_) @condition
+ "{" @interior.start.endOf
+ "}" @branch.end @interior.end.startOf @condition.domain.end
+ .
+ (else)
+ )
+)
+
+;;!! else if true {}
+(
+ (if_statement
+ (else) @branch.start @condition.domain.start
+ (if_statement
+ condition: (_) @condition
+ "{" @interior.start.endOf
+ "}" @branch.end @interior.end.startOf @condition.domain.end
+ ) @_dummy
+ )
+ (#not-child-type? @_dummy else)
+)
+
+;;!! else {}
+(
+ (else) @branch.start
+ "{" @interior.start.endOf
+ "}" @branch.end @interior.end.startOf
+)
+
+;;!! else { }
+;;! ^
+(
+ (else)
+ "{" @statementNameValueType.iteration.start.endOf @class.iteration.start.endOf @namedFunction.iteration.start.endOf
+ "}" @statementNameValueType.iteration.end.startOf @class.iteration.end.startOf @namedFunction.iteration.end.startOf
+)
+
+;;!! var foo: Int = 0
+;;! ^^^
+;;! ^^^
+;;! ^
+(property_declaration
+ name: (_) @name @type.leading.endOf
+ (type_annotation
+ (_) @type
+ ) @value.leading.endOf
+ value: (_)? @value
+) @_.domain
+
+;;!! var foo = 0
+;;! ^^^
+;;! ^
+(
+ (property_declaration
+ name: (_) @name @value.leading.endOf
+ value: (_)? @value
+ ) @_.domain
+ (#not-child-type? @_.domain type_annotation)
+)
+
+;;!! let foo: Int { get set}
+;;! ^^^
+;;! ^^^
+(protocol_property_declaration
+ name: (pattern
+ bound_identifier: (_) @name
+ )
+ (type_annotation
+ ":" @type.leading
+ (_) @type
+ )
+) @_.domain
+
+;;!! foo = 0
+;;! ^^^
+;;! ^
+(assignment
+ target: (_) @name @value.leading.endOf
+ result: (_) @value
+) @_.domain
+
+;;!! { () -> Int in 0 }
+;;! ^^^
+(lambda_literal
+ (lambda_function_type
+ ")" @type.leading.endOf
+ name: (_)? @type
+ )
+) @anonymousFunction
+
+;;!! { () -> Int in 0 }
+;;! ^
+(lambda_literal
+ (statements) @interior
+)
+
+;;!! { () -> Int in 0 }
+;;! ^
+(lambda_literal
+ (statements
+ .
+ (_) @value
+ .
+ )
+ (#not-type? @value control_transfer_statement)
+) @value.domain
+
+;;!! { (aaa: Int, bbb: Int) in }
+;;! ^^^ ^^^
+;;! ^^^ ^^^
+(lambda_parameter
+ .
+ (_) @name @type.leading.endOf
+ (_)? @type
+)
+
+;;!! do {} catch {}
+;;! ^^^^^
+(do_statement
+ "do" @branch.start
+ "}" @branch.end
+ (catch_block)
+) @branch.iteration
+
+;;!! do {} catch {}
+;;! ^^^^^^^^
+(catch_block) @branch
+
+;;!! do {} catch let e as Error {}
+;;! ^^^^^^^^^^^^^^
+;;! ^
+;;! ^^^^^
+(catch_block
+ (pattern
+ (pattern
+ bound_identifier: (_) @name
+ )
+ name: (_) @type
+ ) @argumentOrParameter @_.domain
+)
+
+;;!! do {} catch let e {}
+;;! ^^^^^
+;;! ^
+(catch_block
+ (pattern
+ bound_identifier: (_) @name
+ ) @argumentOrParameter @name.domain
+)
+
+;;!! true ? 0 : 1
+;;! ^^^^
+;;! ^
+(ternary_expression
+ condition: (_) @condition
+ if_true: (_) @branch
+) @condition.domain @branch.iteration
+
+;;!! true ? 0 : 1
+;;! ^
+(ternary_expression
+ if_false: (_) @branch
+)
+
+;;!! while true {}
+;;! ^^^^
+(while_statement
+ condition: (_) @condition
+) @condition.domain
+
+;;!! repeat {} while true
+;;! ^^^^
+(repeat_while_statement
+ condition: (_) @condition
+) @condition.domain
+
+;;!! switch value { }
+;;! ^^^^^
+;;! ^
+(switch_statement
+ expr: (_) @value
+ "{" @branch.iteration.start.endOf @condition.iteration.start.endOf
+ "}" @branch.iteration.end.startOf @condition.iteration.end.startOf
+) @value.domain
+
+;;!! case 0: break
+;;!! default: break
+(switch_entry
+ ":" @interior.start.endOf
+ (statements) @interior.end.endOf
+) @branch
+
+;;!! case 0: break
+;;! ^
+(switch_entry
+ .
+ (switch_pattern) @condition.start
+ (switch_pattern)? @condition.end
+ .
+ ":"
+) @condition.domain
+
+;;!! /\d+$/
+(
+ (regex_literal) @regularExpression @textFragment
+ (#shrink-to-match! @textFragment "^/(?.*)/.*$")
+)
+
+;;!! func foo() -> Int {}
+;;! ^^^
+;;! ^^^
+(function_declaration
+ name: (_) @name
+ (
+ ")" @type.leading.endOf
+ "->"
+ .
+ name: (_) @type
+ )?
+) @namedFunction @_.domain
+
+;;!! init() {}
+;;! ^^^^
+(init_declaration
+ name: _ @name
+) @namedFunction @name.domain
+
+;;!! func foo() {}
+;;! ^^^
+(protocol_function_declaration
+ name: (_) @name
+) @name.domain
+
+;;!! foo()
+;;! ^^^
+(call_expression
+ .
+ (_) @functionCallee
+) @functionCall @functionCallee.domain
+
+;;!! typealias Foo = Int
+;;! ^^^
+;;! ^^^
+(typealias_declaration
+ (_) @name @value.leading.endOf
+ "="
+ (_) @value
+) @type @_.domain
+
+;;!! return 0
+;;! ^
+;;!! yield 0
+;;! ^
+(control_transfer_statement
+ result: (_) @value
+) @value.domain
+
+;;!! throw Error
+;;! ^^^^^
+(control_transfer_statement
+ (throw_keyword)
+ (_) @value
+) @value.domain
+
+;;!! [aaa, bbb]
+(array_literal) @list
+
+;;!! [aaa: 0, bbb: 1]
+(dictionary_literal
+ "[" @collectionKey.iteration.start.endOf @value.iteration.start.endOf
+ "]" @collectionKey.iteration.end.startOf @value.iteration.end.startOf
+) @map
+
+;;!! [aaa: 0, bbb: 1]
+;;! ^^^ ^^^
+(dictionary_literal
+ key: (_) @collectionKey @collectionKey.domain.start
+ .
+ ":"
+ .
+ value: (_) @collectionKey.trailing.startOf @collectionKey.domain.end
+)
+
+;;!! [aaa: 0, bbb: 1]
+;;! ^ ^
+(dictionary_literal
+ key: (_) @value.leading.endOf @value.domain.start
+ .
+ ":"
+ .
+ value: (_) @value @value.domain.end
+)
+
+;;!! foo as Int
+;;! ^^^
+(as_expression
+ expr: (_) @type.leading.endOf
+ (_) @type
+ .
+) @type.domain
+
+;;!! Map
+;;! ^^^ ^^^
+(type_annotation
+ (user_type
+ (type_arguments
+ (_)? @type.leading.endOf
+ .
+ (_) @type
+ .
+ (_)? @type.trailing.startOf
+ )
+ )
+)
+
+;;!! Map
+;;! ^^^^^^^^
+(type_annotation
+ (user_type
+ (type_arguments
+ "<" @type.iteration.start.endOf
+ ">" @type.iteration.end.startOf
+ )
+ )
+)
+
+;;!! func foo(aaa: Int, bbb: Int) {}
+;;! ^^^^^^^^ ^^^^^^^^
+;;!! init(aaa: Int, bbb: Int) {}
+;;! ^^^^^^^^ ^^^^^^^^
+(
+ (_
+ (parameter)? @_.leading.endOf
+ .
+ (parameter) @argumentOrParameter
+ .
+ (parameter)? @_.trailing.startOf
+ ) @_dummy
+ (#not-type? @argumentOrParameter comment multiline_comment)
+ (#single-or-multi-line-delimiter! @argumentOrParameter @_dummy ", " ",\n")
+)
+
+;;!! { (aaa, bbb) in }
+;;! ^^^ ^^^
+(
+ (lambda_function_type_parameters
+ (_)? @_.leading.endOf
+ .
+ (_) @argumentOrParameter
+ .
+ (_)? @_.trailing.startOf
+ ) @_dummy
+ (#not-type? @argumentOrParameter comment multiline_comment)
+ (#single-or-multi-line-delimiter! @argumentOrParameter @_dummy ", " ",\n")
+)
+
+;;!! foo(aaa, bbb)
+;;! ^^^ ^^^
+(
+ (value_arguments
+ (_)? @_.leading.endOf
+ .
+ (_) @argumentOrParameter
+ .
+ (_)? @_.trailing.startOf
+ ) @_dummy
+ (#not-type? @argumentOrParameter comment multiline_comment)
+ (#single-or-multi-line-delimiter! @argumentOrParameter @_dummy ", " ",\n")
+)
+
+;;!! func foo(aaa: Int, bbb: Int) {}
+;;! ^^^^^^^^^^^^^^^^^^
+;;!! init(aaa: Int, bbb: Int) {}
+;;! ^^^^^^^^^^^^^^^^^^
+(
+ (_
+ "(" @argumentList.removal.start.endOf @argumentOrParameter.iteration.start.endOf
+ .
+ (parameter) @argumentList.start
+ (parameter)? @argumentList.end
+ .
+ ")" @argumentList.removal.end.startOf @argumentOrParameter.iteration.end.startOf
+ ) @_dummy @argumentList.domain @argumentOrParameter.iteration.domain
+ (#type? @_dummy function_declaration protocol_function_declaration init_declaration)
+ (#single-or-multi-line-delimiter! @argumentList.start @_dummy ", " ",\n")
+)
+
+;;!! func foo() {}
+;;! ><
+;;!! init() {}
+;;! ><
+(
+ [
+ (function_declaration
+ "(" @argumentList.start.endOf @argumentList.removal.start.endOf @argumentOrParameter.iteration.start.endOf
+ .
+ ")" @argumentList.end.startOf @argumentList.removal.end.startOf @argumentOrParameter.iteration.end.startOf
+ )
+ (protocol_function_declaration
+ "(" @argumentList.start.endOf @argumentList.removal.start.endOf @argumentOrParameter.iteration.start.endOf
+ .
+ ")" @argumentList.end.startOf @argumentList.removal.end.startOf @argumentOrParameter.iteration.end.startOf
+ )
+ (init_declaration
+ "(" @argumentList.start.endOf @argumentList.removal.start.endOf @argumentOrParameter.iteration.start.endOf
+ .
+ ")" @argumentList.end.startOf @argumentList.removal.end.startOf @argumentOrParameter.iteration.end.startOf
+ )
+ ] @argumentList.domain @argumentOrParameter.iteration.domain
+ (#insertion-delimiter! @argumentList.start.endOf "")
+)
+
+;;!! { (aaa, bbb) in }
+;;! ^^^^^^^^
+(
+ (lambda_literal
+ (lambda_function_type
+ "(" @argumentList.removal.start.endOf @argumentOrParameter.iteration.start.endOf
+ (lambda_function_type_parameters) @_dummy @argumentList
+ ")" @argumentList.removal.end.startOf @argumentOrParameter.iteration.end.startOf
+ )
+ ) @argumentList.domain @argumentOrParameter.iteration.domain
+ (#single-or-multi-line-delimiter! @argumentList @_dummy ", " ",\n")
+ (#child-range! @argumentList 0 -1)
+)
+
+;;!! { () in }
+;;! ><
+(
+ (lambda_literal
+ (lambda_function_type
+ "(" @argumentList.start.endOf @argumentList.removal.start.endOf @argumentOrParameter.iteration.start.endOf
+ .
+ ")" @argumentList.end.startOf @argumentList.removal.end.startOf @argumentOrParameter.iteration.end.startOf
+ )
+ ) @argumentList.domain @argumentOrParameter.iteration.domain
+ (#insertion-delimiter! @argumentList.start.endOf "")
+)
+
+;;!! foo(aaa, bbb)
+;;! ^^^^^^^^
+(call_expression
+ (call_suffix
+ (value_arguments
+ "(" @argumentList.removal.start.endOf @argumentOrParameter.iteration.start.endOf
+ ")" @argumentList.removal.end.startOf @argumentOrParameter.iteration.end.startOf
+ ) @argumentList
+ (#empty-single-multi-delimiter! @argumentList @argumentList "" ", " ",\n")
+ (#child-range! @argumentList 1 -2)
+ )
+) @argumentList.domain @argumentOrParameter.iteration.domain
+
+;;!! foo(aaa: 0, bbb: 1)
+;;! ^^^ ^^^
+;;! ^ ^
+(value_argument
+ name: (_) @name @value.leading.endOf
+ value: (_) @value @name.trailing.startOf
+) @_.domain
+
+;;!! foo(aaa: 0, bbb: 1)
+;;! ^^^^^^^^^^^^^^
+(value_arguments
+ "(" @name.iteration.start.endOf @value.iteration.start.endOf
+ ")" @name.iteration.end.startOf @value.iteration.end.startOf
+)
+
+;;!! func bar(aaa: Int, bbb: Int = 0) {}
+;;! ^^^ ^^^
+;;! ^^^ ^^^
+;;! ^
+(
+ (parameter
+ (_) @name @type.leading.endOf
+ ":"
+ (_) @type
+ ) @_.domain.start @value.leading.endOf
+ .
+ (
+ "="
+ .
+ default_value: (_) @value @_.domain.end
+ )?
+)
+
+;;!! func bar(aaa: Int, bbb: Int) {}
+;;! ^^^^^^^^^^^^^^^^^^
+(function_declaration
+ "(" @name.iteration.start.endOf @value.iteration.start.endOf @type.iteration.start.endOf
+ ")" @name.iteration.end.startOf @value.iteration.end.startOf @type.iteration.end.startOf
+)
+
+;;!! init(aaa: Int, bbb: Int) {}
+;;! ^^^^^^^^^^^^^^^^^^
+(init_declaration
+ "(" @name.iteration.start.endOf @value.iteration.start.endOf @type.iteration.start.endOf
+ ")" @name.iteration.end.startOf @value.iteration.end.startOf @type.iteration.end.startOf
+)
+
+;;!! { (aaa: Int, bbb: Int) in }
+;;! ^^^^^^^^^^^^^^^^^^
+(lambda_function_type_parameters) @name.iteration @type.iteration
+
+(comparison_expression
+ op: [
+ "<"
+ ">"
+ ] @disqualifyDelimiter
+)
+
+(bitwise_operation
+ op: [
+ "<<"
+ ">>"
+ ] @disqualifyDelimiter
+)
+
+;; <=, >= and user custom operators
+(infix_expression
+ (custom_operator) @disqualifyDelimiter
+)
+
+(range_expression
+ op: "..<" @disqualifyDelimiter
+)
+
+(open_start_range_expression
+ "..<" @disqualifyDelimiter
+)
+
+(function_type
+ "->" @disqualifyDelimiter
+)