diff --git a/data/fixtures/recorded/languages/rust/chuckName.yml b/data/fixtures/recorded/languages/rust/chuckName.yml index 464a24c203..5f9aca9b09 100644 --- a/data/fixtures/recorded/languages/rust/chuckName.yml +++ b/data/fixtures/recorded/languages/rust/chuckName.yml @@ -17,7 +17,7 @@ initialState: active: {line: 0, character: 5} marks: {} finalState: - documentContents: "let mut: [i32; 3] = [0; 3];" + documentContents: "[0; 3];" selections: - - anchor: {line: 0, character: 5} - active: {line: 0, character: 5} + - anchor: {line: 0, character: 0} + active: {line: 0, character: 0} diff --git a/data/fixtures/scopes/c/name/name.constant.scope b/data/fixtures/scopes/c/name/name.constant.scope new file mode 100644 index 0000000000..1c100372ae --- /dev/null +++ b/data/fixtures/scopes/c/name/name.constant.scope @@ -0,0 +1,24 @@ +const int foo = 0; +--- + +[Content] = 0:10-0:13 + >---< +0| const int foo = 0; + +[Removal] = 0:0-0:16 + >----------------< +0| const int foo = 0; + +[Leading delimiter] = 0:9-0:10 + >-< +0| const int foo = 0; + +[Trailing delimiter] = 0:13-0:14 + >-< +0| const int foo = 0; + +[Domain] = 0:0-0:18 + >------------------< +0| const int foo = 0; + +[Insertion delimiter] = " " diff --git a/data/fixtures/scopes/c/name/name.field.class.scope b/data/fixtures/scopes/c/name/name.field.class.scope index 6e3ee80426..ba9ddb2d64 100644 --- a/data/fixtures/scopes/c/name/name.field.class.scope +++ b/data/fixtures/scopes/c/name/name.field.class.scope @@ -1,20 +1,45 @@ -struct { int foo; }; +struct foo { + int bar; +}; --- -[Content] = 0:13-0:16 - >---< -0| struct { int foo; }; +[#1 Content] = 0:7-0:10 + >---< +0| struct foo { -[Removal] = 0:12-0:16 - >----< -0| struct { int foo; }; +[#1 Removal] = 0:7-0:11 + >----< +0| struct foo { -[Leading delimiter] = 0:12-0:13 - >-< -0| struct { int foo; }; +[#1 Leading delimiter] = 0:6-0:7 + >-< +0| struct foo { -[Domain] = 0:9-0:17 - >--------< -0| struct { int foo; }; +[#1 Trailing delimiter] = 0:10-0:11 + >-< +0| struct foo { -[Insertion delimiter] = " " +[#1 Domain] = 0:0-2:2 + >------------ +0| struct foo { +1| int bar; +2| }; + --< + +[#1 Insertion delimiter] = " " + + +[#2 Content] = 1:8-1:11 + >---< +1| int bar; + +[#2 Removal] = +[#2 Domain] = 1:4-1:12 + >--------< +1| int bar; + +[#2 Leading delimiter] = 1:7-1:8 + >-< +1| int bar; + +[#2 Insertion delimiter] = " " diff --git a/data/fixtures/scopes/c/name/name.field.class2.scope b/data/fixtures/scopes/c/name/name.field.class2.scope index 1e7993f440..dcbb88eb80 100644 --- a/data/fixtures/scopes/c/name/name.field.class2.scope +++ b/data/fixtures/scopes/c/name/name.field.class2.scope @@ -1,20 +1,45 @@ -union { int foo; }; +union foo { + int bar; +}; --- -[Content] = 0:12-0:15 - >---< -0| union { int foo; }; +[#1 Content] = 0:6-0:9 + >---< +0| union foo { -[Removal] = 0:11-0:15 - >----< -0| union { int foo; }; +[#1 Removal] = 0:6-0:10 + >----< +0| union foo { -[Leading delimiter] = 0:11-0:12 - >-< -0| union { int foo; }; +[#1 Leading delimiter] = 0:5-0:6 + >-< +0| union foo { -[Domain] = 0:8-0:16 - >--------< -0| union { int foo; }; +[#1 Trailing delimiter] = 0:9-0:10 + >-< +0| union foo { -[Insertion delimiter] = " " +[#1 Domain] = 0:0-2:2 + >----------- +0| union foo { +1| int bar; +2| }; + --< + +[#1 Insertion delimiter] = " " + + +[#2 Content] = 1:8-1:11 + >---< +1| int bar; + +[#2 Removal] = +[#2 Domain] = 1:4-1:12 + >--------< +1| int bar; + +[#2 Leading delimiter] = 1:7-1:8 + >-< +1| int bar; + +[#2 Insertion delimiter] = " " diff --git a/data/fixtures/scopes/c/name/name.field.enum.scope b/data/fixtures/scopes/c/name/name.field.enum.scope index be33789056..c4bc85d925 100644 --- a/data/fixtures/scopes/c/name/name.field.enum.scope +++ b/data/fixtures/scopes/c/name/name.field.enum.scope @@ -37,16 +37,12 @@ enum Foo { >---< 1| bar = 0, -[#2 Removal] = 1:4-1:8 - >----< +[#2 Removal] = 1:4-1:10 + >------< 1| bar = 0, -[#2 Leading delimiter] = 1:0-1:4 - >----< -1| bar = 0, - -[#2 Trailing delimiter] = 1:7-1:8 - >-< +[#2 Trailing delimiter] = 1:7-1:10 + >---< 1| bar = 0, [#2 Domain] = 1:4-1:11 @@ -60,16 +56,12 @@ enum Foo { >---< 2| baz = 1, -[#3 Removal] = 2:4-2:8 - >----< -2| baz = 1, - -[#3 Leading delimiter] = 2:0-2:4 - >----< +[#3 Removal] = 2:4-2:10 + >------< 2| baz = 1, -[#3 Trailing delimiter] = 2:7-2:8 - >-< +[#3 Trailing delimiter] = 2:7-2:10 + >---< 2| baz = 1, [#3 Domain] = 2:4-2:11 diff --git a/data/fixtures/scopes/c/name/name.variable.scope b/data/fixtures/scopes/c/name/name.variable.initialized.scope similarity index 100% rename from data/fixtures/scopes/c/name/name.variable.scope rename to data/fixtures/scopes/c/name/name.variable.initialized.scope diff --git a/data/fixtures/scopes/c/name/name.variable.uninitialized.scope b/data/fixtures/scopes/c/name/name.variable.uninitialized.scope new file mode 100644 index 0000000000..01e8468729 --- /dev/null +++ b/data/fixtures/scopes/c/name/name.variable.uninitialized.scope @@ -0,0 +1,17 @@ +int foo; +--- + +[Content] = 0:4-0:7 + >---< +0| int foo; + +[Removal] = +[Domain] = 0:0-0:8 + >--------< +0| int foo; + +[Leading delimiter] = 0:3-0:4 + >-< +0| int foo; + +[Insertion delimiter] = " " diff --git a/data/fixtures/scopes/c/statement/statement.constant.scope b/data/fixtures/scopes/c/statement/statement.constant.scope new file mode 100644 index 0000000000..08e9c51c2a --- /dev/null +++ b/data/fixtures/scopes/c/statement/statement.constant.scope @@ -0,0 +1,10 @@ +const int foo = 0; +--- + +[Content] = +[Removal] = +[Domain] = 0:0-0:18 + >------------------< +0| const int foo = 0; + +[Insertion delimiter] = "\n" diff --git a/data/fixtures/scopes/c/statement/statement.variable.scope b/data/fixtures/scopes/c/statement/statement.variable.initialized.scope similarity index 100% rename from data/fixtures/scopes/c/statement/statement.variable.scope rename to data/fixtures/scopes/c/statement/statement.variable.initialized.scope diff --git a/data/fixtures/scopes/c/statement/statement.variable.uninitialized.scope b/data/fixtures/scopes/c/statement/statement.variable.uninitialized.scope new file mode 100644 index 0000000000..b1c55b3d76 --- /dev/null +++ b/data/fixtures/scopes/c/statement/statement.variable.uninitialized.scope @@ -0,0 +1,10 @@ +int foo; +--- + +[Content] = +[Removal] = +[Domain] = 0:0-0:8 + >--------< +0| int foo; + +[Insertion delimiter] = "\n" diff --git a/data/fixtures/scopes/c/type/type.constant.scope b/data/fixtures/scopes/c/type/type.constant.scope new file mode 100644 index 0000000000..a36046e407 --- /dev/null +++ b/data/fixtures/scopes/c/type/type.constant.scope @@ -0,0 +1,24 @@ +const int foo = 0; +--- + +[Content] = 0:6-0:9 + >---< +0| const int foo = 0; + +[Removal] = 0:6-0:10 + >----< +0| const int foo = 0; + +[Leading delimiter] = 0:5-0:6 + >-< +0| const int foo = 0; + +[Trailing delimiter] = 0:9-0:10 + >-< +0| const int foo = 0; + +[Domain] = 0:0-0:18 + >------------------< +0| const int foo = 0; + +[Insertion delimiter] = " " diff --git a/data/fixtures/scopes/c/type/type.variable2.scope b/data/fixtures/scopes/c/type/type.variable.initialized.scope similarity index 100% rename from data/fixtures/scopes/c/type/type.variable2.scope rename to data/fixtures/scopes/c/type/type.variable.initialized.scope diff --git a/data/fixtures/scopes/c/type/type.variable.scope b/data/fixtures/scopes/c/type/type.variable.uninitialized.scope similarity index 100% rename from data/fixtures/scopes/c/type/type.variable.scope rename to data/fixtures/scopes/c/type/type.variable.uninitialized.scope diff --git a/data/fixtures/scopes/c/value/value.constant.scope b/data/fixtures/scopes/c/value/value.constant.scope new file mode 100644 index 0000000000..ef4c0a7e95 --- /dev/null +++ b/data/fixtures/scopes/c/value/value.constant.scope @@ -0,0 +1,20 @@ +const int foo = 0; +--- + +[Content] = 0:16-0:17 + >-< +0| const int foo = 0; + +[Removal] = 0:13-0:17 + >----< +0| const int foo = 0; + +[Leading delimiter] = 0:13-0:16 + >---< +0| const int foo = 0; + +[Domain] = 0:0-0:18 + >------------------< +0| const int foo = 0; + +[Insertion delimiter] = " " diff --git a/data/fixtures/scopes/cpp/name/name.field.class.scope b/data/fixtures/scopes/cpp/name/name.field.class.scope index 91f93b5cc5..3758bdddea 100644 --- a/data/fixtures/scopes/cpp/name/name.field.class.scope +++ b/data/fixtures/scopes/cpp/name/name.field.class.scope @@ -35,18 +35,15 @@ class Foo { >---< 1| int bar; -[#2 Removal] = 1:7-1:11 - >----< +[#2 Removal] = +[#2 Domain] = 1:4-1:12 + >--------< 1| int bar; [#2 Leading delimiter] = 1:7-1:8 >-< 1| int bar; -[#2 Domain] = 1:4-1:12 - >--------< -1| int bar; - [#2 Insertion delimiter] = " " @@ -54,16 +51,12 @@ class Foo { >---< 2| int baz = 1; -[#3 Removal] = 2:8-2:12 - >----< +[#3 Removal] = 2:4-2:14 + >----------< 2| int baz = 1; -[#3 Leading delimiter] = 2:7-2:8 - >-< -2| int baz = 1; - -[#3 Trailing delimiter] = 2:11-2:12 - >-< +[#3 Leading delimiter] = 2:8-2:11 + >---< 2| int baz = 1; [#3 Domain] = 2:4-2:16 diff --git a/data/fixtures/scopes/cpp/name/name.field.enum.scope b/data/fixtures/scopes/cpp/name/name.field.enum.scope index 6fc638a279..0e5601140a 100644 --- a/data/fixtures/scopes/cpp/name/name.field.enum.scope +++ b/data/fixtures/scopes/cpp/name/name.field.enum.scope @@ -37,16 +37,12 @@ enum class Foo { >---< 1| bar = 0, -[#2 Removal] = 1:4-1:8 - >----< +[#2 Removal] = 1:4-1:10 + >------< 1| bar = 0, -[#2 Leading delimiter] = 1:0-1:4 - >----< -1| bar = 0, - -[#2 Trailing delimiter] = 1:7-1:8 - >-< +[#2 Trailing delimiter] = 1:7-1:10 + >---< 1| bar = 0, [#2 Domain] = 1:4-1:11 @@ -60,16 +56,12 @@ enum class Foo { >---< 2| baz = 1, -[#3 Removal] = 2:4-2:8 - >----< -2| baz = 1, - -[#3 Leading delimiter] = 2:0-2:4 - >----< +[#3 Removal] = 2:4-2:10 + >------< 2| baz = 1, -[#3 Trailing delimiter] = 2:7-2:8 - >-< +[#3 Trailing delimiter] = 2:7-2:10 + >---< 2| baz = 1, [#3 Domain] = 2:4-2:11 diff --git a/data/fixtures/scopes/cpp/type/type.field.class.scope b/data/fixtures/scopes/cpp/type/type.field.class.scope index f38bc25a02..528fd810c8 100644 --- a/data/fixtures/scopes/cpp/type/type.field.class.scope +++ b/data/fixtures/scopes/cpp/type/type.field.class.scope @@ -1,6 +1,6 @@ class Foo { int bar; - int baz = 1; + int baz = 0; } --- @@ -10,7 +10,7 @@ class Foo { >----------- 0| class Foo { 1| int bar; -2| int baz = 1; +2| int baz = 0; 3| } -< @@ -42,22 +42,22 @@ class Foo { [#3 Content] = 2:4-2:7 >---< -2| int baz = 1; +2| int baz = 0; [#3 Removal] = 2:4-2:8 >----< -2| int baz = 1; +2| int baz = 0; [#3 Leading delimiter] = 2:0-2:4 >----< -2| int baz = 1; +2| int baz = 0; [#3 Trailing delimiter] = 2:7-2:8 >-< -2| int baz = 1; +2| int baz = 0; [#3 Domain] = 2:4-2:16 >------------< -2| int baz = 1; +2| int baz = 0; [#3 Insertion delimiter] = " " diff --git a/data/fixtures/scopes/csharp/name/name.constant.scope b/data/fixtures/scopes/csharp/name/name.constant.scope new file mode 100644 index 0000000000..1c100372ae --- /dev/null +++ b/data/fixtures/scopes/csharp/name/name.constant.scope @@ -0,0 +1,24 @@ +const int foo = 0; +--- + +[Content] = 0:10-0:13 + >---< +0| const int foo = 0; + +[Removal] = 0:0-0:16 + >----------------< +0| const int foo = 0; + +[Leading delimiter] = 0:9-0:10 + >-< +0| const int foo = 0; + +[Trailing delimiter] = 0:13-0:14 + >-< +0| const int foo = 0; + +[Domain] = 0:0-0:18 + >------------------< +0| const int foo = 0; + +[Insertion delimiter] = " " diff --git a/data/fixtures/scopes/csharp/name/name.field.class.scope b/data/fixtures/scopes/csharp/name/name.field.class.scope index aab4cc8539..70e4b1860e 100644 --- a/data/fixtures/scopes/csharp/name/name.field.class.scope +++ b/data/fixtures/scopes/csharp/name/name.field.class.scope @@ -35,8 +35,8 @@ class Foo { >---< 1| int bar; -[#2 Removal] = 1:7-1:11 - >----< +[#2 Removal] = 1:4-1:11 + >-------< 1| int bar; [#2 Leading delimiter] = 1:7-1:8 @@ -54,8 +54,8 @@ class Foo { >---< 2| int baz = 0; -[#3 Removal] = 2:8-2:12 - >----< +[#3 Removal] = 2:4-2:14 + >----------< 2| int baz = 0; [#3 Leading delimiter] = 2:7-2:8 diff --git a/data/fixtures/scopes/csharp/name/name.field.enum.scope b/data/fixtures/scopes/csharp/name/name.field.enum.scope index be33789056..7807b59aa4 100644 --- a/data/fixtures/scopes/csharp/name/name.field.enum.scope +++ b/data/fixtures/scopes/csharp/name/name.field.enum.scope @@ -37,16 +37,12 @@ enum Foo { >---< 1| bar = 0, -[#2 Removal] = 1:4-1:8 - >----< +[#2 Removal] = 1:4-1:10 + >------< 1| bar = 0, -[#2 Leading delimiter] = 1:0-1:4 - >----< -1| bar = 0, - -[#2 Trailing delimiter] = 1:7-1:8 - >-< +[#2 Trailing delimiter] = 1:7-1:10 + >---< 1| bar = 0, [#2 Domain] = 1:4-1:11 @@ -60,16 +56,12 @@ enum Foo { >---< 2| baz = 1, -[#3 Removal] = 2:4-2:8 - >----< -2| baz = 1, - -[#3 Leading delimiter] = 2:0-2:4 - >----< +[#3 Removal] = 2:4-2:10 + >------< 2| baz = 1, -[#3 Trailing delimiter] = 2:7-2:8 - >-< +[#3 Trailing delimiter] = 2:7-2:10 + >---< 2| baz = 1, [#3 Domain] = 2:4-2:11 @@ -77,21 +69,3 @@ enum Foo { 2| baz = 1, [#3 Insertion delimiter] = " " - - -[#4 Content] = -[#4 Domain] = 3:4-3:9 - >-----< -3| bongo - -[#4 Removal] = 3:0-4:0 - >--------- -3| bongo -4| } - < - -[#4 Leading delimiter] = 3:0-3:4 - >----< -3| bongo - -[#4 Insertion delimiter] = " " diff --git a/data/fixtures/scopes/csharp/name/name.field.interface.scope b/data/fixtures/scopes/csharp/name/name.field.interface.scope index 94cb5a92cd..6899149376 100644 --- a/data/fixtures/scopes/csharp/name/name.field.interface.scope +++ b/data/fixtures/scopes/csharp/name/name.field.interface.scope @@ -33,8 +33,8 @@ interface IFoo { >---< 1| int bar; -[#2 Removal] = 1:7-1:11 - >----< +[#2 Removal] = 1:4-1:11 + >-------< 1| int bar; [#2 Leading delimiter] = 1:7-1:8 diff --git a/data/fixtures/scopes/csharp/name/name.variable.scope b/data/fixtures/scopes/csharp/name/name.variable.initialized.scope similarity index 88% rename from data/fixtures/scopes/csharp/name/name.variable.scope rename to data/fixtures/scopes/csharp/name/name.variable.initialized.scope index 65a4094cae..c0828198a5 100644 --- a/data/fixtures/scopes/csharp/name/name.variable.scope +++ b/data/fixtures/scopes/csharp/name/name.variable.initialized.scope @@ -5,8 +5,8 @@ int foo = 0; >---< 0| int foo = 0; -[Removal] = 0:4-0:8 - >----< +[Removal] = 0:0-0:10 + >----------< 0| int foo = 0; [Leading delimiter] = 0:3-0:4 diff --git a/data/fixtures/scopes/csharp/name/name.variable.initialized2.scope b/data/fixtures/scopes/csharp/name/name.variable.initialized2.scope new file mode 100644 index 0000000000..263bc28906 --- /dev/null +++ b/data/fixtures/scopes/csharp/name/name.variable.initialized2.scope @@ -0,0 +1,24 @@ +var foo = 0; +--- + +[Content] = 0:4-0:7 + >---< +0| var foo = 0; + +[Removal] = 0:0-0:10 + >----------< +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:12 + >------------< +0| var foo = 0; + +[Insertion delimiter] = " " diff --git a/data/fixtures/scopes/csharp/name/name.variable.uninitialized.scope b/data/fixtures/scopes/csharp/name/name.variable.uninitialized.scope new file mode 100644 index 0000000000..ceee24b3b0 --- /dev/null +++ b/data/fixtures/scopes/csharp/name/name.variable.uninitialized.scope @@ -0,0 +1,20 @@ +int foo; +--- + +[Content] = 0:4-0:7 + >---< +0| int foo; + +[Removal] = 0:0-0:7 + >-------< +0| int foo; + +[Leading delimiter] = 0:3-0:4 + >-< +0| int foo; + +[Domain] = 0:0-0:8 + >--------< +0| int foo; + +[Insertion delimiter] = " " diff --git a/data/fixtures/scopes/csharp/statement/statement.constant.scope b/data/fixtures/scopes/csharp/statement/statement.constant.scope new file mode 100644 index 0000000000..08e9c51c2a --- /dev/null +++ b/data/fixtures/scopes/csharp/statement/statement.constant.scope @@ -0,0 +1,10 @@ +const int foo = 0; +--- + +[Content] = +[Removal] = +[Domain] = 0:0-0:18 + >------------------< +0| const int foo = 0; + +[Insertion delimiter] = "\n" diff --git a/data/fixtures/scopes/csharp/statement/statement.variable.scope b/data/fixtures/scopes/csharp/statement/statement.variable.initialized.scope similarity index 100% rename from data/fixtures/scopes/csharp/statement/statement.variable.scope rename to data/fixtures/scopes/csharp/statement/statement.variable.initialized.scope diff --git a/data/fixtures/scopes/kotlin/statement/statement.variable2.scope b/data/fixtures/scopes/csharp/statement/statement.variable.initialized2.scope similarity index 76% rename from data/fixtures/scopes/kotlin/statement/statement.variable2.scope rename to data/fixtures/scopes/csharp/statement/statement.variable.initialized2.scope index a69afa0fed..7fba2976e6 100644 --- a/data/fixtures/scopes/kotlin/statement/statement.variable2.scope +++ b/data/fixtures/scopes/csharp/statement/statement.variable.initialized2.scope @@ -1,10 +1,10 @@ -val foo: Int +var foo = 0; --- [Content] = [Removal] = [Domain] = 0:0-0:12 >------------< -0| val foo: Int +0| var foo = 0; [Insertion delimiter] = "\n" diff --git a/data/fixtures/scopes/csharp/statement/statement.variable.uninitialized.scope b/data/fixtures/scopes/csharp/statement/statement.variable.uninitialized.scope new file mode 100644 index 0000000000..b1c55b3d76 --- /dev/null +++ b/data/fixtures/scopes/csharp/statement/statement.variable.uninitialized.scope @@ -0,0 +1,10 @@ +int foo; +--- + +[Content] = +[Removal] = +[Domain] = 0:0-0:8 + >--------< +0| int foo; + +[Insertion delimiter] = "\n" diff --git a/data/fixtures/scopes/csharp/type/type.constant.scope b/data/fixtures/scopes/csharp/type/type.constant.scope new file mode 100644 index 0000000000..a36046e407 --- /dev/null +++ b/data/fixtures/scopes/csharp/type/type.constant.scope @@ -0,0 +1,24 @@ +const int foo = 0; +--- + +[Content] = 0:6-0:9 + >---< +0| const int foo = 0; + +[Removal] = 0:6-0:10 + >----< +0| const int foo = 0; + +[Leading delimiter] = 0:5-0:6 + >-< +0| const int foo = 0; + +[Trailing delimiter] = 0:9-0:10 + >-< +0| const int foo = 0; + +[Domain] = 0:0-0:18 + >------------------< +0| const int foo = 0; + +[Insertion delimiter] = " " diff --git a/data/fixtures/scopes/csharp/type/type.variable2.scope b/data/fixtures/scopes/csharp/type/type.variable.initialized.scope similarity index 100% rename from data/fixtures/scopes/csharp/type/type.variable2.scope rename to data/fixtures/scopes/csharp/type/type.variable.initialized.scope diff --git a/data/fixtures/scopes/csharp/type/type.variable.scope b/data/fixtures/scopes/csharp/type/type.variable.uninitialized.scope similarity index 100% rename from data/fixtures/scopes/csharp/type/type.variable.scope rename to data/fixtures/scopes/csharp/type/type.variable.uninitialized.scope diff --git a/data/fixtures/scopes/csharp/value/value.constant.scope b/data/fixtures/scopes/csharp/value/value.constant.scope new file mode 100644 index 0000000000..ef4c0a7e95 --- /dev/null +++ b/data/fixtures/scopes/csharp/value/value.constant.scope @@ -0,0 +1,20 @@ +const int foo = 0; +--- + +[Content] = 0:16-0:17 + >-< +0| const int foo = 0; + +[Removal] = 0:13-0:17 + >----< +0| const int foo = 0; + +[Leading delimiter] = 0:13-0:16 + >---< +0| const int foo = 0; + +[Domain] = 0:0-0:18 + >------------------< +0| const int foo = 0; + +[Insertion delimiter] = " " diff --git a/data/fixtures/scopes/csharp/value/value.variable2.scope b/data/fixtures/scopes/csharp/value/value.variable2.scope new file mode 100644 index 0000000000..28cc6fc03f --- /dev/null +++ b/data/fixtures/scopes/csharp/value/value.variable2.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:12 + >------------< +0| var foo = 0; + +[Insertion delimiter] = " " diff --git a/data/fixtures/scopes/go/name/name.constant.scope b/data/fixtures/scopes/go/name/name.constant.scope new file mode 100644 index 0000000000..a57b6bfe63 --- /dev/null +++ b/data/fixtures/scopes/go/name/name.constant.scope @@ -0,0 +1,24 @@ +const foo int = 0 +--- + +[Content] = 0:6-0:9 + >---< +0| const foo int = 0 + +[Removal] = 0:0-0:16 + >----------------< +0| const foo int = 0 + +[Leading delimiter] = 0:5-0:6 + >-< +0| const foo int = 0 + +[Trailing delimiter] = 0:9-0:10 + >-< +0| const foo int = 0 + +[Domain] = 0:0-0:17 + >-----------------< +0| const foo int = 0 + +[Insertion delimiter] = " " diff --git a/data/fixtures/scopes/go/name/name.variable2.scope b/data/fixtures/scopes/go/name/name.variable.initialized.scope similarity index 88% rename from data/fixtures/scopes/go/name/name.variable2.scope rename to data/fixtures/scopes/go/name/name.variable.initialized.scope index 11adc00523..53488557ba 100644 --- a/data/fixtures/scopes/go/name/name.variable2.scope +++ b/data/fixtures/scopes/go/name/name.variable.initialized.scope @@ -5,8 +5,8 @@ var foo int = 0 >---< 0| var foo int = 0 -[Removal] = 0:4-0:8 - >----< +[Removal] = 0:0-0:14 + >--------------< 0| var foo int = 0 [Leading delimiter] = 0:3-0:4 diff --git a/data/fixtures/scopes/go/name/name.variable3.scope b/data/fixtures/scopes/go/name/name.variable.initialized2.scope similarity index 85% rename from data/fixtures/scopes/go/name/name.variable3.scope rename to data/fixtures/scopes/go/name/name.variable.initialized2.scope index cda5dd235d..3d7ef77aab 100644 --- a/data/fixtures/scopes/go/name/name.variable3.scope +++ b/data/fixtures/scopes/go/name/name.variable.initialized2.scope @@ -5,8 +5,8 @@ foo := 0 >---< 0| foo := 0 -[Removal] = 0:0-0:4 - >----< +[Removal] = 0:0-0:7 + >-------< 0| foo := 0 [Trailing delimiter] = 0:3-0:4 diff --git a/data/fixtures/scopes/go/name/name.variable.scope b/data/fixtures/scopes/go/name/name.variable.uninitialized.scope similarity index 84% rename from data/fixtures/scopes/go/name/name.variable.scope rename to data/fixtures/scopes/go/name/name.variable.uninitialized.scope index 78abad522f..606bb45554 100644 --- a/data/fixtures/scopes/go/name/name.variable.scope +++ b/data/fixtures/scopes/go/name/name.variable.uninitialized.scope @@ -5,8 +5,9 @@ var foo int >---< 0| var foo int -[Removal] = 0:4-0:8 - >----< +[Removal] = +[Domain] = 0:0-0:11 + >-----------< 0| var foo int [Leading delimiter] = 0:3-0:4 @@ -17,8 +18,4 @@ var foo int >-< 0| var foo int -[Domain] = 0:0-0:11 - >-----------< -0| var foo int - [Insertion delimiter] = " " diff --git a/data/fixtures/scopes/go/statement/statement.constant.scope b/data/fixtures/scopes/go/statement/statement.constant.scope new file mode 100644 index 0000000000..bb32ec7fb0 --- /dev/null +++ b/data/fixtures/scopes/go/statement/statement.constant.scope @@ -0,0 +1,10 @@ +const foo int = 0 +--- + +[Content] = +[Removal] = +[Domain] = 0:0-0:17 + >-----------------< +0| const foo int = 0 + +[Insertion delimiter] = "\n" diff --git a/data/fixtures/scopes/go/statement/statement.variable2.scope b/data/fixtures/scopes/go/statement/statement.variable.initialized.scope similarity index 100% rename from data/fixtures/scopes/go/statement/statement.variable2.scope rename to data/fixtures/scopes/go/statement/statement.variable.initialized.scope diff --git a/data/fixtures/scopes/go/statement/statement.variable3.scope b/data/fixtures/scopes/go/statement/statement.variable.initialized2.scope similarity index 100% rename from data/fixtures/scopes/go/statement/statement.variable3.scope rename to data/fixtures/scopes/go/statement/statement.variable.initialized2.scope diff --git a/data/fixtures/scopes/go/statement/statement.variable.scope b/data/fixtures/scopes/go/statement/statement.variable.uninitialized.scope similarity index 100% rename from data/fixtures/scopes/go/statement/statement.variable.scope rename to data/fixtures/scopes/go/statement/statement.variable.uninitialized.scope diff --git a/data/fixtures/scopes/go/type/type.constant.scope b/data/fixtures/scopes/go/type/type.constant.scope new file mode 100644 index 0000000000..07aa95e670 --- /dev/null +++ b/data/fixtures/scopes/go/type/type.constant.scope @@ -0,0 +1,24 @@ +const foo int = 0 +--- + +[Content] = 0:10-0:13 + >---< +0| const foo int = 0 + +[Removal] = 0:10-0:14 + >----< +0| const foo int = 0 + +[Leading delimiter] = 0:9-0:10 + >-< +0| const foo int = 0 + +[Trailing delimiter] = 0:13-0:14 + >-< +0| const foo int = 0 + +[Domain] = 0:0-0:17 + >-----------------< +0| const foo int = 0 + +[Insertion delimiter] = " " diff --git a/data/fixtures/scopes/go/type/type.variable2.scope b/data/fixtures/scopes/go/type/type.variable.initialized.scope similarity index 100% rename from data/fixtures/scopes/go/type/type.variable2.scope rename to data/fixtures/scopes/go/type/type.variable.initialized.scope diff --git a/data/fixtures/scopes/go/type/type.variable.scope b/data/fixtures/scopes/go/type/type.variable.uninitialized.scope similarity index 100% rename from data/fixtures/scopes/go/type/type.variable.scope rename to data/fixtures/scopes/go/type/type.variable.uninitialized.scope diff --git a/data/fixtures/scopes/go/value/value.constant.scope b/data/fixtures/scopes/go/value/value.constant.scope new file mode 100644 index 0000000000..7f34604dfe --- /dev/null +++ b/data/fixtures/scopes/go/value/value.constant.scope @@ -0,0 +1,20 @@ +const foo int = 0 +--- + +[Content] = 0:16-0:17 + >-< +0| const foo int = 0 + +[Removal] = 0:13-0:17 + >----< +0| const foo int = 0 + +[Leading delimiter] = 0:13-0:16 + >---< +0| const foo int = 0 + +[Domain] = 0:0-0:17 + >-----------------< +0| const foo int = 0 + +[Insertion delimiter] = " " diff --git a/data/fixtures/scopes/java/name/name.constant.scope b/data/fixtures/scopes/java/name/name.constant.scope new file mode 100644 index 0000000000..9e3e536f22 --- /dev/null +++ b/data/fixtures/scopes/java/name/name.constant.scope @@ -0,0 +1,24 @@ +final int foo = 0; +--- + +[Content] = 0:10-0:13 + >---< +0| final int foo = 0; + +[Removal] = 0:0-0:16 + >----------------< +0| final int foo = 0; + +[Leading delimiter] = 0:9-0:10 + >-< +0| final int foo = 0; + +[Trailing delimiter] = 0:13-0:14 + >-< +0| final int foo = 0; + +[Domain] = 0:0-0:18 + >------------------< +0| final int foo = 0; + +[Insertion delimiter] = " " diff --git a/data/fixtures/scopes/java/name/name.field.class.scope b/data/fixtures/scopes/java/name/name.field.class.scope index 2c2c5942d5..26e8cac0c7 100644 --- a/data/fixtures/scopes/java/name/name.field.class.scope +++ b/data/fixtures/scopes/java/name/name.field.class.scope @@ -1,6 +1,7 @@ public class Foo { private int bar; private int baz = 0; + @An int bongo = 0; } --- @@ -20,12 +21,13 @@ public class Foo { >-< 0| public class Foo { -[#1 Domain] = 0:0-3:1 +[#1 Domain] = 0:0-4:1 >------------------ 0| public class Foo { 1| private int bar; 2| private int baz = 0; -3| } +3| @An int bongo = 0; +4| } -< [#1 Insertion delimiter] = " " @@ -35,8 +37,8 @@ public class Foo { >---< 1| private int bar; -[#2 Removal] = 1:15-1:19 - >----< +[#2 Removal] = 1:4-1:19 + >---------------< 1| private int bar; [#2 Leading delimiter] = 1:15-1:16 @@ -54,12 +56,16 @@ public class Foo { >---< 2| private int baz = 0; -[#3 Removal] = 2:16-2:22 - >------< +[#3 Removal] = 2:4-2:22 + >------------------< 2| private int baz = 0; -[#3 Trailing delimiter] = 2:19-2:22 - >---< +[#3 Leading delimiter] = 2:15-2:16 + >-< +2| private int baz = 0; + +[#3 Trailing delimiter] = 2:19-2:20 + >-< 2| private int baz = 0; [#3 Domain] = 2:4-2:24 @@ -67,3 +73,26 @@ public class Foo { 2| private int baz = 0; [#3 Insertion delimiter] = " " + + +[#4 Content] = 3:12-3:17 + >-----< +3| @An int bongo = 0; + +[#4 Removal] = 3:4-3:20 + >----------------< +3| @An int bongo = 0; + +[#4 Leading delimiter] = 3:11-3:12 + >-< +3| @An int bongo = 0; + +[#4 Trailing delimiter] = 3:17-3:18 + >-< +3| @An int bongo = 0; + +[#4 Domain] = 3:4-3:22 + >------------------< +3| @An int bongo = 0; + +[#4 Insertion delimiter] = " " diff --git a/data/fixtures/scopes/java/name/name.field.enum.scope b/data/fixtures/scopes/java/name/name.field.enum.scope index d40f9e2933..576b5c26a4 100644 --- a/data/fixtures/scopes/java/name/name.field.enum.scope +++ b/data/fixtures/scopes/java/name/name.field.enum.scope @@ -1,6 +1,6 @@ public enum Foo { bar, - baz; + baz(); } --- @@ -24,7 +24,7 @@ public enum Foo { >----------------- 0| public enum Foo { 1| bar, -2| baz; +2| baz(); 3| } -< @@ -48,16 +48,16 @@ public enum Foo { [#3 Content] = -[#3 Domain] = 2:4-2:7 +[#3 Removal] = 2:4-2:7 >---< -2| baz; - -[#3 Removal] = 2:0-2:7 - >-------< -2| baz; +2| baz(); [#3 Leading delimiter] = 2:0-2:4 >----< -2| baz; +2| baz(); + +[#3 Domain] = 2:4-2:9 + >-----< +2| baz(); [#3 Insertion delimiter] = " " diff --git a/data/fixtures/scopes/java/name/name.field.interface.scope b/data/fixtures/scopes/java/name/name.field.interface.scope index 5aa2e06bca..70b5cb5271 100644 --- a/data/fixtures/scopes/java/name/name.field.interface.scope +++ b/data/fixtures/scopes/java/name/name.field.interface.scope @@ -33,8 +33,8 @@ public interface Foo { >---< 1| private int bar; -[#2 Removal] = 1:15-1:19 - >----< +[#2 Removal] = 1:4-1:19 + >---------------< 1| private int bar; [#2 Leading delimiter] = 1:15-1:16 diff --git a/data/fixtures/scopes/java/name/name.method2.scope b/data/fixtures/scopes/java/name/name.method2.scope index 84b4e78150..3654aa3891 100644 --- a/data/fixtures/scopes/java/name/name.method2.scope +++ b/data/fixtures/scopes/java/name/name.method2.scope @@ -1,5 +1,5 @@ public class Foo { - @baz + @An public void bar() {} } --- @@ -23,7 +23,7 @@ public class Foo { [#1 Domain] = 0:0-3:1 >------------------ 0| public class Foo { -1| @baz +1| @An 2| public void bar() {} 3| } -< @@ -41,8 +41,8 @@ public class Foo { 2| public void bar() {} [#2 Domain] = 1:4-2:24 - >---- -1| @baz + >--- +1| @An 2| public void bar() {} ------------------------< diff --git a/data/fixtures/scopes/java/name/name.variable.scope b/data/fixtures/scopes/java/name/name.variable.initialized.scope similarity index 57% rename from data/fixtures/scopes/java/name/name.variable.scope rename to data/fixtures/scopes/java/name/name.variable.initialized.scope index eadef68728..c0828198a5 100644 --- a/data/fixtures/scopes/java/name/name.variable.scope +++ b/data/fixtures/scopes/java/name/name.variable.initialized.scope @@ -5,12 +5,16 @@ int foo = 0; >---< 0| int foo = 0; -[Removal] = 0:4-0:10 - >------< +[Removal] = 0:0-0:10 + >----------< 0| int foo = 0; -[Trailing delimiter] = 0:7-0:10 - >---< +[Leading delimiter] = 0:3-0:4 + >-< +0| int foo = 0; + +[Trailing delimiter] = 0:7-0:8 + >-< 0| int foo = 0; [Domain] = 0:0-0:12 diff --git a/data/fixtures/scopes/java/name/name.variable.uninitialized.scope b/data/fixtures/scopes/java/name/name.variable.uninitialized.scope new file mode 100644 index 0000000000..ceee24b3b0 --- /dev/null +++ b/data/fixtures/scopes/java/name/name.variable.uninitialized.scope @@ -0,0 +1,20 @@ +int foo; +--- + +[Content] = 0:4-0:7 + >---< +0| int foo; + +[Removal] = 0:0-0:7 + >-------< +0| int foo; + +[Leading delimiter] = 0:3-0:4 + >-< +0| int foo; + +[Domain] = 0:0-0:8 + >--------< +0| int foo; + +[Insertion delimiter] = " " diff --git a/data/fixtures/scopes/java/namedFunction.method2.scope b/data/fixtures/scopes/java/namedFunction.method2.scope index 877c7afe23..be0ecc9835 100644 --- a/data/fixtures/scopes/java/namedFunction.method2.scope +++ b/data/fixtures/scopes/java/namedFunction.method2.scope @@ -1,25 +1,25 @@ public class Foo { - @baz + @An public void bar() {} } --- [Content] = [Domain] = 1:4-2:24 - >---- -1| @baz + >--- +1| @An 2| public void bar() {} ------------------------< [Removal] = 1:0-3:0 - >-------- -1| @baz + >------- +1| @An 2| public void bar() {} 3| } < [Leading delimiter] = 1:0-1:4 >----< -1| @baz +1| @An [Insertion delimiter] = "\n\n" diff --git a/data/fixtures/scopes/java/statement/statement.constant.scope b/data/fixtures/scopes/java/statement/statement.constant.scope new file mode 100644 index 0000000000..a87fe2e7f7 --- /dev/null +++ b/data/fixtures/scopes/java/statement/statement.constant.scope @@ -0,0 +1,10 @@ +final int foo = 0; +--- + +[Content] = +[Removal] = +[Domain] = 0:0-0:18 + >------------------< +0| final int foo = 0; + +[Insertion delimiter] = "\n" diff --git a/data/fixtures/scopes/java/statement/statement.method2.scope b/data/fixtures/scopes/java/statement/statement.method2.scope index 25b3db5e69..1256b884a5 100644 --- a/data/fixtures/scopes/java/statement/statement.method2.scope +++ b/data/fixtures/scopes/java/statement/statement.method2.scope @@ -1,5 +1,5 @@ public class Foo { - @baz + @An public void bar() {} } --- @@ -9,7 +9,7 @@ public class Foo { [#1 Domain] = 0:0-3:1 >------------------ 0| public class Foo { -1| @baz +1| @An 2| public void bar() {} 3| } -< @@ -19,20 +19,20 @@ public class Foo { [#2 Content] = [#2 Domain] = 1:4-2:24 - >---- -1| @baz + >--- +1| @An 2| public void bar() {} ------------------------< [#2 Removal] = 1:0-3:0 - >-------- -1| @baz + >------- +1| @An 2| public void bar() {} 3| } < [#2 Leading delimiter] = 1:0-1:4 >----< -1| @baz +1| @An [#2 Insertion delimiter] = "\n" diff --git a/data/fixtures/scopes/java/statement/statement.variable.scope b/data/fixtures/scopes/java/statement/statement.variable.initialized.scope similarity index 100% rename from data/fixtures/scopes/java/statement/statement.variable.scope rename to data/fixtures/scopes/java/statement/statement.variable.initialized.scope diff --git a/data/fixtures/scopes/java/statement/statement.variable.uninitialized.scope b/data/fixtures/scopes/java/statement/statement.variable.uninitialized.scope new file mode 100644 index 0000000000..b1c55b3d76 --- /dev/null +++ b/data/fixtures/scopes/java/statement/statement.variable.uninitialized.scope @@ -0,0 +1,10 @@ +int foo; +--- + +[Content] = +[Removal] = +[Domain] = 0:0-0:8 + >--------< +0| int foo; + +[Insertion delimiter] = "\n" diff --git a/data/fixtures/scopes/java/type/type.constant.scope b/data/fixtures/scopes/java/type/type.constant.scope new file mode 100644 index 0000000000..e46d331b34 --- /dev/null +++ b/data/fixtures/scopes/java/type/type.constant.scope @@ -0,0 +1,24 @@ +final int foo = 0; +--- + +[Content] = 0:6-0:9 + >---< +0| final int foo = 0; + +[Removal] = 0:6-0:10 + >----< +0| final int foo = 0; + +[Leading delimiter] = 0:5-0:6 + >-< +0| final int foo = 0; + +[Trailing delimiter] = 0:9-0:10 + >-< +0| final int foo = 0; + +[Domain] = 0:0-0:18 + >------------------< +0| final int foo = 0; + +[Insertion delimiter] = " " diff --git a/data/fixtures/scopes/java/type/type.variable2.scope b/data/fixtures/scopes/java/type/type.variable.initialized.scope similarity index 51% rename from data/fixtures/scopes/java/type/type.variable2.scope rename to data/fixtures/scopes/java/type/type.variable.initialized.scope index 8f8fe619f1..b3a492d68a 100644 --- a/data/fixtures/scopes/java/type/type.variable2.scope +++ b/data/fixtures/scopes/java/type/type.variable.initialized.scope @@ -1,20 +1,20 @@ -int value = 0; +int foo = 0; --- [Content] = 0:0-0:3 >---< -0| int value = 0; +0| int foo = 0; [Removal] = 0:0-0:4 >----< -0| int value = 0; +0| int foo = 0; [Trailing delimiter] = 0:3-0:4 >-< -0| int value = 0; +0| int foo = 0; -[Domain] = 0:0-0:14 - >--------------< -0| int value = 0; +[Domain] = 0:0-0:12 + >------------< +0| int foo = 0; [Insertion delimiter] = " " diff --git a/data/fixtures/scopes/java/type/type.variable.scope b/data/fixtures/scopes/java/type/type.variable.uninitialized.scope similarity index 56% rename from data/fixtures/scopes/java/type/type.variable.scope rename to data/fixtures/scopes/java/type/type.variable.uninitialized.scope index 7d37d372b7..192f80ca15 100644 --- a/data/fixtures/scopes/java/type/type.variable.scope +++ b/data/fixtures/scopes/java/type/type.variable.uninitialized.scope @@ -1,20 +1,20 @@ -int value; +int foo; --- [Content] = 0:0-0:3 >---< -0| int value; +0| int foo; [Removal] = 0:0-0:4 >----< -0| int value; +0| int foo; [Trailing delimiter] = 0:3-0:4 >-< -0| int value; +0| int foo; -[Domain] = 0:0-0:10 - >----------< -0| int value; +[Domain] = 0:0-0:8 + >--------< +0| int foo; [Insertion delimiter] = " " diff --git a/data/fixtures/scopes/java/value/value.constant.scope b/data/fixtures/scopes/java/value/value.constant.scope new file mode 100644 index 0000000000..0500050c25 --- /dev/null +++ b/data/fixtures/scopes/java/value/value.constant.scope @@ -0,0 +1,20 @@ +final int foo = 0; +--- + +[Content] = 0:16-0:17 + >-< +0| final int foo = 0; + +[Removal] = 0:13-0:17 + >----< +0| final int foo = 0; + +[Leading delimiter] = 0:13-0:16 + >---< +0| final int foo = 0; + +[Domain] = 0:0-0:18 + >------------------< +0| final int foo = 0; + +[Insertion delimiter] = " " diff --git a/data/fixtures/scopes/java/value/value.variable.scope b/data/fixtures/scopes/java/value/value.variable.scope index a614198096..e9f99d43e1 100644 --- a/data/fixtures/scopes/java/value/value.variable.scope +++ b/data/fixtures/scopes/java/value/value.variable.scope @@ -1,20 +1,20 @@ -foo = 0; +int foo = 0; --- -[Content] = 0:6-0:7 - >-< -0| foo = 0; +[Content] = 0:10-0:11 + >-< +0| int foo = 0; -[Removal] = 0:3-0:7 - >----< -0| foo = 0; +[Removal] = 0:7-0:11 + >----< +0| int foo = 0; -[Leading delimiter] = 0:3-0:6 - >---< -0| foo = 0; +[Leading delimiter] = 0:7-0:10 + >---< +0| int foo = 0; -[Domain] = 0:0-0:8 - >--------< -0| foo = 0; +[Domain] = 0:0-0:12 + >------------< +0| int foo = 0; [Insertion delimiter] = " " diff --git a/data/fixtures/scopes/javascript.core/argument/argument.formal.method.iteration2.scope b/data/fixtures/scopes/javascript.core/argument/argument.formal.method.iteration2.scope index b201c9bfcc..7da244ac2a 100644 --- a/data/fixtures/scopes/javascript.core/argument/argument.formal.method.iteration2.scope +++ b/data/fixtures/scopes/javascript.core/argument/argument.formal.method.iteration2.scope @@ -1,5 +1,5 @@ class Foo { - @baz + @An bar(aaa, bbb) {} } --- @@ -9,7 +9,7 @@ class Foo { 2| bar(aaa, bbb) {} [Domain] = 1:4-2:20 - >---- -1| @baz + >--- +1| @An 2| bar(aaa, bbb) {} --------------------< diff --git a/data/fixtures/scopes/javascript.core/argument/argument.formal.method.iteration4.scope b/data/fixtures/scopes/javascript.core/argument/argument.formal.method.iteration4.scope index fb6944fe96..f8fb956214 100644 --- a/data/fixtures/scopes/javascript.core/argument/argument.formal.method.iteration4.scope +++ b/data/fixtures/scopes/javascript.core/argument/argument.formal.method.iteration4.scope @@ -1,5 +1,5 @@ class Foo { - @baz + @An bar = (aaa, bbb) => {} } --- @@ -9,7 +9,7 @@ class Foo { 2| bar = (aaa, bbb) => {} [Domain] = 1:4-2:26 - >---- -1| @baz + >--- +1| @An 2| bar = (aaa, bbb) => {} --------------------------< diff --git a/data/fixtures/scopes/javascript.core/argumentList/argumentList.formal.method.empty2.scope b/data/fixtures/scopes/javascript.core/argumentList/argumentList.formal.method.empty2.scope index 680af8018e..d01eb9037a 100644 --- a/data/fixtures/scopes/javascript.core/argumentList/argumentList.formal.method.empty2.scope +++ b/data/fixtures/scopes/javascript.core/argumentList/argumentList.formal.method.empty2.scope @@ -1,5 +1,5 @@ class Foo { - @baz + @An bar() {} } --- @@ -10,8 +10,8 @@ class Foo { 2| bar() {} [Domain] = 1:4-2:12 - >---- -1| @baz + >--- +1| @An 2| bar() {} ------------< diff --git a/data/fixtures/scopes/javascript.core/argumentList/argumentList.formal.method.empty4.scope b/data/fixtures/scopes/javascript.core/argumentList/argumentList.formal.method.empty4.scope index 0dfd01f24c..dbbff867e1 100644 --- a/data/fixtures/scopes/javascript.core/argumentList/argumentList.formal.method.empty4.scope +++ b/data/fixtures/scopes/javascript.core/argumentList/argumentList.formal.method.empty4.scope @@ -1,5 +1,5 @@ class Foo { - @baz + @An bar = () => {} } --- @@ -10,8 +10,8 @@ class Foo { 2| bar = () => {} [Domain] = 1:4-2:18 - >---- -1| @baz + >--- +1| @An 2| bar = () => {} ------------------< diff --git a/data/fixtures/scopes/javascript.core/name/name.assignment.pattern.scope b/data/fixtures/scopes/javascript.core/name/name.assignment.destructuring.scope similarity index 100% rename from data/fixtures/scopes/javascript.core/name/name.assignment.pattern.scope rename to data/fixtures/scopes/javascript.core/name/name.assignment.destructuring.scope diff --git a/data/fixtures/scopes/javascript.core/name/name.variable2.scope b/data/fixtures/scopes/javascript.core/name/name.constant.scope similarity index 100% rename from data/fixtures/scopes/javascript.core/name/name.variable2.scope rename to data/fixtures/scopes/javascript.core/name/name.constant.scope diff --git a/data/fixtures/scopes/javascript.core/name/name.field.class.scope b/data/fixtures/scopes/javascript.core/name/name.field.class.scope index 633fe566bd..32eb973d53 100644 --- a/data/fixtures/scopes/javascript.core/name/name.field.class.scope +++ b/data/fixtures/scopes/javascript.core/name/name.field.class.scope @@ -1,6 +1,7 @@ class Foo { bar; baz = 0; + @An bongo = 0; } --- @@ -20,25 +21,23 @@ class Foo { >-< 0| class Foo { -[#1 Domain] = 0:0-3:1 +[#1 Domain] = 0:0-4:1 >----------- 0| class Foo { 1| bar; 2| baz = 0; -3| } +3| @An bongo = 0; +4| } -< [#1 Insertion delimiter] = " " -[#2 Content] = 1:4-1:7 +[#2 Content] = +[#2 Removal] = 1:4-1:7 >---< 1| bar; -[#2 Removal] = 1:0-1:7 - >-------< -1| bar; - [#2 Leading delimiter] = 1:0-1:4 >----< 1| bar; @@ -67,3 +66,22 @@ class Foo { 2| baz = 0; [#3 Insertion delimiter] = " " + + +[#4 Content] = 3:8-3:13 + >-----< +3| @An bongo = 0; + +[#4 Removal] = 3:4-3:16 + >------------< +3| @An bongo = 0; + +[#4 Trailing delimiter] = 3:13-3:16 + >---< +3| @An bongo = 0; + +[#4 Domain] = 3:4-3:18 + >--------------< +3| @An bongo = 0; + +[#4 Insertion delimiter] = " " diff --git a/data/fixtures/scopes/javascript.core/name/name.field.class2.scope b/data/fixtures/scopes/javascript.core/name/name.field.class2.scope deleted file mode 100644 index f71e2ad583..0000000000 --- a/data/fixtures/scopes/javascript.core/name/name.field.class2.scope +++ /dev/null @@ -1,52 +0,0 @@ -class Foo { - @baz - bar = 0; -} ---- - -[#1 Content] = 0:6-0:9 - >---< -0| class Foo { - -[#1 Removal] = 0:6-0:10 - >----< -0| class Foo { - -[#1 Leading delimiter] = 0:5-0:6 - >-< -0| class Foo { - -[#1 Trailing delimiter] = 0:9-0:10 - >-< -0| class Foo { - -[#1 Domain] = 0:0-3:1 - >----------- -0| class Foo { -1| @baz -2| bar = 0; -3| } - -< - -[#1 Insertion delimiter] = " " - - -[#2 Content] = 2:4-2:7 - >---< -2| bar = 0; - -[#2 Removal] = 2:4-2:10 - >------< -2| bar = 0; - -[#2 Trailing delimiter] = 2:7-2:10 - >---< -2| bar = 0; - -[#2 Domain] = 1:4-2:12 - >---- -1| @baz -2| bar = 0; - ------------< - -[#2 Insertion delimiter] = " " diff --git a/data/fixtures/scopes/javascript.core/name/name.method2.scope b/data/fixtures/scopes/javascript.core/name/name.method2.scope index c70d6c2bb1..5446ad1f12 100644 --- a/data/fixtures/scopes/javascript.core/name/name.method2.scope +++ b/data/fixtures/scopes/javascript.core/name/name.method2.scope @@ -1,5 +1,5 @@ class Foo { - @baz + @An bar() {} } --- @@ -23,7 +23,7 @@ class Foo { [#1 Domain] = 0:0-3:1 >----------- 0| class Foo { -1| @baz +1| @An 2| bar() {} 3| } -< @@ -41,8 +41,8 @@ class Foo { 2| bar() {} [#2 Domain] = 1:4-2:12 - >---- -1| @baz + >--- +1| @An 2| bar() {} ------------< diff --git a/data/fixtures/scopes/javascript.core/name/name.method4.scope b/data/fixtures/scopes/javascript.core/name/name.method4.scope index 2c13166d2f..5cad9c554b 100644 --- a/data/fixtures/scopes/javascript.core/name/name.method4.scope +++ b/data/fixtures/scopes/javascript.core/name/name.method4.scope @@ -1,5 +1,5 @@ class Foo { - @baz + @An bar = () => {} } --- @@ -23,7 +23,7 @@ class Foo { [#1 Domain] = 0:0-3:1 >----------- 0| class Foo { -1| @baz +1| @An 2| bar = () => {} 3| } -< @@ -35,17 +35,19 @@ class Foo { >---< 2| bar = () => {} -[#2 Removal] = 2:4-2:10 - >------< +[#2 Removal] = 1:4-2:10 + >--- +1| @An 2| bar = () => {} + ----------< [#2 Trailing delimiter] = 2:7-2:10 >---< 2| bar = () => {} [#2 Domain] = 1:4-2:18 - >---- -1| @baz + >--- +1| @An 2| bar = () => {} ------------------< diff --git a/data/fixtures/scopes/javascript.core/name/name.variable.pattern.scope b/data/fixtures/scopes/javascript.core/name/name.variable.destructuring.scope similarity index 100% rename from data/fixtures/scopes/javascript.core/name/name.variable.pattern.scope rename to data/fixtures/scopes/javascript.core/name/name.variable.destructuring.scope diff --git a/data/fixtures/scopes/javascript.core/name/name.variable.scope b/data/fixtures/scopes/javascript.core/name/name.variable.initialized.scope similarity index 100% rename from data/fixtures/scopes/javascript.core/name/name.variable.scope rename to data/fixtures/scopes/javascript.core/name/name.variable.initialized.scope diff --git a/data/fixtures/scopes/javascript.core/name/name.variable.uninitialized.scope b/data/fixtures/scopes/javascript.core/name/name.variable.uninitialized.scope new file mode 100644 index 0000000000..40f480ded1 --- /dev/null +++ b/data/fixtures/scopes/javascript.core/name/name.variable.uninitialized.scope @@ -0,0 +1,20 @@ +let foo; +--- + +[Content] = 0:4-0:7 + >---< +0| let foo; + +[Removal] = 0:0-0:7 + >-------< +0| let foo; + +[Leading delimiter] = 0:3-0:4 + >-< +0| let foo; + +[Domain] = 0:0-0:8 + >--------< +0| let foo; + +[Insertion delimiter] = " " diff --git a/data/fixtures/scopes/javascript.core/namedFunction/namedFunction.method2.scope b/data/fixtures/scopes/javascript.core/namedFunction/namedFunction.method2.scope index 50878c3485..b62fd4e2ab 100644 --- a/data/fixtures/scopes/javascript.core/namedFunction/namedFunction.method2.scope +++ b/data/fixtures/scopes/javascript.core/namedFunction/namedFunction.method2.scope @@ -1,25 +1,25 @@ class Foo { - @baz + @An bar() {} } --- [Content] = [Domain] = 1:4-2:12 - >---- -1| @baz + >--- +1| @An 2| bar() {} ------------< [Removal] = 1:0-3:0 - >-------- -1| @baz + >------- +1| @An 2| bar() {} 3| } < [Leading delimiter] = 1:0-1:4 >----< -1| @baz +1| @An [Insertion delimiter] = "\n\n" diff --git a/data/fixtures/scopes/javascript.core/namedFunction/namedFunction.method4.scope b/data/fixtures/scopes/javascript.core/namedFunction/namedFunction.method4.scope index 5ac9812e1b..3a2efae861 100644 --- a/data/fixtures/scopes/javascript.core/namedFunction/namedFunction.method4.scope +++ b/data/fixtures/scopes/javascript.core/namedFunction/namedFunction.method4.scope @@ -1,25 +1,25 @@ class Foo { - @baz + @An bar = () => {} } --- [Content] = [Domain] = 1:4-2:18 - >---- -1| @baz + >--- +1| @An 2| bar = () => {} ------------------< [Removal] = 1:0-3:0 - >-------- -1| @baz + >------- +1| @An 2| bar = () => {} 3| } < [Leading delimiter] = 1:0-1:4 >----< -1| @baz +1| @An [Insertion delimiter] = "\n\n" diff --git a/data/fixtures/scopes/javascript.core/statement/statement.assignment.destructuring.scope b/data/fixtures/scopes/javascript.core/statement/statement.assignment.destructuring.scope new file mode 100644 index 0000000000..3eea24590e --- /dev/null +++ b/data/fixtures/scopes/javascript.core/statement/statement.assignment.destructuring.scope @@ -0,0 +1,10 @@ +({ foo, bar } = baz); +--- + +[Content] = +[Removal] = +[Domain] = 0:0-0:21 + >---------------------< +0| ({ foo, bar } = baz); + +[Insertion delimiter] = "\n" diff --git a/data/fixtures/scopes/javascript.core/statement/statement.variable.scope b/data/fixtures/scopes/javascript.core/statement/statement.constant.scope similarity index 100% rename from data/fixtures/scopes/javascript.core/statement/statement.variable.scope rename to data/fixtures/scopes/javascript.core/statement/statement.constant.scope diff --git a/data/fixtures/scopes/javascript.core/statement/statement.method2.scope b/data/fixtures/scopes/javascript.core/statement/statement.method2.scope index e707554b60..1296b5fa31 100644 --- a/data/fixtures/scopes/javascript.core/statement/statement.method2.scope +++ b/data/fixtures/scopes/javascript.core/statement/statement.method2.scope @@ -1,5 +1,5 @@ class Foo { - @baz + @An bar() {} } --- @@ -9,7 +9,7 @@ class Foo { [#1 Domain] = 0:0-3:1 >----------- 0| class Foo { -1| @baz +1| @An 2| bar() {} 3| } -< @@ -19,20 +19,20 @@ class Foo { [#2 Content] = [#2 Domain] = 1:4-2:12 - >---- -1| @baz + >--- +1| @An 2| bar() {} ------------< [#2 Removal] = 1:0-3:0 - >-------- -1| @baz + >------- +1| @An 2| bar() {} 3| } < [#2 Leading delimiter] = 1:0-1:4 >----< -1| @baz +1| @An [#2 Insertion delimiter] = "\n" diff --git a/data/fixtures/scopes/javascript.core/statement/statement.method4.scope b/data/fixtures/scopes/javascript.core/statement/statement.method4.scope index d370211186..f2ac411d2e 100644 --- a/data/fixtures/scopes/javascript.core/statement/statement.method4.scope +++ b/data/fixtures/scopes/javascript.core/statement/statement.method4.scope @@ -1,5 +1,5 @@ class Foo { - @baz + @An bar = () => {} } --- @@ -9,7 +9,7 @@ class Foo { [#1 Domain] = 0:0-3:1 >----------- 0| class Foo { -1| @baz +1| @An 2| bar = () => {} 3| } -< @@ -19,20 +19,20 @@ class Foo { [#2 Content] = [#2 Domain] = 1:4-2:18 - >---- -1| @baz + >--- +1| @An 2| bar = () => {} ------------------< [#2 Removal] = 1:0-3:0 - >-------- -1| @baz + >------- +1| @An 2| bar = () => {} 3| } < [#2 Leading delimiter] = 1:0-1:4 >----< -1| @baz +1| @An [#2 Insertion delimiter] = "\n" diff --git a/data/fixtures/scopes/javascript.core/statement/statement.variable.destructuring.scope b/data/fixtures/scopes/javascript.core/statement/statement.variable.destructuring.scope new file mode 100644 index 0000000000..0724a8ee09 --- /dev/null +++ b/data/fixtures/scopes/javascript.core/statement/statement.variable.destructuring.scope @@ -0,0 +1,10 @@ +const {foo, bar} = baz; +--- + +[Content] = +[Removal] = +[Domain] = 0:0-0:23 + >-----------------------< +0| const {foo, bar} = baz; + +[Insertion delimiter] = "\n" diff --git a/data/fixtures/scopes/javascript.core/statement/statement.variable2.scope b/data/fixtures/scopes/javascript.core/statement/statement.variable.initialized.scope similarity index 100% rename from data/fixtures/scopes/javascript.core/statement/statement.variable2.scope rename to data/fixtures/scopes/javascript.core/statement/statement.variable.initialized.scope diff --git a/data/fixtures/scopes/javascript.core/statement/statement.variable.uninitialized.scope b/data/fixtures/scopes/javascript.core/statement/statement.variable.uninitialized.scope new file mode 100644 index 0000000000..a14d088ca6 --- /dev/null +++ b/data/fixtures/scopes/javascript.core/statement/statement.variable.uninitialized.scope @@ -0,0 +1,10 @@ +let foo; +--- + +[Content] = +[Removal] = +[Domain] = 0:0-0:8 + >--------< +0| let foo; + +[Insertion delimiter] = "\n" diff --git a/data/fixtures/scopes/javascript.core/value/value.constant.scope b/data/fixtures/scopes/javascript.core/value/value.constant.scope new file mode 100644 index 0000000000..b52ad1e5c6 --- /dev/null +++ b/data/fixtures/scopes/javascript.core/value/value.constant.scope @@ -0,0 +1,20 @@ +const foo = 0; +--- + +[Content] = 0:12-0:13 + >-< +0| const foo = 0; + +[Removal] = 0:9-0:13 + >----< +0| const foo = 0; + +[Leading delimiter] = 0:9-0:12 + >---< +0| const foo = 0; + +[Domain] = 0:0-0:14 + >--------------< +0| const foo = 0; + +[Insertion delimiter] = " " diff --git a/data/fixtures/scopes/javascript.core/value/value.variable.pattern.scope b/data/fixtures/scopes/javascript.core/value/value.variable.destructuring.scope similarity index 100% rename from data/fixtures/scopes/javascript.core/value/value.variable.pattern.scope rename to data/fixtures/scopes/javascript.core/value/value.variable.destructuring.scope diff --git a/data/fixtures/scopes/javascript.core/value/value.variable.scope b/data/fixtures/scopes/javascript.core/value/value.variable.scope index b52ad1e5c6..f8b68f4784 100644 --- a/data/fixtures/scopes/javascript.core/value/value.variable.scope +++ b/data/fixtures/scopes/javascript.core/value/value.variable.scope @@ -1,20 +1,20 @@ -const foo = 0; +let foo = 0; --- -[Content] = 0:12-0:13 - >-< -0| const foo = 0; +[Content] = 0:10-0:11 + >-< +0| let foo = 0; -[Removal] = 0:9-0:13 - >----< -0| const foo = 0; +[Removal] = 0:7-0:11 + >----< +0| let foo = 0; -[Leading delimiter] = 0:9-0:12 - >---< -0| const foo = 0; +[Leading delimiter] = 0:7-0:10 + >---< +0| let foo = 0; -[Domain] = 0:0-0:14 - >--------------< -0| const foo = 0; +[Domain] = 0:0-0:12 + >------------< +0| let foo = 0; [Insertion delimiter] = " " diff --git a/data/fixtures/scopes/scala/name/name.variable2.scope b/data/fixtures/scopes/kotlin/name/name.constant.scope similarity index 88% rename from data/fixtures/scopes/scala/name/name.variable2.scope rename to data/fixtures/scopes/kotlin/name/name.constant.scope index 608e22c538..31bd2cdb64 100644 --- a/data/fixtures/scopes/scala/name/name.variable2.scope +++ b/data/fixtures/scopes/kotlin/name/name.constant.scope @@ -5,8 +5,8 @@ val foo = 0 >---< 0| val foo = 0 -[Removal] = 0:4-0:8 - >----< +[Removal] = 0:0-0:10 + >----------< 0| val foo = 0 [Leading delimiter] = 0:3-0:4 diff --git a/data/fixtures/scopes/kotlin/name/name.field.class.scope b/data/fixtures/scopes/kotlin/name/name.field.class.scope index c03fbe7548..fbd5d868fb 100644 --- a/data/fixtures/scopes/kotlin/name/name.field.class.scope +++ b/data/fixtures/scopes/kotlin/name/name.field.class.scope @@ -37,8 +37,8 @@ class Foo { >---< 1| var bar: Int = 0 -[#2 Removal] = 1:7-1:11 - >----< +[#2 Removal] = 1:4-1:19 + >---------------< 1| var bar: Int = 0 [#2 Leading delimiter] = 1:7-1:8 @@ -56,8 +56,8 @@ class Foo { >---< 2| val baz = 0 -[#3 Removal] = 2:8-2:12 - >----< +[#3 Removal] = 2:4-2:14 + >----------< 2| val baz = 0 [#3 Leading delimiter] = 2:7-2:8 @@ -79,16 +79,13 @@ class Foo { >-----< 3| val bongo: Int -[#4 Removal] = 3:7-3:13 - >------< +[#4 Removal] = +[#4 Domain] = 3:4-3:18 + >--------------< 3| val bongo: Int [#4 Leading delimiter] = 3:7-3:8 >-< 3| val bongo: Int -[#4 Domain] = 3:4-3:18 - >--------------< -3| val bongo: Int - [#4 Insertion delimiter] = " " diff --git a/data/fixtures/scopes/kotlin/name/name.field.interface.scope b/data/fixtures/scopes/kotlin/name/name.field.interface.scope index 62b2cf00ea..6349336acb 100644 --- a/data/fixtures/scopes/kotlin/name/name.field.interface.scope +++ b/data/fixtures/scopes/kotlin/name/name.field.interface.scope @@ -33,16 +33,13 @@ interface Foo { >---< 1| val bar: Int -[#2 Removal] = 1:7-1:11 - >----< +[#2 Removal] = +[#2 Domain] = 1:4-1:16 + >------------< 1| val bar: Int [#2 Leading delimiter] = 1:7-1:8 >-< 1| val bar: Int -[#2 Domain] = 1:4-1:16 - >------------< -1| val bar: Int - [#2 Insertion delimiter] = " " diff --git a/data/fixtures/scopes/kotlin/name/name.variable.pattern.scope b/data/fixtures/scopes/kotlin/name/name.variable.destructuring.scope similarity index 89% rename from data/fixtures/scopes/kotlin/name/name.variable.pattern.scope rename to data/fixtures/scopes/kotlin/name/name.variable.destructuring.scope index 41c7420ace..34528a0606 100644 --- a/data/fixtures/scopes/kotlin/name/name.variable.pattern.scope +++ b/data/fixtures/scopes/kotlin/name/name.variable.destructuring.scope @@ -5,8 +5,8 @@ var (foo, bar) = baz >----------< 0| var (foo, bar) = baz -[Removal] = 0:4-0:15 - >-----------< +[Removal] = 0:0-0:17 + >-----------------< 0| var (foo, bar) = baz [Leading delimiter] = 0:3-0:4 diff --git a/data/fixtures/scopes/scala/name/name.variable.scope b/data/fixtures/scopes/kotlin/name/name.variable.initialized.scope similarity index 88% rename from data/fixtures/scopes/scala/name/name.variable.scope rename to data/fixtures/scopes/kotlin/name/name.variable.initialized.scope index 1cd9475d1d..ae1bd45fb4 100644 --- a/data/fixtures/scopes/scala/name/name.variable.scope +++ b/data/fixtures/scopes/kotlin/name/name.variable.initialized.scope @@ -5,8 +5,8 @@ var foo = 0 >---< 0| var foo = 0 -[Removal] = 0:4-0:8 - >----< +[Removal] = 0:0-0:10 + >----------< 0| var foo = 0 [Leading delimiter] = 0:3-0:4 diff --git a/data/fixtures/scopes/kotlin/name/name.variable.uninitialized.scope b/data/fixtures/scopes/kotlin/name/name.variable.uninitialized.scope new file mode 100644 index 0000000000..a2ecd26dce --- /dev/null +++ b/data/fixtures/scopes/kotlin/name/name.variable.uninitialized.scope @@ -0,0 +1,17 @@ +var foo: Int +--- + +[Content] = 0:4-0:7 + >---< +0| var foo: Int + +[Removal] = +[Domain] = 0:0-0:12 + >------------< +0| var foo: Int + +[Leading delimiter] = 0:3-0:4 + >-< +0| var foo: Int + +[Insertion delimiter] = " " diff --git a/data/fixtures/scopes/kotlin/namedFunction/namedFunction.method2.scope b/data/fixtures/scopes/kotlin/namedFunction/namedFunction.method2.scope index bf3dc71914..1a20b8425c 100644 --- a/data/fixtures/scopes/kotlin/namedFunction/namedFunction.method2.scope +++ b/data/fixtures/scopes/kotlin/namedFunction/namedFunction.method2.scope @@ -1,25 +1,25 @@ class Foo { - @baz + @An fun bar() {} } --- [Content] = [Domain] = 1:4-2:16 - >---- -1| @baz + >--- +1| @An 2| fun bar() {} ----------------< [Removal] = 1:0-3:0 - >-------- -1| @baz + >------- +1| @An 2| fun bar() {} 3| } < [Leading delimiter] = 1:0-1:4 >----< -1| @baz +1| @An [Insertion delimiter] = "\n\n" diff --git a/data/fixtures/scopes/kotlin/statement/statement.variable4.scope b/data/fixtures/scopes/kotlin/statement/statement.constant.scope similarity index 100% rename from data/fixtures/scopes/kotlin/statement/statement.variable4.scope rename to data/fixtures/scopes/kotlin/statement/statement.constant.scope diff --git a/data/fixtures/scopes/kotlin/statement/statement.method2.scope b/data/fixtures/scopes/kotlin/statement/statement.method2.scope index d065bdf278..257e7d8f4f 100644 --- a/data/fixtures/scopes/kotlin/statement/statement.method2.scope +++ b/data/fixtures/scopes/kotlin/statement/statement.method2.scope @@ -1,5 +1,5 @@ class Foo { - @baz + @An fun bar() {} } --- @@ -9,7 +9,7 @@ class Foo { [#1 Domain] = 0:0-3:1 >----------- 0| class Foo { -1| @baz +1| @An 2| fun bar() {} 3| } -< @@ -19,20 +19,20 @@ class Foo { [#2 Content] = [#2 Domain] = 1:4-2:16 - >---- -1| @baz + >--- +1| @An 2| fun bar() {} ----------------< [#2 Removal] = 1:0-3:0 - >-------- -1| @baz + >------- +1| @An 2| fun bar() {} 3| } < [#2 Leading delimiter] = 1:0-1:4 >----< -1| @baz +1| @An [#2 Insertion delimiter] = "\n" diff --git a/data/fixtures/scopes/kotlin/statement/statement.variable.destructuring.scope b/data/fixtures/scopes/kotlin/statement/statement.variable.destructuring.scope new file mode 100644 index 0000000000..5631016198 --- /dev/null +++ b/data/fixtures/scopes/kotlin/statement/statement.variable.destructuring.scope @@ -0,0 +1,10 @@ +val (foo, bar) = baz +--- + +[Content] = +[Removal] = +[Domain] = 0:0-0:20 + >--------------------< +0| val (foo, bar) = baz + +[Insertion delimiter] = "\n" diff --git a/data/fixtures/scopes/kotlin/statement/statement.variable3.scope b/data/fixtures/scopes/kotlin/statement/statement.variable.initialized.scope similarity index 100% rename from data/fixtures/scopes/kotlin/statement/statement.variable3.scope rename to data/fixtures/scopes/kotlin/statement/statement.variable.initialized.scope diff --git a/data/fixtures/scopes/kotlin/statement/statement.variable.scope b/data/fixtures/scopes/kotlin/statement/statement.variable.uninitialized.scope similarity index 100% rename from data/fixtures/scopes/kotlin/statement/statement.variable.scope rename to data/fixtures/scopes/kotlin/statement/statement.variable.uninitialized.scope diff --git a/data/fixtures/scopes/kotlin/type/type.variable2.scope b/data/fixtures/scopes/kotlin/type/type.constant.scope similarity index 100% rename from data/fixtures/scopes/kotlin/type/type.variable2.scope rename to data/fixtures/scopes/kotlin/type/type.constant.scope diff --git a/data/fixtures/scopes/scala/type/type.variable.scope b/data/fixtures/scopes/kotlin/type/type.variable.initialized.scope similarity index 100% rename from data/fixtures/scopes/scala/type/type.variable.scope rename to data/fixtures/scopes/kotlin/type/type.variable.initialized.scope diff --git a/data/fixtures/scopes/kotlin/type/type.variable5.scope b/data/fixtures/scopes/kotlin/type/type.variable.initialized2.scope similarity index 56% rename from data/fixtures/scopes/kotlin/type/type.variable5.scope rename to data/fixtures/scopes/kotlin/type/type.variable.initialized2.scope index 6f020a93bb..3b1bf240f3 100644 --- a/data/fixtures/scopes/kotlin/type/type.variable5.scope +++ b/data/fixtures/scopes/kotlin/type/type.variable.initialized2.scope @@ -1,20 +1,20 @@ -val foo: suspend () -> Int = { 0 } +var foo: suspend () -> Int = { 0 } --- [Content] = 0:9-0:26 >-----------------< -0| val foo: suspend () -> Int = { 0 } +0| var foo: suspend () -> Int = { 0 } [Removal] = 0:7-0:26 >-------------------< -0| val foo: suspend () -> Int = { 0 } +0| var foo: suspend () -> Int = { 0 } [Leading delimiter] = 0:7-0:9 >--< -0| val foo: suspend () -> Int = { 0 } +0| var foo: suspend () -> Int = { 0 } [Domain] = 0:0-0:34 >----------------------------------< -0| val foo: suspend () -> Int = { 0 } +0| var foo: suspend () -> Int = { 0 } [Insertion delimiter] = " " diff --git a/data/fixtures/scopes/kotlin/type/type.variable.scope b/data/fixtures/scopes/kotlin/type/type.variable.uninitialized.scope similarity index 100% rename from data/fixtures/scopes/kotlin/type/type.variable.scope rename to data/fixtures/scopes/kotlin/type/type.variable.uninitialized.scope diff --git a/data/fixtures/scopes/kotlin/type/type.variable3.scope b/data/fixtures/scopes/kotlin/type/type.variable.uninitialized2.scope similarity index 67% rename from data/fixtures/scopes/kotlin/type/type.variable3.scope rename to data/fixtures/scopes/kotlin/type/type.variable.uninitialized2.scope index efef805860..5e61175fa6 100644 --- a/data/fixtures/scopes/kotlin/type/type.variable3.scope +++ b/data/fixtures/scopes/kotlin/type/type.variable.uninitialized2.scope @@ -1,20 +1,20 @@ -val foo: @Bar Int +var foo: @Bar Int --- [Content] = 0:9-0:17 >--------< -0| val foo: @Bar Int +0| var foo: @Bar Int [Removal] = 0:7-0:17 >----------< -0| val foo: @Bar Int +0| var foo: @Bar Int [Leading delimiter] = 0:7-0:9 >--< -0| val foo: @Bar Int +0| var foo: @Bar Int [Domain] = 0:0-0:17 >-----------------< -0| val foo: @Bar Int +0| var foo: @Bar Int [Insertion delimiter] = " " diff --git a/data/fixtures/scopes/kotlin/type/type.variable4.scope b/data/fixtures/scopes/kotlin/type/type.variable.uninitialized3.scope similarity index 61% rename from data/fixtures/scopes/kotlin/type/type.variable4.scope rename to data/fixtures/scopes/kotlin/type/type.variable.uninitialized3.scope index 23c7360138..63b766ae0c 100644 --- a/data/fixtures/scopes/kotlin/type/type.variable4.scope +++ b/data/fixtures/scopes/kotlin/type/type.variable.uninitialized3.scope @@ -1,20 +1,20 @@ -val foo: suspend () -> Int +var foo: suspend () -> Int --- [Content] = 0:9-0:26 >-----------------< -0| val foo: suspend () -> Int +0| var foo: suspend () -> Int [Removal] = 0:7-0:26 >-------------------< -0| val foo: suspend () -> Int +0| var foo: suspend () -> Int [Leading delimiter] = 0:7-0:9 >--< -0| val foo: suspend () -> Int +0| var foo: suspend () -> Int [Domain] = 0:0-0:26 >--------------------------< -0| val foo: suspend () -> Int +0| var foo: suspend () -> Int [Insertion delimiter] = " " diff --git a/data/fixtures/scopes/kotlin/value/value.constant.scope b/data/fixtures/scopes/kotlin/value/value.constant.scope new file mode 100644 index 0000000000..957dcc3e51 --- /dev/null +++ b/data/fixtures/scopes/kotlin/value/value.constant.scope @@ -0,0 +1,20 @@ +val foo = 0 +--- + +[Content] = 0:10-0:11 + >-< +0| val foo = 0 + +[Removal] = 0:7-0:11 + >----< +0| val foo = 0 + +[Leading delimiter] = 0:7-0:10 + >---< +0| val foo = 0 + +[Domain] = 0:0-0:11 + >-----------< +0| val foo = 0 + +[Insertion delimiter] = " " diff --git a/data/fixtures/scopes/scala/value/value.variable.pattern.scope b/data/fixtures/scopes/kotlin/value/value.variable.destructuring.scope similarity index 100% rename from data/fixtures/scopes/scala/value/value.variable.pattern.scope rename to data/fixtures/scopes/kotlin/value/value.variable.destructuring.scope diff --git a/data/fixtures/scopes/lua/name/name.assignment.pattern.scope b/data/fixtures/scopes/lua/name/name.assignment.destructuring.scope similarity index 100% rename from data/fixtures/scopes/lua/name/name.assignment.pattern.scope rename to data/fixtures/scopes/lua/name/name.assignment.destructuring.scope diff --git a/data/fixtures/scopes/lua/name/name.variable.pattern.scope b/data/fixtures/scopes/lua/name/name.variable.destructuring.scope similarity index 100% rename from data/fixtures/scopes/lua/name/name.variable.pattern.scope rename to data/fixtures/scopes/lua/name/name.variable.destructuring.scope diff --git a/data/fixtures/scopes/lua/name/name.variable.scope b/data/fixtures/scopes/lua/name/name.variable.initialized.scope similarity index 100% rename from data/fixtures/scopes/lua/name/name.variable.scope rename to data/fixtures/scopes/lua/name/name.variable.initialized.scope diff --git a/data/fixtures/scopes/lua/name/name.variable.uninitialized.scope b/data/fixtures/scopes/lua/name/name.variable.uninitialized.scope new file mode 100644 index 0000000000..3770d083d1 --- /dev/null +++ b/data/fixtures/scopes/lua/name/name.variable.uninitialized.scope @@ -0,0 +1,17 @@ +local foo +--- + +[Content] = 0:6-0:9 + >---< +0| local foo + +[Removal] = +[Domain] = 0:0-0:9 + >---------< +0| local foo + +[Leading delimiter] = 0:5-0:6 + >-< +0| local foo + +[Insertion delimiter] = " " diff --git a/data/fixtures/scopes/lua/name/name.variable2.scope b/data/fixtures/scopes/lua/name/name.variable2.scope deleted file mode 100644 index a1a6bc3ae1..0000000000 --- a/data/fixtures/scopes/lua/name/name.variable2.scope +++ /dev/null @@ -1,24 +0,0 @@ -local foo, bar = 0, 1 ---- - -[Content] = 0:6-0:14 - >--------< -0| local foo, bar = 0, 1 - -[Removal] = 0:0-0:17 - >-----------------< -0| local foo, bar = 0, 1 - -[Leading delimiter] = 0:5-0:6 - >-< -0| local foo, bar = 0, 1 - -[Trailing delimiter] = 0:14-0:15 - >-< -0| local foo, bar = 0, 1 - -[Domain] = 0:0-0:21 - >---------------------< -0| local foo, bar = 0, 1 - -[Insertion delimiter] = " " diff --git a/data/fixtures/scopes/lua/statement/statement.assignment.destructuring.scope b/data/fixtures/scopes/lua/statement/statement.assignment.destructuring.scope new file mode 100644 index 0000000000..9b330a1226 --- /dev/null +++ b/data/fixtures/scopes/lua/statement/statement.assignment.destructuring.scope @@ -0,0 +1,10 @@ +foo, bar = baz +--- + +[Content] = +[Removal] = +[Domain] = 0:0-0:14 + >--------------< +0| foo, bar = baz + +[Insertion delimiter] = "\n" diff --git a/data/fixtures/scopes/lua/statement/statement.variable.destructuring.scope b/data/fixtures/scopes/lua/statement/statement.variable.destructuring.scope new file mode 100644 index 0000000000..6fa54a49fc --- /dev/null +++ b/data/fixtures/scopes/lua/statement/statement.variable.destructuring.scope @@ -0,0 +1,10 @@ +local foo, bar = baz +--- + +[Content] = +[Removal] = +[Domain] = 0:0-0:20 + >--------------------< +0| local foo, bar = baz + +[Insertion delimiter] = "\n" diff --git a/data/fixtures/scopes/lua/statement/statement.variable.scope b/data/fixtures/scopes/lua/statement/statement.variable.initialized.scope similarity index 100% rename from data/fixtures/scopes/lua/statement/statement.variable.scope rename to data/fixtures/scopes/lua/statement/statement.variable.initialized.scope diff --git a/data/fixtures/scopes/properties/statement.variable.scope b/data/fixtures/scopes/lua/statement/statement.variable.uninitialized.scope similarity index 80% rename from data/fixtures/scopes/properties/statement.variable.scope rename to data/fixtures/scopes/lua/statement/statement.variable.uninitialized.scope index d70f2aa18e..93e3fa1290 100644 --- a/data/fixtures/scopes/properties/statement.variable.scope +++ b/data/fixtures/scopes/lua/statement/statement.variable.uninitialized.scope @@ -1,10 +1,10 @@ -foo = bar +local foo --- [Content] = [Removal] = [Domain] = 0:0-0:9 >---------< -0| foo = bar +0| local foo [Insertion delimiter] = "\n" diff --git a/data/fixtures/scopes/lua/value/value.variable.pattern.scope b/data/fixtures/scopes/lua/value/value.variable.destructuring.scope similarity index 100% rename from data/fixtures/scopes/lua/value/value.variable.pattern.scope rename to data/fixtures/scopes/lua/value/value.variable.destructuring.scope diff --git a/data/fixtures/scopes/lua/value/value.variable2.scope b/data/fixtures/scopes/lua/value/value.variable2.scope deleted file mode 100644 index 3725f30c9f..0000000000 --- a/data/fixtures/scopes/lua/value/value.variable2.scope +++ /dev/null @@ -1,20 +0,0 @@ -local foo, bar = 0, 1 ---- - -[Content] = 0:17-0:21 - >----< -0| local foo, bar = 0, 1 - -[Removal] = 0:14-0:21 - >-------< -0| local foo, bar = 0, 1 - -[Leading delimiter] = 0:14-0:17 - >---< -0| local foo, bar = 0, 1 - -[Domain] = 0:0-0:21 - >---------------------< -0| local foo, bar = 0, 1 - -[Insertion delimiter] = " " diff --git a/data/fixtures/scopes/php/name/name.field.class.scope b/data/fixtures/scopes/php/name/name.field.class.scope index ab1085f671..144115fde5 100644 --- a/data/fixtures/scopes/php/name/name.field.class.scope +++ b/data/fixtures/scopes/php/name/name.field.class.scope @@ -36,8 +36,8 @@ class Foo { >----< 2| public number $bar; -[#2 Removal] = 2:17-2:22 - >-----< +[#2 Removal] = 2:4-2:22 + >------------------< 2| public number $bar; [#2 Leading delimiter] = 2:17-2:18 @@ -55,8 +55,8 @@ class Foo { >----< 3| public $baz = 0; -[#3 Removal] = 3:11-3:16 - >-----< +[#3 Removal] = 3:4-3:18 + >--------------< 3| public $baz = 0; [#3 Leading delimiter] = 3:10-3:11 diff --git a/data/fixtures/scopes/php/name/name.variable.scope b/data/fixtures/scopes/php/name/name.variable.initialized.scope similarity index 100% rename from data/fixtures/scopes/php/name/name.variable.scope rename to data/fixtures/scopes/php/name/name.variable.initialized.scope diff --git a/data/fixtures/scopes/properties/key.mapPair.iteration.scope b/data/fixtures/scopes/properties/key.mapPair.iteration.scope index 379107f231..b87a9062f4 100644 --- a/data/fixtures/scopes/properties/key.mapPair.iteration.scope +++ b/data/fixtures/scopes/properties/key.mapPair.iteration.scope @@ -1,5 +1,5 @@ -foo=bar +foo=0 --- @@ -7,6 +7,6 @@ foo=bar [Domain] = 0:0-2:0 > 0| -1| foo=bar +1| foo=0 2| < diff --git a/data/fixtures/scopes/properties/key.mapPair.scope b/data/fixtures/scopes/properties/key.mapPair.scope index 5f9cb8fbe1..7a03d93749 100644 --- a/data/fixtures/scopes/properties/key.mapPair.scope +++ b/data/fixtures/scopes/properties/key.mapPair.scope @@ -1,20 +1,20 @@ -foo = bar +foo = 0 --- [Content] = 0:0-0:3 >---< -0| foo = bar +0| foo = 0 [Removal] = 0:0-0:6 >------< -0| foo = bar +0| foo = 0 [Trailing delimiter] = 0:3-0:6 >---< -0| foo = bar +0| foo = 0 -[Domain] = 0:0-0:9 - >---------< -0| foo = bar +[Domain] = 0:0-0:7 + >-------< +0| foo = 0 [Insertion delimiter] = " " diff --git a/data/fixtures/scopes/properties/key.mapPair2.scope b/data/fixtures/scopes/properties/key.mapPair2.scope index a71c1ed9d4..a9bf1438ab 100644 --- a/data/fixtures/scopes/properties/key.mapPair2.scope +++ b/data/fixtures/scopes/properties/key.mapPair2.scope @@ -1,20 +1,20 @@ -foo.bar = baz +foo.bar=0 --- [Content] = 0:0-0:7 >-------< -0| foo.bar = baz +0| foo.bar=0 -[Removal] = 0:0-0:10 - >----------< -0| foo.bar = baz +[Removal] = 0:0-0:8 + >--------< +0| foo.bar=0 -[Trailing delimiter] = 0:7-0:10 - >---< -0| foo.bar = baz +[Trailing delimiter] = 0:7-0:8 + >-< +0| foo.bar=0 -[Domain] = 0:0-0:13 - >-------------< -0| foo.bar = baz +[Domain] = 0:0-0:9 + >---------< +0| foo.bar=0 [Insertion delimiter] = " " diff --git a/data/fixtures/scopes/properties/name.iteration.document.scope b/data/fixtures/scopes/properties/name.iteration.document.scope index 379107f231..b87a9062f4 100644 --- a/data/fixtures/scopes/properties/name.iteration.document.scope +++ b/data/fixtures/scopes/properties/name.iteration.document.scope @@ -1,5 +1,5 @@ -foo=bar +foo=0 --- @@ -7,6 +7,6 @@ foo=bar [Domain] = 0:0-2:0 > 0| -1| foo=bar +1| foo=0 2| < diff --git a/data/fixtures/scopes/python/name/name.variable.scope b/data/fixtures/scopes/properties/name.variable.initialized.scope similarity index 100% rename from data/fixtures/scopes/python/name/name.variable.scope rename to data/fixtures/scopes/properties/name.variable.initialized.scope diff --git a/data/fixtures/scopes/properties/name.variable2.scope b/data/fixtures/scopes/properties/name.variable.initialized2.scope similarity index 57% rename from data/fixtures/scopes/properties/name.variable2.scope rename to data/fixtures/scopes/properties/name.variable.initialized2.scope index 27942e0abe..a9bf1438ab 100644 --- a/data/fixtures/scopes/properties/name.variable2.scope +++ b/data/fixtures/scopes/properties/name.variable.initialized2.scope @@ -1,20 +1,20 @@ -foo.bar=baz +foo.bar=0 --- [Content] = 0:0-0:7 >-------< -0| foo.bar=baz +0| foo.bar=0 [Removal] = 0:0-0:8 >--------< -0| foo.bar=baz +0| foo.bar=0 [Trailing delimiter] = 0:7-0:8 >-< -0| foo.bar=baz +0| foo.bar=0 -[Domain] = 0:0-0:11 - >-----------< -0| foo.bar=baz +[Domain] = 0:0-0:9 + >---------< +0| foo.bar=0 [Insertion delimiter] = " " diff --git a/data/fixtures/scopes/properties/statement.iteration.document.scope b/data/fixtures/scopes/properties/statement.iteration.document.scope index 379107f231..b87a9062f4 100644 --- a/data/fixtures/scopes/properties/statement.iteration.document.scope +++ b/data/fixtures/scopes/properties/statement.iteration.document.scope @@ -1,5 +1,5 @@ -foo=bar +foo=0 --- @@ -7,6 +7,6 @@ foo=bar [Domain] = 0:0-2:0 > 0| -1| foo=bar +1| foo=0 2| < diff --git a/data/fixtures/scopes/python/statement/statement.variable.scope b/data/fixtures/scopes/properties/statement.variable.initialized.scope similarity index 100% rename from data/fixtures/scopes/python/statement/statement.variable.scope rename to data/fixtures/scopes/properties/statement.variable.initialized.scope diff --git a/data/fixtures/scopes/properties/value.iteration.document.scope b/data/fixtures/scopes/properties/value.iteration.document.scope index 379107f231..b87a9062f4 100644 --- a/data/fixtures/scopes/properties/value.iteration.document.scope +++ b/data/fixtures/scopes/properties/value.iteration.document.scope @@ -1,5 +1,5 @@ -foo=bar +foo=0 --- @@ -7,6 +7,6 @@ foo=bar [Domain] = 0:0-2:0 > 0| -1| foo=bar +1| foo=0 2| < diff --git a/data/fixtures/scopes/properties/value.mapPair.iteration.scope b/data/fixtures/scopes/properties/value.mapPair.iteration.scope index 379107f231..b87a9062f4 100644 --- a/data/fixtures/scopes/properties/value.mapPair.iteration.scope +++ b/data/fixtures/scopes/properties/value.mapPair.iteration.scope @@ -1,5 +1,5 @@ -foo=bar +foo=0 --- @@ -7,6 +7,6 @@ foo=bar [Domain] = 0:0-2:0 > 0| -1| foo=bar +1| foo=0 2| < diff --git a/data/fixtures/scopes/properties/value.mapPair.scope b/data/fixtures/scopes/properties/value.mapPair.scope index fbe8b66676..6e89de0927 100644 --- a/data/fixtures/scopes/properties/value.mapPair.scope +++ b/data/fixtures/scopes/properties/value.mapPair.scope @@ -1,20 +1,20 @@ -foo = bar +foo = 0 --- -[Content] = 0:6-0:9 - >---< -0| foo = bar +[Content] = 0:6-0:7 + >-< +0| foo = 0 -[Removal] = 0:3-0:9 - >------< -0| foo = bar +[Removal] = 0:3-0:7 + >----< +0| foo = 0 [Leading delimiter] = 0:3-0:6 >---< -0| foo = bar +0| foo = 0 -[Domain] = 0:0-0:9 - >---------< -0| foo = bar +[Domain] = 0:0-0:7 + >-------< +0| foo = 0 [Insertion delimiter] = " " diff --git a/data/fixtures/scopes/properties/value.variable.scope b/data/fixtures/scopes/properties/value.variable.scope index fbe8b66676..6e89de0927 100644 --- a/data/fixtures/scopes/properties/value.variable.scope +++ b/data/fixtures/scopes/properties/value.variable.scope @@ -1,20 +1,20 @@ -foo = bar +foo = 0 --- -[Content] = 0:6-0:9 - >---< -0| foo = bar +[Content] = 0:6-0:7 + >-< +0| foo = 0 -[Removal] = 0:3-0:9 - >------< -0| foo = bar +[Removal] = 0:3-0:7 + >----< +0| foo = 0 [Leading delimiter] = 0:3-0:6 >---< -0| foo = bar +0| foo = 0 -[Domain] = 0:0-0:9 - >---------< -0| foo = bar +[Domain] = 0:0-0:7 + >-------< +0| foo = 0 [Insertion delimiter] = " " diff --git a/data/fixtures/scopes/python/name/name.assignment.pattern.scope b/data/fixtures/scopes/python/name/name.assignment.destructuring.scope similarity index 100% rename from data/fixtures/scopes/python/name/name.assignment.pattern.scope rename to data/fixtures/scopes/python/name/name.assignment.destructuring.scope diff --git a/data/fixtures/scopes/python/name/name.field.class.scope b/data/fixtures/scopes/python/name/name.field.class.scope index 151e029596..2f6f7c8855 100644 --- a/data/fixtures/scopes/python/name/name.field.class.scope +++ b/data/fixtures/scopes/python/name/name.field.class.scope @@ -29,18 +29,15 @@ class Foo: >---< 1| bar: int -[#2 Removal] = 1:0-1:7 - >-------< +[#2 Removal] = +[#2 Domain] = 1:4-1:12 + >--------< 1| bar: int [#2 Leading delimiter] = 1:0-1:4 >----< 1| bar: int -[#2 Domain] = 1:4-1:12 - >--------< -1| bar: int - [#2 Insertion delimiter] = " " diff --git a/data/fixtures/scopes/python/name/name.variable.pattern.scope b/data/fixtures/scopes/python/name/name.variable.destructuring.scope similarity index 100% rename from data/fixtures/scopes/python/name/name.variable.pattern.scope rename to data/fixtures/scopes/python/name/name.variable.destructuring.scope diff --git a/data/fixtures/scopes/properties/name.variable.scope b/data/fixtures/scopes/python/name/name.variable.initialized.scope similarity index 59% rename from data/fixtures/scopes/properties/name.variable.scope rename to data/fixtures/scopes/python/name/name.variable.initialized.scope index 5f9cb8fbe1..7a03d93749 100644 --- a/data/fixtures/scopes/properties/name.variable.scope +++ b/data/fixtures/scopes/python/name/name.variable.initialized.scope @@ -1,20 +1,20 @@ -foo = bar +foo = 0 --- [Content] = 0:0-0:3 >---< -0| foo = bar +0| foo = 0 [Removal] = 0:0-0:6 >------< -0| foo = bar +0| foo = 0 [Trailing delimiter] = 0:3-0:6 >---< -0| foo = bar +0| foo = 0 -[Domain] = 0:0-0:9 - >---------< -0| foo = bar +[Domain] = 0:0-0:7 + >-------< +0| foo = 0 [Insertion delimiter] = " " diff --git a/data/fixtures/scopes/python/name/name.variable.uninitialized.scope b/data/fixtures/scopes/python/name/name.variable.uninitialized.scope new file mode 100644 index 0000000000..ce1545fb8e --- /dev/null +++ b/data/fixtures/scopes/python/name/name.variable.uninitialized.scope @@ -0,0 +1,13 @@ +foo: int +--- + +[Content] = 0:0-0:3 + >---< +0| foo: int + +[Removal] = +[Domain] = 0:0-0:8 + >--------< +0| foo: int + +[Insertion delimiter] = " " diff --git a/data/fixtures/scopes/python/statement/statement.assignment.destructuring.scope b/data/fixtures/scopes/python/statement/statement.assignment.destructuring.scope new file mode 100644 index 0000000000..1cbfbcfa67 --- /dev/null +++ b/data/fixtures/scopes/python/statement/statement.assignment.destructuring.scope @@ -0,0 +1,10 @@ +foo, bar, = baz +--- + +[Content] = +[Removal] = +[Domain] = 0:0-0:15 + >---------------< +0| foo, bar, = baz + +[Insertion delimiter] = "\n" diff --git a/data/fixtures/scopes/python/statement/statement.variable.destructuring.scope b/data/fixtures/scopes/python/statement/statement.variable.destructuring.scope new file mode 100644 index 0000000000..9b330a1226 --- /dev/null +++ b/data/fixtures/scopes/python/statement/statement.variable.destructuring.scope @@ -0,0 +1,10 @@ +foo, bar = baz +--- + +[Content] = +[Removal] = +[Domain] = 0:0-0:14 + >--------------< +0| foo, bar = baz + +[Insertion delimiter] = "\n" diff --git a/data/fixtures/scopes/python/statement/statement.variable.initialized.scope b/data/fixtures/scopes/python/statement/statement.variable.initialized.scope new file mode 100644 index 0000000000..acdb2b1498 --- /dev/null +++ b/data/fixtures/scopes/python/statement/statement.variable.initialized.scope @@ -0,0 +1,10 @@ +foo = 0 +--- + +[Content] = +[Removal] = +[Domain] = 0:0-0:7 + >-------< +0| foo = 0 + +[Insertion delimiter] = "\n" diff --git a/data/fixtures/scopes/python/statement/statement.variable.uninitialized.scope b/data/fixtures/scopes/python/statement/statement.variable.uninitialized.scope new file mode 100644 index 0000000000..f19c75f073 --- /dev/null +++ b/data/fixtures/scopes/python/statement/statement.variable.uninitialized.scope @@ -0,0 +1,10 @@ +foo: int +--- + +[Content] = +[Removal] = +[Domain] = 0:0-0:8 + >--------< +0| foo: int + +[Insertion delimiter] = "\n" diff --git a/data/fixtures/scopes/python/type/type.field.class.scope b/data/fixtures/scopes/python/type/type.field.class.scope index 61915292ae..cae2966f4c 100644 --- a/data/fixtures/scopes/python/type/type.field.class.scope +++ b/data/fixtures/scopes/python/type/type.field.class.scope @@ -1,14 +1,16 @@ class Foo: bar: int + baz: int = 0 --- [#1 Content] = [#1 Removal] = -[#1 Domain] = 0:0-1:12 +[#1 Domain] = 0:0-2:16 >---------- 0| class Foo: 1| bar: int - ------------< +2| baz: int = 0 + ----------------< [#1 Insertion delimiter] = " " @@ -30,3 +32,22 @@ class Foo: 1| bar: int [#2 Insertion delimiter] = " " + + +[#3 Content] = 2:9-2:12 + >---< +2| baz: int = 0 + +[#3 Removal] = 2:7-2:12 + >-----< +2| baz: int = 0 + +[#3 Leading delimiter] = 2:7-2:9 + >--< +2| baz: int = 0 + +[#3 Domain] = 2:4-2:16 + >------------< +2| baz: int = 0 + +[#3 Insertion delimiter] = " " diff --git a/data/fixtures/scopes/python/type/type.variable2.scope b/data/fixtures/scopes/python/type/type.variable.initialized.scope similarity index 100% rename from data/fixtures/scopes/python/type/type.variable2.scope rename to data/fixtures/scopes/python/type/type.variable.initialized.scope diff --git a/data/fixtures/scopes/python/type/type.variable.scope b/data/fixtures/scopes/python/type/type.variable.uninitialized.scope similarity index 100% rename from data/fixtures/scopes/python/type/type.variable.scope rename to data/fixtures/scopes/python/type/type.variable.uninitialized.scope diff --git a/data/fixtures/scopes/python/value/value.field.class.scope b/data/fixtures/scopes/python/value/value.field.class.scope index 13729bc22f..332b888a88 100644 --- a/data/fixtures/scopes/python/value/value.field.class.scope +++ b/data/fixtures/scopes/python/value/value.field.class.scope @@ -1,41 +1,41 @@ class Foo: - bar = 0 - baz: int = 1 + bar: int = 0 + baz = 1 --- -[#1 Content] = 1:10-1:11 - >-< -1| bar = 0 +[#1 Content] = 1:15-1:16 + >-< +1| bar: int = 0 -[#1 Removal] = 1:7-1:11 - >----< -1| bar = 0 +[#1 Removal] = 1:12-1:16 + >----< +1| bar: int = 0 -[#1 Leading delimiter] = 1:7-1:10 - >---< -1| bar = 0 +[#1 Leading delimiter] = 1:12-1:15 + >---< +1| bar: int = 0 -[#1 Domain] = 1:4-1:11 - >-------< -1| bar = 0 +[#1 Domain] = 1:4-1:16 + >------------< +1| bar: int = 0 [#1 Insertion delimiter] = " " -[#2 Content] = 2:15-2:16 - >-< -2| baz: int = 1 +[#2 Content] = 2:10-2:11 + >-< +2| baz = 1 -[#2 Removal] = 2:12-2:16 - >----< -2| baz: int = 1 +[#2 Removal] = 2:7-2:11 + >----< +2| baz = 1 -[#2 Leading delimiter] = 2:12-2:15 - >---< -2| baz: int = 1 +[#2 Leading delimiter] = 2:7-2:10 + >---< +2| baz = 1 -[#2 Domain] = 2:4-2:16 - >------------< -2| baz: int = 1 +[#2 Domain] = 2:4-2:11 + >-------< +2| baz = 1 [#2 Insertion delimiter] = " " diff --git a/data/fixtures/scopes/python/value/value.variable.pattern.scope b/data/fixtures/scopes/python/value/value.variable.destructuring.scope similarity index 100% rename from data/fixtures/scopes/python/value/value.variable.pattern.scope rename to data/fixtures/scopes/python/value/value.variable.destructuring.scope diff --git a/data/fixtures/scopes/python/value/value.variable2.scope b/data/fixtures/scopes/python/value/value.variable2.scope new file mode 100644 index 0000000000..87b9000a7a --- /dev/null +++ b/data/fixtures/scopes/python/value/value.variable2.scope @@ -0,0 +1,20 @@ +foo: int = 0 +--- + +[Content] = 0:11-0:12 + >-< +0| foo: int = 0 + +[Removal] = 0:8-0:12 + >----< +0| foo: int = 0 + +[Leading delimiter] = 0:8-0:11 + >---< +0| foo: int = 0 + +[Domain] = 0:0-0:12 + >------------< +0| foo: int = 0 + +[Insertion delimiter] = " " diff --git a/data/fixtures/scopes/r/name.variable.scope b/data/fixtures/scopes/r/name.variable.initialized.scope similarity index 100% rename from data/fixtures/scopes/r/name.variable.scope rename to data/fixtures/scopes/r/name.variable.initialized.scope diff --git a/data/fixtures/scopes/rust/name/name.assignment.pattern.scope b/data/fixtures/scopes/rust/name/name.assignment.destructuring.scope similarity index 100% rename from data/fixtures/scopes/rust/name/name.assignment.pattern.scope rename to data/fixtures/scopes/rust/name/name.assignment.destructuring.scope diff --git a/data/fixtures/scopes/rust/name/name.constant.scope b/data/fixtures/scopes/rust/name/name.constant.scope new file mode 100644 index 0000000000..df74c90ddc --- /dev/null +++ b/data/fixtures/scopes/rust/name/name.constant.scope @@ -0,0 +1,20 @@ +const foo: i32 = 0; +--- + +[Content] = 0:6-0:9 + >---< +0| const foo: i32 = 0; + +[Removal] = 0:0-0:17 + >-----------------< +0| const foo: i32 = 0; + +[Leading delimiter] = 0:5-0:6 + >-< +0| const foo: i32 = 0; + +[Domain] = 0:0-0:19 + >-------------------< +0| const foo: i32 = 0; + +[Insertion delimiter] = " " diff --git a/data/fixtures/scopes/rust/name/name.field.class.scope b/data/fixtures/scopes/rust/name/name.field.class.scope index 4b850b0b22..4c187d6fb0 100644 --- a/data/fixtures/scopes/rust/name/name.field.class.scope +++ b/data/fixtures/scopes/rust/name/name.field.class.scope @@ -33,16 +33,13 @@ struct Foo { >---< 1| bar: i32 -[#2 Removal] = 1:0-1:7 - >-------< +[#2 Removal] = +[#2 Domain] = 1:4-1:12 + >--------< 1| bar: i32 [#2 Leading delimiter] = 1:0-1:4 >----< 1| bar: i32 -[#2 Domain] = 1:4-1:12 - >--------< -1| bar: i32 - [#2 Insertion delimiter] = " " diff --git a/data/fixtures/scopes/rust/name/name.variable.pattern.scope b/data/fixtures/scopes/rust/name/name.variable.destructuring.scope similarity index 89% rename from data/fixtures/scopes/rust/name/name.variable.pattern.scope rename to data/fixtures/scopes/rust/name/name.variable.destructuring.scope index 1ab039d3b2..c1292881ec 100644 --- a/data/fixtures/scopes/rust/name/name.variable.pattern.scope +++ b/data/fixtures/scopes/rust/name/name.variable.destructuring.scope @@ -5,8 +5,8 @@ let Foo {bar, baz} = bongo; >--------------< 0| let Foo {bar, baz} = bongo; -[Removal] = 0:4-0:19 - >---------------< +[Removal] = 0:0-0:21 + >---------------------< 0| let Foo {bar, baz} = bongo; [Leading delimiter] = 0:3-0:4 diff --git a/data/fixtures/scopes/rust/name/name.variable.scope b/data/fixtures/scopes/rust/name/name.variable.initialized.scope similarity index 88% rename from data/fixtures/scopes/rust/name/name.variable.scope rename to data/fixtures/scopes/rust/name/name.variable.initialized.scope index 9cb426ea51..b29e4d221e 100644 --- a/data/fixtures/scopes/rust/name/name.variable.scope +++ b/data/fixtures/scopes/rust/name/name.variable.initialized.scope @@ -5,8 +5,8 @@ let foo = 0; >---< 0| let foo = 0; -[Removal] = 0:4-0:8 - >----< +[Removal] = 0:0-0:10 + >----------< 0| let foo = 0; [Leading delimiter] = 0:3-0:4 diff --git a/data/fixtures/scopes/rust/name/name.variable.uninitialized.scope b/data/fixtures/scopes/rust/name/name.variable.uninitialized.scope new file mode 100644 index 0000000000..c0569b3950 --- /dev/null +++ b/data/fixtures/scopes/rust/name/name.variable.uninitialized.scope @@ -0,0 +1,20 @@ +let foo: i32; +--- + +[Content] = 0:4-0:7 + >---< +0| let foo: i32; + +[Removal] = 0:0-0:12 + >------------< +0| let foo: i32; + +[Leading delimiter] = 0:3-0:4 + >-< +0| let foo: i32; + +[Domain] = 0:0-0:13 + >-------------< +0| let foo: i32; + +[Insertion delimiter] = " " diff --git a/data/fixtures/scopes/rust/statement/statement.assignment.destructuring.scope b/data/fixtures/scopes/rust/statement/statement.assignment.destructuring.scope new file mode 100644 index 0000000000..bba4760f82 --- /dev/null +++ b/data/fixtures/scopes/rust/statement/statement.assignment.destructuring.scope @@ -0,0 +1,10 @@ +(foo, bar) = baz; +--- + +[Content] = +[Removal] = +[Domain] = 0:0-0:17 + >-----------------< +0| (foo, bar) = baz; + +[Insertion delimiter] = "\n" diff --git a/data/fixtures/scopes/rust/statement/statement.constant.scope b/data/fixtures/scopes/rust/statement/statement.constant.scope new file mode 100644 index 0000000000..a316117ba5 --- /dev/null +++ b/data/fixtures/scopes/rust/statement/statement.constant.scope @@ -0,0 +1,10 @@ +const foo: i32 = 0; +--- + +[Content] = +[Removal] = +[Domain] = 0:0-0:19 + >-------------------< +0| const foo: i32 = 0; + +[Insertion delimiter] = "\n" diff --git a/data/fixtures/scopes/rust/statement/statement.variable.destructuring.scope b/data/fixtures/scopes/rust/statement/statement.variable.destructuring.scope new file mode 100644 index 0000000000..bdd161f434 --- /dev/null +++ b/data/fixtures/scopes/rust/statement/statement.variable.destructuring.scope @@ -0,0 +1,10 @@ +let Foo {bar, baz} = bongo; +--- + +[Content] = +[Removal] = +[Domain] = 0:0-0:27 + >---------------------------< +0| let Foo {bar, baz} = bongo; + +[Insertion delimiter] = "\n" diff --git a/data/fixtures/scopes/rust/statement/statement.variable.scope b/data/fixtures/scopes/rust/statement/statement.variable.initialized.scope similarity index 100% rename from data/fixtures/scopes/rust/statement/statement.variable.scope rename to data/fixtures/scopes/rust/statement/statement.variable.initialized.scope diff --git a/data/fixtures/scopes/rust/statement/statement.variable.uninitialized.scope b/data/fixtures/scopes/rust/statement/statement.variable.uninitialized.scope new file mode 100644 index 0000000000..3943b4027c --- /dev/null +++ b/data/fixtures/scopes/rust/statement/statement.variable.uninitialized.scope @@ -0,0 +1,10 @@ +let foo: i32; +--- + +[Content] = +[Removal] = +[Domain] = 0:0-0:13 + >-------------< +0| let foo: i32; + +[Insertion delimiter] = "\n" diff --git a/data/fixtures/scopes/rust/type/type.constant.scope b/data/fixtures/scopes/rust/type/type.constant.scope new file mode 100644 index 0000000000..e0414a7734 --- /dev/null +++ b/data/fixtures/scopes/rust/type/type.constant.scope @@ -0,0 +1,20 @@ +const foo: i32 = 0; +--- + +[Content] = 0:11-0:14 + >---< +0| const foo: i32 = 0; + +[Removal] = 0:9-0:14 + >-----< +0| const foo: i32 = 0; + +[Leading delimiter] = 0:9-0:11 + >--< +0| const foo: i32 = 0; + +[Domain] = 0:0-0:19 + >-------------------< +0| const foo: i32 = 0; + +[Insertion delimiter] = " " diff --git a/data/fixtures/scopes/rust/type/type.variable.scope b/data/fixtures/scopes/rust/type/type.variable.initialized.scope similarity index 100% rename from data/fixtures/scopes/rust/type/type.variable.scope rename to data/fixtures/scopes/rust/type/type.variable.initialized.scope diff --git a/data/fixtures/scopes/rust/type/type.variable.uninitialized.scope b/data/fixtures/scopes/rust/type/type.variable.uninitialized.scope new file mode 100644 index 0000000000..a11737ed80 --- /dev/null +++ b/data/fixtures/scopes/rust/type/type.variable.uninitialized.scope @@ -0,0 +1,20 @@ +let foo: i32; +--- + +[Content] = 0:9-0:12 + >---< +0| let foo: i32; + +[Removal] = 0:7-0:12 + >-----< +0| let foo: i32; + +[Leading delimiter] = 0:7-0:9 + >--< +0| let foo: i32; + +[Domain] = 0:0-0:13 + >-------------< +0| let foo: i32; + +[Insertion delimiter] = " " diff --git a/data/fixtures/scopes/rust/value/value.constant.scope b/data/fixtures/scopes/rust/value/value.constant.scope new file mode 100644 index 0000000000..c7cf71a808 --- /dev/null +++ b/data/fixtures/scopes/rust/value/value.constant.scope @@ -0,0 +1,20 @@ +const foo: i32 = 0; +--- + +[Content] = 0:17-0:18 + >-< +0| const foo: i32 = 0; + +[Removal] = 0:14-0:18 + >----< +0| const foo: i32 = 0; + +[Leading delimiter] = 0:14-0:17 + >---< +0| const foo: i32 = 0; + +[Domain] = 0:0-0:19 + >-------------------< +0| const foo: i32 = 0; + +[Insertion delimiter] = " " diff --git a/data/fixtures/scopes/rust/value/value.variable.pattern.scope b/data/fixtures/scopes/rust/value/value.variable.destructuring.scope similarity index 100% rename from data/fixtures/scopes/rust/value/value.variable.pattern.scope rename to data/fixtures/scopes/rust/value/value.variable.destructuring.scope diff --git a/data/fixtures/scopes/rust/value/value.variable2.scope b/data/fixtures/scopes/rust/value/value.variable2.scope new file mode 100644 index 0000000000..a16de95b57 --- /dev/null +++ b/data/fixtures/scopes/rust/value/value.variable2.scope @@ -0,0 +1,20 @@ +let foo: i32 = 0; +--- + +[Content] = 0:15-0:16 + >-< +0| let foo: i32 = 0; + +[Removal] = 0:12-0:16 + >----< +0| let foo: i32 = 0; + +[Leading delimiter] = 0:12-0:15 + >---< +0| let foo: i32 = 0; + +[Domain] = 0:0-0:17 + >-----------------< +0| let foo: i32 = 0; + +[Insertion delimiter] = " " diff --git a/data/fixtures/scopes/kotlin/name/name.variable2.scope b/data/fixtures/scopes/scala/name/name.constant.scope similarity index 88% rename from data/fixtures/scopes/kotlin/name/name.variable2.scope rename to data/fixtures/scopes/scala/name/name.constant.scope index 608e22c538..31bd2cdb64 100644 --- a/data/fixtures/scopes/kotlin/name/name.variable2.scope +++ b/data/fixtures/scopes/scala/name/name.constant.scope @@ -5,8 +5,8 @@ val foo = 0 >---< 0| val foo = 0 -[Removal] = 0:4-0:8 - >----< +[Removal] = 0:0-0:10 + >----------< 0| val foo = 0 [Leading delimiter] = 0:3-0:4 diff --git a/data/fixtures/scopes/scala/name/name.field.class.scope b/data/fixtures/scopes/scala/name/name.field.class.scope index d92efe371a..49f46c01c6 100644 --- a/data/fixtures/scopes/scala/name/name.field.class.scope +++ b/data/fixtures/scopes/scala/name/name.field.class.scope @@ -33,8 +33,8 @@ class Foo { . >---< 1| val bar = 0 -[#2 Removal] = 1:8-1:12 - >----< +[#2 Removal] = 1:4-1:14 + >----------< 1| val bar = 0 [#2 Leading delimiter] = 1:7-1:8 diff --git a/data/fixtures/scopes/scala/name/name.field.enum.scope b/data/fixtures/scopes/scala/name/name.field.enum.scope index 1df71cd6f4..e94e2d5510 100644 --- a/data/fixtures/scopes/scala/name/name.field.enum.scope +++ b/data/fixtures/scopes/scala/name/name.field.enum.scope @@ -1,6 +1,6 @@ enum Foo { case Bar - case Baz(x: Int) + case Baz() } --- @@ -24,7 +24,7 @@ enum Foo { >---------- 0| enum Foo { 1| case Bar -2| case Baz(x: Int) +2| case Baz() 3| } -< @@ -53,26 +53,14 @@ enum Foo { [#3 Content] = [#3 Removal] = 2:9-2:12 >---< -2| case Baz(x: Int) +2| case Baz() [#3 Leading delimiter] = 2:8-2:9 >-< -2| case Baz(x: Int) +2| case Baz() -[#3 Domain] = 2:4-2:20 - >----------------< -2| case Baz(x: Int) +[#3 Domain] = 2:4-2:14 + >----------< +2| case Baz() [#3 Insertion delimiter] = " " - - -[#4 Content] = -[#4 Removal] = 2:13-2:14 - >-< -2| case Baz(x: Int) - -[#4 Domain] = 2:13-2:19 - >------< -2| case Baz(x: Int) - -[#4 Insertion delimiter] = " " diff --git a/data/fixtures/scopes/scala/name/name.field.interface.scope b/data/fixtures/scopes/scala/name/name.field.interface.scope index cc7fddf3dc..c52ada5f31 100644 --- a/data/fixtures/scopes/scala/name/name.field.interface.scope +++ b/data/fixtures/scopes/scala/name/name.field.interface.scope @@ -33,16 +33,13 @@ trait Foo { >---< 1| val bar: Int -[#2 Removal] = 1:7-1:11 - >----< +[#2 Removal] = +[#2 Domain] = 1:4-1:16 + >------------< 1| val bar: Int [#2 Leading delimiter] = 1:7-1:8 >-< 1| val bar: Int -[#2 Domain] = 1:4-1:16 - >------------< -1| val bar: Int - [#2 Insertion delimiter] = " " diff --git a/data/fixtures/scopes/scala/name/name.variable.pattern.scope b/data/fixtures/scopes/scala/name/name.variable.destructuring.scope similarity index 89% rename from data/fixtures/scopes/scala/name/name.variable.pattern.scope rename to data/fixtures/scopes/scala/name/name.variable.destructuring.scope index b919a2a8dd..1bc60f9384 100644 --- a/data/fixtures/scopes/scala/name/name.variable.pattern.scope +++ b/data/fixtures/scopes/scala/name/name.variable.destructuring.scope @@ -5,8 +5,8 @@ val (foo, bar) = baz >----------< 0| val (foo, bar) = baz -[Removal] = 0:4-0:15 - >-----------< +[Removal] = 0:0-0:17 + >-----------------< 0| val (foo, bar) = baz [Leading delimiter] = 0:3-0:4 diff --git a/data/fixtures/scopes/kotlin/name/name.variable.scope b/data/fixtures/scopes/scala/name/name.variable.initialized.scope similarity index 88% rename from data/fixtures/scopes/kotlin/name/name.variable.scope rename to data/fixtures/scopes/scala/name/name.variable.initialized.scope index 1cd9475d1d..ae1bd45fb4 100644 --- a/data/fixtures/scopes/kotlin/name/name.variable.scope +++ b/data/fixtures/scopes/scala/name/name.variable.initialized.scope @@ -5,8 +5,8 @@ var foo = 0 >---< 0| var foo = 0 -[Removal] = 0:4-0:8 - >----< +[Removal] = 0:0-0:10 + >----------< 0| var foo = 0 [Leading delimiter] = 0:3-0:4 diff --git a/data/fixtures/scopes/scala/name/name.variable.uninitialized.scope b/data/fixtures/scopes/scala/name/name.variable.uninitialized.scope new file mode 100644 index 0000000000..a2ecd26dce --- /dev/null +++ b/data/fixtures/scopes/scala/name/name.variable.uninitialized.scope @@ -0,0 +1,17 @@ +var foo: Int +--- + +[Content] = 0:4-0:7 + >---< +0| var foo: Int + +[Removal] = +[Domain] = 0:0-0:12 + >------------< +0| var foo: Int + +[Leading delimiter] = 0:3-0:4 + >-< +0| var foo: Int + +[Insertion delimiter] = " " diff --git a/data/fixtures/scopes/scala/statement/statement.variable2.scope b/data/fixtures/scopes/scala/statement/statement.constant.scope similarity index 100% rename from data/fixtures/scopes/scala/statement/statement.variable2.scope rename to data/fixtures/scopes/scala/statement/statement.constant.scope diff --git a/data/fixtures/scopes/scala/statement/statement.variable.destructuring.scope b/data/fixtures/scopes/scala/statement/statement.variable.destructuring.scope new file mode 100644 index 0000000000..5631016198 --- /dev/null +++ b/data/fixtures/scopes/scala/statement/statement.variable.destructuring.scope @@ -0,0 +1,10 @@ +val (foo, bar) = baz +--- + +[Content] = +[Removal] = +[Domain] = 0:0-0:20 + >--------------------< +0| val (foo, bar) = baz + +[Insertion delimiter] = "\n" diff --git a/data/fixtures/scopes/scala/statement/statement.variable.scope b/data/fixtures/scopes/scala/statement/statement.variable.initialized.scope similarity index 100% rename from data/fixtures/scopes/scala/statement/statement.variable.scope rename to data/fixtures/scopes/scala/statement/statement.variable.initialized.scope diff --git a/data/fixtures/scopes/scala/statement/statement.variable.uninitialized.scope b/data/fixtures/scopes/scala/statement/statement.variable.uninitialized.scope new file mode 100644 index 0000000000..0c4f8800bd --- /dev/null +++ b/data/fixtures/scopes/scala/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/data/fixtures/scopes/scala/type/type.variable2.scope b/data/fixtures/scopes/scala/type/type.constant.scope similarity index 100% rename from data/fixtures/scopes/scala/type/type.variable2.scope rename to data/fixtures/scopes/scala/type/type.constant.scope diff --git a/data/fixtures/scopes/scala/type/type.field.class.scope b/data/fixtures/scopes/scala/type/type.field.class.scope index 3dd8780a46..dc31054ef7 100644 --- a/data/fixtures/scopes/scala/type/type.field.class.scope +++ b/data/fixtures/scopes/scala/type/type.field.class.scope @@ -1,6 +1,6 @@ class Foo { - val bar: Int = 0 - val baz: Int + val bar: Int + val baz: Int = 0 } --- @@ -9,8 +9,8 @@ class Foo { [#1 Domain] = 0:0-3:1 >----------- 0| class Foo { -1| val bar: Int = 0 -2| val baz: Int +1| val bar: Int +2| val baz: Int = 0 3| } -< @@ -19,37 +19,37 @@ class Foo { [#2 Content] = 1:13-1:16 >---< -1| val bar: Int = 0 +1| val bar: Int [#2 Removal] = 1:11-1:16 >-----< -1| val bar: Int = 0 +1| val bar: Int [#2 Leading delimiter] = 1:11-1:13 >--< -1| val bar: Int = 0 +1| val bar: Int -[#2 Domain] = 1:4-1:20 - >----------------< -1| val bar: Int = 0 +[#2 Domain] = 1:4-1:16 + >------------< +1| val bar: Int [#2 Insertion delimiter] = " " [#3 Content] = 2:13-2:16 >---< -2| val baz: Int +2| val baz: Int = 0 [#3 Removal] = 2:11-2:16 >-----< -2| val baz: Int +2| val baz: Int = 0 [#3 Leading delimiter] = 2:11-2:13 >--< -2| val baz: Int +2| val baz: Int = 0 -[#3 Domain] = 2:4-2:16 - >------------< -2| val baz: Int +[#3 Domain] = 2:4-2:20 + >----------------< +2| val baz: Int = 0 [#3 Insertion delimiter] = " " diff --git a/data/fixtures/scopes/scala/type/type.variable.initialized.scope b/data/fixtures/scopes/scala/type/type.variable.initialized.scope new file mode 100644 index 0000000000..28043523ca --- /dev/null +++ b/data/fixtures/scopes/scala/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/data/fixtures/scopes/scala/type/type.variable.uninitialized.scope b/data/fixtures/scopes/scala/type/type.variable.uninitialized.scope new file mode 100644 index 0000000000..99f31b1b07 --- /dev/null +++ b/data/fixtures/scopes/scala/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/data/fixtures/scopes/scala/type/type.variable3.scope b/data/fixtures/scopes/scala/type/type.variable3.scope deleted file mode 100644 index 434e4aa5d5..0000000000 --- a/data/fixtures/scopes/scala/type/type.variable3.scope +++ /dev/null @@ -1,22 +0,0 @@ -foo match { - case foo: Foo => 0 -} ---- - -[Content] = 1:14-1:17 - >---< -1| case foo: Foo => 0 - -[Removal] = 1:12-1:17 - >-----< -1| case foo: Foo => 0 - -[Leading delimiter] = 1:12-1:14 - >--< -1| case foo: Foo => 0 - -[Domain] = 1:9-1:17 - >--------< -1| case foo: Foo => 0 - -[Insertion delimiter] = " " diff --git a/data/fixtures/scopes/scala/value/value.constant.scope b/data/fixtures/scopes/scala/value/value.constant.scope new file mode 100644 index 0000000000..957dcc3e51 --- /dev/null +++ b/data/fixtures/scopes/scala/value/value.constant.scope @@ -0,0 +1,20 @@ +val foo = 0 +--- + +[Content] = 0:10-0:11 + >-< +0| val foo = 0 + +[Removal] = 0:7-0:11 + >----< +0| val foo = 0 + +[Leading delimiter] = 0:7-0:10 + >---< +0| val foo = 0 + +[Domain] = 0:0-0:11 + >-----------< +0| val foo = 0 + +[Insertion delimiter] = " " diff --git a/data/fixtures/scopes/scala/value/value.field.class.scope b/data/fixtures/scopes/scala/value/value.field.class.scope index e5f47606d8..07cf45ff71 100644 --- a/data/fixtures/scopes/scala/value/value.field.class.scope +++ b/data/fixtures/scopes/scala/value/value.field.class.scope @@ -1,22 +1,42 @@ class Foo { - var bar = 0 + var bar: Int = 0 + var baz = 1 } --- -[Content] = 1:14-1:15 +[#1 Content] = 1:19-1:20 + >-< +1| var bar: Int = 0 + +[#1 Removal] = 1:16-1:20 + >----< +1| var bar: Int = 0 + +[#1 Leading delimiter] = 1:16-1:19 + >---< +1| var bar: Int = 0 + +[#1 Domain] = 1:4-1:20 + >----------------< +1| var bar: Int = 0 + +[#1 Insertion delimiter] = " " + + +[#2 Content] = 2:14-2:15 >-< -1| var bar = 0 +2| var baz = 1 -[Removal] = 1:11-1:15 +[#2 Removal] = 2:11-2:15 >----< -1| var bar = 0 +2| var baz = 1 -[Leading delimiter] = 1:11-1:14 +[#2 Leading delimiter] = 2:11-2:14 >---< -1| var bar = 0 +2| var baz = 1 -[Domain] = 1:4-1:15 +[#2 Domain] = 2:4-2:15 >-----------< -1| var bar = 0 +2| var baz = 1 -[Insertion delimiter] = " " +[#2 Insertion delimiter] = " " diff --git a/data/fixtures/scopes/kotlin/value/value.variable.pattern.scope b/data/fixtures/scopes/scala/value/value.variable.destructuring.scope similarity index 66% rename from data/fixtures/scopes/kotlin/value/value.variable.pattern.scope rename to data/fixtures/scopes/scala/value/value.variable.destructuring.scope index 09fdd87f04..8921d8a975 100644 --- a/data/fixtures/scopes/kotlin/value/value.variable.pattern.scope +++ b/data/fixtures/scopes/scala/value/value.variable.destructuring.scope @@ -1,20 +1,20 @@ -var (foo, bar) = baz +val (foo, bar) = baz --- [Content] = 0:17-0:20 >---< -0| var (foo, bar) = baz +0| val (foo, bar) = baz [Removal] = 0:14-0:20 >------< -0| var (foo, bar) = baz +0| val (foo, bar) = baz [Leading delimiter] = 0:14-0:17 >---< -0| var (foo, bar) = baz +0| val (foo, bar) = baz [Domain] = 0:0-0:20 >--------------------< -0| var (foo, bar) = baz +0| val (foo, bar) = baz [Insertion delimiter] = " " diff --git a/data/fixtures/scopes/scala/value/value.variable2.scope b/data/fixtures/scopes/scala/value/value.variable2.scope index 957dcc3e51..4ef2ac039c 100644 --- a/data/fixtures/scopes/scala/value/value.variable2.scope +++ b/data/fixtures/scopes/scala/value/value.variable2.scope @@ -1,20 +1,20 @@ -val foo = 0 +var foo: Int = 0 --- -[Content] = 0:10-0:11 - >-< -0| val foo = 0 +[Content] = 0:15-0:16 + >-< +0| var foo: Int = 0 -[Removal] = 0:7-0:11 - >----< -0| val foo = 0 +[Removal] = 0:12-0:16 + >----< +0| var foo: Int = 0 -[Leading delimiter] = 0:7-0:10 - >---< -0| val foo = 0 +[Leading delimiter] = 0:12-0:15 + >---< +0| var foo: Int = 0 -[Domain] = 0:0-0:11 - >-----------< -0| val foo = 0 +[Domain] = 0:0-0:16 + >----------------< +0| var foo: Int = 0 [Insertion delimiter] = " " diff --git a/data/fixtures/scopes/talon-list/name.variable.scope b/data/fixtures/scopes/talon-list/name.variable.initialized.scope similarity index 87% rename from data/fixtures/scopes/talon-list/name.variable.scope rename to data/fixtures/scopes/talon-list/name.variable.initialized.scope index 9822c0f598..30b2b2133d 100644 --- a/data/fixtures/scopes/talon-list/name.variable.scope +++ b/data/fixtures/scopes/talon-list/name.variable.initialized.scope @@ -6,8 +6,8 @@ not app: vscode >---< 0| not app: vscode -[Removal] = 0:3-0:7 - >----< +[Removal] = 0:0-0:9 + >---------< 0| not app: vscode [Leading delimiter] = 0:3-0:4 diff --git a/data/fixtures/scopes/talon-list/name.variable2.scope b/data/fixtures/scopes/talon-list/name.variable.initialized2.scope similarity index 63% rename from data/fixtures/scopes/talon-list/name.variable2.scope rename to data/fixtures/scopes/talon-list/name.variable.initialized2.scope index 791ecaef96..cef7058dbf 100644 --- a/data/fixtures/scopes/talon-list/name.variable2.scope +++ b/data/fixtures/scopes/talon-list/name.variable.initialized2.scope @@ -1,11 +1,14 @@ foo: bar --- -[Content] = -[Removal] = 0:0-0:3 +[Content] = 0:0-0:3 >---< 0| foo: bar +[Removal] = 0:0-0:5 + >-----< +0| foo: bar + [Domain] = 0:0-0:8 >--------< 0| foo: bar diff --git a/data/fixtures/scopes/talon-list/statement.variable.scope b/data/fixtures/scopes/talon-list/statement.variable.initialized.scope similarity index 100% rename from data/fixtures/scopes/talon-list/statement.variable.scope rename to data/fixtures/scopes/talon-list/statement.variable.initialized.scope diff --git a/data/fixtures/scopes/talon-list/statement.variable2.scope b/data/fixtures/scopes/talon-list/statement.variable.initialized2.scope similarity index 100% rename from data/fixtures/scopes/talon-list/statement.variable2.scope rename to data/fixtures/scopes/talon-list/statement.variable.initialized2.scope diff --git a/data/fixtures/scopes/talon/name/name.variable.scope b/data/fixtures/scopes/talon/name/name.variable.initialized.scope similarity index 100% rename from data/fixtures/scopes/talon/name/name.variable.scope rename to data/fixtures/scopes/talon/name/name.variable.initialized.scope diff --git a/data/fixtures/scopes/talon/statement.variable.scope b/data/fixtures/scopes/talon/statement.variable.initialized.scope similarity index 100% rename from data/fixtures/scopes/talon/statement.variable.scope rename to data/fixtures/scopes/talon/statement.variable.initialized.scope diff --git a/data/fixtures/scopes/typescript.core/name/name.constant.scope b/data/fixtures/scopes/typescript.core/name/name.constant.scope new file mode 100644 index 0000000000..93f40fc7af --- /dev/null +++ b/data/fixtures/scopes/typescript.core/name/name.constant.scope @@ -0,0 +1,20 @@ +const foo: number = 0; +--- + +[Content] = 0:6-0:9 + >---< +0| const foo: number = 0; + +[Removal] = 0:0-0:20 + >--------------------< +0| const foo: number = 0; + +[Leading delimiter] = 0:5-0:6 + >-< +0| const foo: number = 0; + +[Domain] = 0:0-0:22 + >----------------------< +0| const foo: number = 0; + +[Insertion delimiter] = " " diff --git a/data/fixtures/scopes/typescript.core/name/name.field.class.scope b/data/fixtures/scopes/typescript.core/name/name.field.class.scope index e1c039904a..349d5b9b3c 100644 --- a/data/fixtures/scopes/typescript.core/name/name.field.class.scope +++ b/data/fixtures/scopes/typescript.core/name/name.field.class.scope @@ -1,6 +1,7 @@ class Foo { bar: number; baz = 0; + @An bongo: number = 0; } --- @@ -20,12 +21,13 @@ class Foo { >-< 0| class Foo { -[#1 Domain] = 0:0-3:1 +[#1 Domain] = 0:0-4:1 >----------- 0| class Foo { 1| bar: number; 2| baz = 0; -3| } +3| @An bongo: number = 0; +4| } -< [#1 Insertion delimiter] = " " @@ -35,8 +37,8 @@ class Foo { >---< 1| bar: number; -[#2 Removal] = 1:0-1:7 - >-------< +[#2 Removal] = 1:4-1:15 + >-----------< 1| bar: number; [#2 Leading delimiter] = 1:0-1:4 @@ -67,3 +69,22 @@ class Foo { 2| baz = 0; [#3 Insertion delimiter] = " " + + +[#4 Content] = 3:8-3:13 + >-----< +3| @An bongo: number = 0; + +[#4 Removal] = 3:4-3:24 + >--------------------< +3| @An bongo: number = 0; + +[#4 Leading delimiter] = 3:7-3:8 + >-< +3| @An bongo: number = 0; + +[#4 Domain] = 3:4-3:26 + >----------------------< +3| @An bongo: number = 0; + +[#4 Insertion delimiter] = " " diff --git a/data/fixtures/scopes/typescript.core/name/name.field.enum.scope b/data/fixtures/scopes/typescript.core/name/name.field.enum.scope index e0fdaa48df..c4bc85d925 100644 --- a/data/fixtures/scopes/typescript.core/name/name.field.enum.scope +++ b/data/fixtures/scopes/typescript.core/name/name.field.enum.scope @@ -1,6 +1,6 @@ enum Foo { - bar = "-", - baz = 0, + bar = 0, + baz = 1, bongo } --- @@ -24,8 +24,8 @@ enum Foo { [#1 Domain] = 0:0-4:1 >---------- 0| enum Foo { -1| bar = "-", -2| baz = 0, +1| bar = 0, +2| baz = 1, 3| bongo 4| } -< @@ -35,46 +35,38 @@ enum Foo { [#2 Content] = 1:4-1:7 >---< -1| bar = "-", +1| bar = 0, -[#2 Removal] = 1:4-1:8 - >----< -1| bar = "-", +[#2 Removal] = 1:4-1:10 + >------< +1| bar = 0, -[#2 Leading delimiter] = 1:0-1:4 - >----< -1| bar = "-", - -[#2 Trailing delimiter] = 1:7-1:8 - >-< -1| bar = "-", +[#2 Trailing delimiter] = 1:7-1:10 + >---< +1| bar = 0, -[#2 Domain] = 1:4-1:13 - >---------< -1| bar = "-", +[#2 Domain] = 1:4-1:11 + >-------< +1| bar = 0, [#2 Insertion delimiter] = " " [#3 Content] = 2:4-2:7 >---< -2| baz = 0, +2| baz = 1, -[#3 Removal] = 2:4-2:8 - >----< -2| baz = 0, - -[#3 Leading delimiter] = 2:0-2:4 - >----< -2| baz = 0, +[#3 Removal] = 2:4-2:10 + >------< +2| baz = 1, -[#3 Trailing delimiter] = 2:7-2:8 - >-< -2| baz = 0, +[#3 Trailing delimiter] = 2:7-2:10 + >---< +2| baz = 1, [#3 Domain] = 2:4-2:11 >-------< -2| baz = 0, +2| baz = 1, [#3 Insertion delimiter] = " " diff --git a/data/fixtures/scopes/typescript.core/name/name.field.interface.scope b/data/fixtures/scopes/typescript.core/name/name.field.interface.scope index 24ebe3b8d7..7f360f6127 100644 --- a/data/fixtures/scopes/typescript.core/name/name.field.interface.scope +++ b/data/fixtures/scopes/typescript.core/name/name.field.interface.scope @@ -33,8 +33,8 @@ interface Foo { >---< 1| bar: number; -[#2 Removal] = 1:0-1:7 - >-------< +[#2 Removal] = 1:4-1:15 + >-----------< 1| bar: number; [#2 Leading delimiter] = 1:0-1:4 diff --git a/data/fixtures/scopes/typescript.core/name/name.variable.initialized.scope b/data/fixtures/scopes/typescript.core/name/name.variable.initialized.scope new file mode 100644 index 0000000000..7139b87465 --- /dev/null +++ b/data/fixtures/scopes/typescript.core/name/name.variable.initialized.scope @@ -0,0 +1,20 @@ +let foo: number = 0; +--- + +[Content] = 0:4-0:7 + >---< +0| let foo: number = 0; + +[Removal] = 0:0-0:18 + >------------------< +0| let foo: number = 0; + +[Leading delimiter] = 0:3-0:4 + >-< +0| let foo: number = 0; + +[Domain] = 0:0-0:20 + >--------------------< +0| let foo: number = 0; + +[Insertion delimiter] = " " diff --git a/data/fixtures/scopes/typescript.core/name/name.variable.initialized2.scope b/data/fixtures/scopes/typescript.core/name/name.variable.initialized2.scope new file mode 100644 index 0000000000..7c723a1bfc --- /dev/null +++ b/data/fixtures/scopes/typescript.core/name/name.variable.initialized2.scope @@ -0,0 +1,24 @@ +export type Foo = Bar +--- + +[Content] = 0:12-0:15 + >---< +0| export type Foo = Bar + +[Removal] = 0:0-0:18 + >------------------< +0| export type Foo = Bar + +[Leading delimiter] = 0:11-0:12 + >-< +0| export type Foo = Bar + +[Trailing delimiter] = 0:15-0:16 + >-< +0| export type Foo = Bar + +[Domain] = 0:0-0:21 + >---------------------< +0| export type Foo = Bar + +[Insertion delimiter] = " " diff --git a/data/fixtures/scopes/typescript.core/name/name.variable.scope b/data/fixtures/scopes/typescript.core/name/name.variable.scope deleted file mode 100644 index 5a5650d856..0000000000 --- a/data/fixtures/scopes/typescript.core/name/name.variable.scope +++ /dev/null @@ -1,24 +0,0 @@ -export type Foo = Bar; ---- - -[Content] = 0:12-0:15 - >---< -0| export type Foo = Bar; - -[Removal] = 0:12-0:16 - >----< -0| export type Foo = Bar; - -[Leading delimiter] = 0:11-0:12 - >-< -0| export type Foo = Bar; - -[Trailing delimiter] = 0:15-0:16 - >-< -0| export type Foo = Bar; - -[Domain] = 0:0-0:27 - >---------------------------< -0| export type Foo = Bar; - -[Insertion delimiter] = " " diff --git a/data/fixtures/scopes/typescript.core/name/name.variable.uninitialized.scope b/data/fixtures/scopes/typescript.core/name/name.variable.uninitialized.scope new file mode 100644 index 0000000000..7ca2789834 --- /dev/null +++ b/data/fixtures/scopes/typescript.core/name/name.variable.uninitialized.scope @@ -0,0 +1,20 @@ +let foo: number; +--- + +[Content] = 0:4-0:7 + >---< +0| let foo: number; + +[Removal] = 0:0-0:15 + >---------------< +0| let foo: number; + +[Leading delimiter] = 0:3-0:4 + >-< +0| let foo: number; + +[Domain] = 0:0-0:16 + >----------------< +0| let foo: number; + +[Insertion delimiter] = " " diff --git a/data/fixtures/scopes/typescript.core/type/type.variable2.scope b/data/fixtures/scopes/typescript.core/type/type.constant.scope similarity index 100% rename from data/fixtures/scopes/typescript.core/type/type.variable2.scope rename to data/fixtures/scopes/typescript.core/type/type.constant.scope diff --git a/data/fixtures/scopes/typescript.core/type/type.variable.initialized.scope b/data/fixtures/scopes/typescript.core/type/type.variable.initialized.scope new file mode 100644 index 0000000000..42ce292103 --- /dev/null +++ b/data/fixtures/scopes/typescript.core/type/type.variable.initialized.scope @@ -0,0 +1,24 @@ +let foo: number = 0; +--- + +[Content] = 0:9-0:15 + >------< +0| let foo: number = 0; + +[Removal] = 0:7-0:15 + >--------< +0| let foo: number = 0; + +[Leading delimiter] = 0:8-0:9 + >-< +0| let foo: number = 0; + +[Trailing delimiter] = 0:15-0:16 + >-< +0| let foo: number = 0; + +[Domain] = 0:0-0:20 + >--------------------< +0| let foo: number = 0; + +[Insertion delimiter] = " " diff --git a/data/fixtures/scopes/typescript.core/type/type.variable.scope b/data/fixtures/scopes/typescript.core/type/type.variable.uninitialized.scope similarity index 100% rename from data/fixtures/scopes/typescript.core/type/type.variable.scope rename to data/fixtures/scopes/typescript.core/type/type.variable.uninitialized.scope diff --git a/data/fixtures/scopes/typescript.core/value/value.field.enum.scope b/data/fixtures/scopes/typescript.core/value/value.field.enum.scope index e9b28b0b42..882ede0854 100644 --- a/data/fixtures/scopes/typescript.core/value/value.field.enum.scope +++ b/data/fixtures/scopes/typescript.core/value/value.field.enum.scope @@ -1,43 +1,43 @@ enum Foo { - bar = "-", - baz = 0, + bar = 0, + baz = 1, bongo } --- -[#1 Content] = 1:10-1:13 - >---< -1| bar = "-", +[#1 Content] = 1:10-1:11 + >-< +1| bar = 0, -[#1 Removal] = 1:7-1:13 - >------< -1| bar = "-", +[#1 Removal] = 1:7-1:11 + >----< +1| bar = 0, [#1 Leading delimiter] = 1:7-1:10 >---< -1| bar = "-", +1| bar = 0, -[#1 Domain] = 1:4-1:13 - >---------< -1| bar = "-", +[#1 Domain] = 1:4-1:11 + >-------< +1| bar = 0, [#1 Insertion delimiter] = " " [#2 Content] = 2:10-2:11 >-< -2| baz = 0, +2| baz = 1, [#2 Removal] = 2:7-2:11 >----< -2| baz = 0, +2| baz = 1, [#2 Leading delimiter] = 2:7-2:10 >---< -2| baz = 0, +2| baz = 1, [#2 Domain] = 2:4-2:11 >-------< -2| baz = 0, +2| baz = 1, [#2 Insertion delimiter] = " " diff --git a/data/scopeSupportFacetInfos.md b/data/scopeSupportFacetInfos.md index 199fc5284b..0320e001f1 100644 --- a/data/scopeSupportFacetInfos.md +++ b/data/scopeSupportFacetInfos.md @@ -228,9 +228,10 @@ - `name.argument.formal.method` Name of a parameter in a class method declaration - `name.argument.formal.method.iteration` Iteration scope for names of formal parameters in a method declaration: the parameters list. The domain should be the entire method. - `name.assignment` Name (LHS) of an assignment -- `name.assignment.pattern` LHS of an assignment with pattern destructuring +- `name.assignment.destructuring` LHS of an assignment with pattern destructuring - `name.class` Name of a class - `name.command` LHS of a command, eg Talon spoken command or bash +- `name.constant` Name (LHS) of a constant declaration - `name.constructor` Name of a constructor - `name.enum` Name of an enum - `name.field.class` Name (LHS) of a field in a class @@ -248,8 +249,9 @@ - `name.namespace` Name of a namespace - `name.resource` Name in a 'with' / 'use' / 'using' statement - `name.resource.iteration` Iteration scope for names in a 'with' / 'use' / 'using' statement: the resource list. The domain should be the entire statement. -- `name.variable` Name (LHS) of a variable declaration -- `name.variable.pattern` Name (LHS) of a variable declaration with pattern destructuring +- `name.variable.destructuring` Name (LHS) of a variable declaration with pattern destructuring +- `name.variable.initialized` Name (LHS) of an initialized variable declaration +- `name.variable.uninitialized` Name (LHS) of an uninitialized variable declaration ### namedFunction @@ -300,9 +302,11 @@ ### statement - `statement.assignment` An assignment statement +- `statement.assignment.destructuring` An assignment statement with pattern destructuring - `statement.break` A break statement - `statement.class` A class/struct declaration - `statement.command` A command statement, eg Talon spoken command or bash +- `statement.constant` A constant declaration - `statement.constructor` A constructor declaration - `statement.continue` A continue statement - `statement.doWhile` A do-while loop statement @@ -326,7 +330,9 @@ - `statement.static` A static statement - `statement.switch` A switch statement - `statement.try` A try/catch/finally statement -- `statement.variable` A variable declaration +- `statement.variable.destructuring` A variable declaration pattern destructuring +- `statement.variable.initialized` An initialized variable declaration +- `statement.variable.uninitialized` An uninitialized variable declaration - `statement.while` A while loop statement - `statement.yield` A yield statement @@ -359,19 +365,20 @@ ### type - `type.alias` A type alias declaration -- `type.argument.catch` Type of parameter in a catch clause -- `type.argument.formal` Type of formal parameter in a function declaration -- `type.argument.formal.constructor` Type of formal parameter in a constructor declaration +- `type.argument.catch` Type of a parameter in a catch clause +- `type.argument.formal` Type of a formal parameter in a function declaration +- `type.argument.formal.constructor` Type of a formal parameter in a constructor declaration - `type.argument.formal.constructor.iteration` Iteration scope for types of formal parameters in a constructor declaration: the parameters list. The domain should be the entire constructor. - `type.argument.formal.iteration` Iteration scope for types of formal parameters in a function declaration: the parameters list. The domain should be the entire function. -- `type.argument.formal.method` Type of formal parameter in a class method declaration +- `type.argument.formal.method` Type of a formal parameter in a class method declaration - `type.argument.formal.method.iteration` Iteration scope for types of formal parameters in a method declaration: the parameters list. The domain should be the entire method. - `type.cast` A type cast - `type.class` A class declaration +- `type.constant` Type of a constant declaration - `type.enum` An enum declaration -- `type.field.class` Type of field in a class -- `type.field.interface` Type of field in a interface -- `type.foreach` Type of variable in a for each loop +- `type.field.class` Type of a field in a class +- `type.field.interface` Type of a field in a interface +- `type.foreach` Type of a variable in a for each loop - `type.interface` An interface declaration - `type.iteration.block` Iteration scope for types: statement blocks (body of functions/if-statements/for-loops/etc). - `type.iteration.class` Iteration scope for types: class bodies. @@ -379,10 +386,11 @@ - `type.iteration.interface` Iteration scope for types: interface bodies. - `type.resource` Type in a 'with' / 'use' / 'using' statement - `type.resource.iteration` Iteration scope for types in a 'with' / 'use' / 'using' statement: the resource list. The domain should be the entire statement. -- `type.return` Type of return value in a function declaration +- `type.return` Type of a return value in a function declaration - `type.typeArgument` Type argument to a generic / parametrized type - `type.typeArgument.iteration` Iteration scope for type arguments to a generic / parametrized type: the type argument list. -- `type.variable` Type of variable in a variable declaration +- `type.variable.initialized` Type of an initialized variable declaration +- `type.variable.uninitialized` Type of an uninitialized variable declaration ### unit @@ -405,6 +413,7 @@ - `value.assignment` Value (RHS) of an assignment - `value.attribute` Value (RHS) of an attribute eg in a xml element - `value.command` Value (RHS) of an command, eg Talon spoken command +- `value.constant` Value (RHS) of a constant declaration - `value.field.class` Value (RHS) of a field in a class - `value.field.enum` Value (RHS) of a field in an enum - `value.foreach` Iterable in a for each loop @@ -421,7 +430,7 @@ - `value.switch` The value / subject of a switch statement - `value.typeAlias` Value of a type alias declaration - `value.variable` Value (RHS) of a variable declaration -- `value.variable.pattern` Value (RHS) of a variable declaration with pattern destructuring +- `value.variable.destructuring` Value (RHS) of a variable declaration with pattern destructuring - `value.yield` Value of a yield statement ### word diff --git a/packages/common/src/scopeSupportFacets/c.ts b/packages/common/src/scopeSupportFacets/c.ts index adf81af856..c0bb1a9a4b 100644 --- a/packages/common/src/scopeSupportFacets/c.ts +++ b/packages/common/src/scopeSupportFacets/c.ts @@ -18,8 +18,10 @@ export const cCoreScopeSupport: LanguageScopeSupportFacetMap = { "statement.for": supported, "statement.while": supported, "statement.doWhile": supported, - "statement.variable": supported, "statement.assignment": supported, + "statement.constant": supported, + "statement.variable.uninitialized": supported, + "statement.variable.initialized": supported, "statement.return": supported, "statement.break": supported, "statement.continue": supported, @@ -90,7 +92,9 @@ export const cCoreScopeSupport: LanguageScopeSupportFacetMap = { "condition.switchCase.iteration": supported, "name.assignment": supported, - "name.variable": supported, + "name.constant": supported, + "name.variable.uninitialized": supported, + "name.variable.initialized": supported, "name.function": supported, "name.class": supported, "name.enum": supported, @@ -104,6 +108,7 @@ export const cCoreScopeSupport: LanguageScopeSupportFacetMap = { "name.iteration.enum": supported, "value.assignment": supported, + "value.constant": supported, "value.variable": supported, "value.return": supported, "value.switch": supported, @@ -113,7 +118,9 @@ export const cCoreScopeSupport: LanguageScopeSupportFacetMap = { "value.iteration.enum": supported, "value.iteration.document": supported, - "type.variable": supported, + "type.constant": supported, + "type.variable.uninitialized": supported, + "type.variable.initialized": supported, "type.argument.formal": supported, "type.argument.formal.iteration": supported, "type.field.class": supported, @@ -181,10 +188,12 @@ export const cCoreScopeSupport: LanguageScopeSupportFacetMap = { "section.iteration.document": notApplicable, "section.iteration.parent": notApplicable, - // Pattern destructing - "name.assignment.pattern": notApplicable, - "name.variable.pattern": notApplicable, - "value.variable.pattern": notApplicable, + // Pattern destructuring + "statement.variable.destructuring": notApplicable, + "statement.assignment.destructuring": notApplicable, + "name.assignment.destructuring": notApplicable, + "name.variable.destructuring": notApplicable, + "value.variable.destructuring": notApplicable, // Command command: notApplicable, diff --git a/packages/common/src/scopeSupportFacets/csharp.ts b/packages/common/src/scopeSupportFacets/csharp.ts index 4a987ccfde..b439c520a8 100644 --- a/packages/common/src/scopeSupportFacets/csharp.ts +++ b/packages/common/src/scopeSupportFacets/csharp.ts @@ -58,7 +58,6 @@ export const csharpScopeSupport: LanguageScopeSupportFacetMap = { "name.argument.formal.method.iteration": supported, "name.argument.formal": supported, "name.argument.catch": supported, - "name.assignment": supported, "name.class": supported, "name.interface": supported, "name.enum": supported, @@ -69,7 +68,10 @@ export const csharpScopeSupport: LanguageScopeSupportFacetMap = { "name.foreach": supported, "name.function": supported, "name.method": supported, - "name.variable": supported, + "name.assignment": supported, + "name.constant": supported, + "name.variable.uninitialized": supported, + "name.variable.initialized": supported, "name.iteration.block": supported, "name.iteration.class": supported, "name.iteration.interface": supported, @@ -82,7 +84,6 @@ export const csharpScopeSupport: LanguageScopeSupportFacetMap = { "value.argument.formal.method": supported, "value.argument.formal.method.iteration": supported, "value.argument.formal": supported, - "value.assignment": supported, "value.field.class": supported, "value.field.enum": supported, "value.foreach": supported, @@ -90,6 +91,8 @@ export const csharpScopeSupport: LanguageScopeSupportFacetMap = { "value.mapPair.iteration": supported, "value.return.lambda": supported, "value.return": supported, + "value.assignment": supported, + "value.constant": supported, "value.variable": supported, "value.yield": supported, "value.switch": supported, @@ -113,7 +116,9 @@ export const csharpScopeSupport: LanguageScopeSupportFacetMap = { "type.field.class": supported, "type.field.interface": supported, "type.return": supported, - "type.variable": supported, + "type.constant": supported, + "type.variable.uninitialized": supported, + "type.variable.initialized": supported, "type.typeArgument": supported, "type.typeArgument.iteration": supported, "type.iteration.block": supported, @@ -187,8 +192,10 @@ export const csharpScopeSupport: LanguageScopeSupportFacetMap = { "statement.foreach": supported, "statement.while": supported, "statement.doWhile": supported, - "statement.variable": supported, "statement.assignment": supported, + "statement.constant": supported, + "statement.variable.uninitialized": supported, + "statement.variable.initialized": supported, "statement.return": supported, "statement.yield": supported, "statement.break": supported, @@ -258,10 +265,12 @@ export const csharpScopeSupport: LanguageScopeSupportFacetMap = { "value.resource": notApplicable, "value.resource.iteration": notApplicable, - // Pattern destructing - "name.assignment.pattern": notApplicable, - "name.variable.pattern": notApplicable, - "value.variable.pattern": notApplicable, + // Pattern destructuring + "statement.variable.destructuring": notApplicable, + "statement.assignment.destructuring": notApplicable, + "name.assignment.destructuring": notApplicable, + "name.variable.destructuring": notApplicable, + "value.variable.destructuring": notApplicable, // Type alias "type.alias": notApplicable, diff --git a/packages/common/src/scopeSupportFacets/css.ts b/packages/common/src/scopeSupportFacets/css.ts index 47a7ce520e..f143348018 100644 --- a/packages/common/src/scopeSupportFacets/css.ts +++ b/packages/common/src/scopeSupportFacets/css.ts @@ -47,16 +47,27 @@ export const cssScopeSupport: LanguageScopeSupportFacetMap = { "collectionItem.unenclosed.singleLine": notApplicable, // Variable - "statement.variable": notApplicable, + "statement.variable.uninitialized": notApplicable, + "statement.variable.initialized": notApplicable, + "statement.variable.destructuring": notApplicable, "statement.assignment": notApplicable, + "statement.assignment.destructuring": notApplicable, "name.assignment": notApplicable, - "name.assignment.pattern": notApplicable, - "name.variable": notApplicable, - "name.variable.pattern": notApplicable, - "type.variable": notApplicable, + "name.assignment.destructuring": notApplicable, + "name.variable.uninitialized": notApplicable, + "name.variable.initialized": notApplicable, + "name.variable.destructuring": notApplicable, + "type.variable.uninitialized": notApplicable, + "type.variable.initialized": notApplicable, "value.assignment": notApplicable, "value.variable": notApplicable, - "value.variable.pattern": notApplicable, + "value.variable.destructuring": notApplicable, + + // Constant + "statement.constant": notApplicable, + "name.constant": notApplicable, + "value.constant": notApplicable, + "type.constant": notApplicable, // Class class: notApplicable, diff --git a/packages/common/src/scopeSupportFacets/go.ts b/packages/common/src/scopeSupportFacets/go.ts index 335c004ea9..a683784ac1 100644 --- a/packages/common/src/scopeSupportFacets/go.ts +++ b/packages/common/src/scopeSupportFacets/go.ts @@ -25,8 +25,10 @@ export const goScopeSupport: LanguageScopeSupportFacetMap = { "statement.switch": supported, "statement.for": supported, "statement.foreach": supported, - "statement.variable": supported, "statement.assignment": supported, + "statement.constant": supported, + "statement.variable.uninitialized": supported, + "statement.variable.initialized": supported, "statement.return": supported, "statement.break": supported, "statement.continue": supported, @@ -108,7 +110,9 @@ export const goScopeSupport: LanguageScopeSupportFacetMap = { "condition.switchCase.iteration": supported, "name.assignment": supported, - "name.variable": supported, + "name.constant": supported, + "name.variable.uninitialized": supported, + "name.variable.initialized": supported, "name.foreach": supported, "name.function": supported, "name.method": supported, @@ -129,6 +133,7 @@ export const goScopeSupport: LanguageScopeSupportFacetMap = { "key.mapPair.iteration": supported, "value.assignment": supported, + "value.constant": supported, "value.variable": supported, "value.mapPair": supported, "value.mapPair.iteration": supported, @@ -139,7 +144,9 @@ export const goScopeSupport: LanguageScopeSupportFacetMap = { "value.iteration.block": supported, "value.iteration.document": supported, - "type.variable": supported, + "type.constant": supported, + "type.variable.uninitialized": supported, + "type.variable.initialized": supported, "type.argument.formal": supported, "type.argument.formal.iteration": supported, "type.argument.formal.method": supported, @@ -304,11 +311,15 @@ export const goScopeSupport: LanguageScopeSupportFacetMap = { "type.field.interface": notApplicable, "type.iteration.interface": notApplicable, + // Pattern destructuring + "statement.variable.destructuring": notApplicable, + "statement.assignment.destructuring": notApplicable, + "name.assignment.destructuring": notApplicable, + "name.variable.destructuring": notApplicable, + "value.variable.destructuring": notApplicable, + // Miscellaneous "statement.misc": notApplicable, - "name.assignment.pattern": notApplicable, - "name.variable.pattern": notApplicable, - "value.variable.pattern": notApplicable, "value.return.lambda": notApplicable, "type.foreach": notApplicable, "type.cast": notApplicable, diff --git a/packages/common/src/scopeSupportFacets/html.ts b/packages/common/src/scopeSupportFacets/html.ts index 1219c0e752..d562b23591 100644 --- a/packages/common/src/scopeSupportFacets/html.ts +++ b/packages/common/src/scopeSupportFacets/html.ts @@ -21,16 +21,27 @@ export const htmlScopeSupport: LanguageScopeSupportFacetMap = { /* NOT APPLICABLE */ // Variable - "statement.variable": notApplicable, + "statement.variable.uninitialized": notApplicable, + "statement.variable.initialized": notApplicable, + "statement.variable.destructuring": notApplicable, "statement.assignment": notApplicable, + "statement.assignment.destructuring": notApplicable, "name.assignment": notApplicable, - "name.assignment.pattern": notApplicable, - "name.variable": notApplicable, - "name.variable.pattern": notApplicable, - "type.variable": notApplicable, + "name.assignment.destructuring": notApplicable, + "name.variable.uninitialized": notApplicable, + "name.variable.initialized": notApplicable, + "name.variable.destructuring": notApplicable, + "type.variable.uninitialized": notApplicable, + "type.variable.initialized": notApplicable, "value.assignment": notApplicable, "value.variable": notApplicable, - "value.variable.pattern": notApplicable, + "value.variable.destructuring": notApplicable, + + // Constant + "statement.constant": notApplicable, + "name.constant": notApplicable, + "value.constant": notApplicable, + "type.constant": notApplicable, // Class class: notApplicable, diff --git a/packages/common/src/scopeSupportFacets/java.ts b/packages/common/src/scopeSupportFacets/java.ts index ade2743ba2..502a0331ef 100644 --- a/packages/common/src/scopeSupportFacets/java.ts +++ b/packages/common/src/scopeSupportFacets/java.ts @@ -106,8 +106,10 @@ export const javaScopeSupport: LanguageScopeSupportFacetMap = { "statement.foreach": supported, "statement.while": supported, "statement.doWhile": supported, - "statement.variable": supported, "statement.assignment": supported, + "statement.constant": supported, + "statement.variable.uninitialized": supported, + "statement.variable.initialized": supported, "statement.return": supported, "statement.yield": supported, "statement.break": supported, @@ -133,7 +135,6 @@ export const javaScopeSupport: LanguageScopeSupportFacetMap = { "name.argument.formal.method": supported, "name.argument.formal.method.iteration": supported, "name.argument.catch": supported, - "name.assignment": supported, "name.class": supported, "name.interface": supported, "name.enum": supported, @@ -143,7 +144,10 @@ export const javaScopeSupport: LanguageScopeSupportFacetMap = { "name.field.enum": supported, "name.foreach": supported, "name.method": supported, - "name.variable": supported, + "name.assignment": supported, + "name.constant": supported, + "name.variable.uninitialized": supported, + "name.variable.initialized": supported, "name.iteration.document": supported, "name.iteration.class": supported, "name.iteration.interface": supported, @@ -152,13 +156,14 @@ export const javaScopeSupport: LanguageScopeSupportFacetMap = { "name.resource": supported, "value.assignment": supported, + "value.constant": supported, + "value.variable": supported, "value.foreach": supported, "value.switch": supported, "value.field.class": supported, "value.return": supported, "value.yield": supported, "value.return.lambda": supported, - "value.variable": supported, "value.resource": supported, "value.iteration.block": supported, "value.iteration.class": supported, @@ -173,7 +178,9 @@ export const javaScopeSupport: LanguageScopeSupportFacetMap = { "type.field.class": supported, "type.field.interface": supported, "type.return": supported, - "type.variable": supported, + "type.constant": supported, + "type.variable.uninitialized": supported, + "type.variable.initialized": supported, "type.typeArgument": supported, "type.typeArgument.iteration": supported, "type.resource": supported, @@ -243,10 +250,12 @@ export const javaScopeSupport: LanguageScopeSupportFacetMap = { "value.argument.actual": notApplicable, "value.argument.actual.iteration": notApplicable, - // Pattern destructing - "name.assignment.pattern": notApplicable, - "name.variable.pattern": notApplicable, - "value.variable.pattern": notApplicable, + // Pattern destructuring + "statement.variable.destructuring": notApplicable, + "statement.assignment.destructuring": notApplicable, + "name.assignment.destructuring": notApplicable, + "name.variable.destructuring": notApplicable, + "value.variable.destructuring": notApplicable, // Map literal map: notApplicable, diff --git a/packages/common/src/scopeSupportFacets/javascript.ts b/packages/common/src/scopeSupportFacets/javascript.ts index b599a9a38a..8eadbc629f 100644 --- a/packages/common/src/scopeSupportFacets/javascript.ts +++ b/packages/common/src/scopeSupportFacets/javascript.ts @@ -34,8 +34,12 @@ export const javascriptCoreScopeSupport: LanguageScopeSupportFacetMap = { "statement.foreach": supported, "statement.while": supported, "statement.doWhile": supported, - "statement.variable": supported, "statement.assignment": supported, + "statement.assignment.destructuring": supported, + "statement.constant": supported, + "statement.variable.uninitialized": supported, + "statement.variable.initialized": supported, + "statement.variable.destructuring": supported, "statement.return": supported, "statement.yield": supported, "statement.break": supported, @@ -144,9 +148,11 @@ export const javascriptCoreScopeSupport: LanguageScopeSupportFacetMap = { "name.argument.catch": supported, "name.foreach": supported, "name.assignment": supported, - "name.assignment.pattern": supported, - "name.variable": supported, - "name.variable.pattern": supported, + "name.assignment.destructuring": supported, + "name.constant": supported, + "name.variable.uninitialized": supported, + "name.variable.initialized": supported, + "name.variable.destructuring": supported, "name.function": supported, "name.method": supported, "name.constructor": supported, @@ -168,8 +174,9 @@ export const javascriptCoreScopeSupport: LanguageScopeSupportFacetMap = { "value.mapPair": supported, "value.mapPair.iteration": supported, "value.assignment": supported, + "value.constant": supported, "value.variable": supported, - "value.variable.pattern": supported, + "value.variable.destructuring": supported, "value.foreach": supported, "value.return": supported, "value.return.lambda": supported, @@ -281,7 +288,9 @@ export const javascriptScopeSupport: LanguageScopeSupportFacetMap = { "type.field.class": notApplicable, "type.foreach": notApplicable, "type.return": notApplicable, - "type.variable": notApplicable, + "type.constant": notApplicable, + "type.variable.uninitialized": notApplicable, + "type.variable.initialized": notApplicable, "type.typeArgument": notApplicable, "type.typeArgument.iteration": notApplicable, "type.iteration.block": notApplicable, diff --git a/packages/common/src/scopeSupportFacets/json.ts b/packages/common/src/scopeSupportFacets/json.ts index 7a880c6be7..4a36c0a9a3 100644 --- a/packages/common/src/scopeSupportFacets/json.ts +++ b/packages/common/src/scopeSupportFacets/json.ts @@ -24,16 +24,27 @@ export const jsonScopeSupport: LanguageScopeSupportFacetMap = { /* NOT APPLICABLE */ // Variable - "statement.variable": notApplicable, + "statement.variable.uninitialized": notApplicable, + "statement.variable.initialized": notApplicable, + "statement.variable.destructuring": notApplicable, "statement.assignment": notApplicable, + "statement.assignment.destructuring": notApplicable, "name.assignment": notApplicable, - "name.assignment.pattern": notApplicable, - "name.variable": notApplicable, - "name.variable.pattern": notApplicable, - "type.variable": notApplicable, + "name.assignment.destructuring": notApplicable, + "name.variable.uninitialized": notApplicable, + "name.variable.initialized": notApplicable, + "name.variable.destructuring": notApplicable, + "type.variable.uninitialized": notApplicable, + "type.variable.initialized": notApplicable, "value.assignment": notApplicable, "value.variable": notApplicable, - "value.variable.pattern": notApplicable, + "value.variable.destructuring": notApplicable, + + // Constant + "statement.constant": notApplicable, + "name.constant": notApplicable, + "value.constant": notApplicable, + "type.constant": notApplicable, // Class class: notApplicable, diff --git a/packages/common/src/scopeSupportFacets/kotlin.ts b/packages/common/src/scopeSupportFacets/kotlin.ts index 1b77ca770b..869aec4ec3 100644 --- a/packages/common/src/scopeSupportFacets/kotlin.ts +++ b/packages/common/src/scopeSupportFacets/kotlin.ts @@ -107,8 +107,11 @@ export const kotlinScopeSupport: LanguageScopeSupportFacetMap = { "statement.foreach": supported, "statement.while": supported, "statement.doWhile": supported, - "statement.variable": supported, "statement.assignment": supported, + "statement.constant": supported, + "statement.variable.uninitialized": supported, + "statement.variable.initialized": supported, + "statement.variable.destructuring": supported, "statement.return": supported, "statement.break": supported, "statement.continue": supported, @@ -135,7 +138,6 @@ export const kotlinScopeSupport: LanguageScopeSupportFacetMap = { "name.argument.catch": supported, "name.argument.actual": supported, "name.argument.actual.iteration": supported, - "name.assignment": supported, "name.class": supported, "name.interface": supported, "name.enum": supported, @@ -146,8 +148,11 @@ export const kotlinScopeSupport: LanguageScopeSupportFacetMap = { "name.foreach": supported, "name.function": supported, "name.method": supported, - "name.variable": supported, - "name.variable.pattern": supported, + "name.assignment": supported, + "name.constant": supported, + "name.variable.uninitialized": supported, + "name.variable.initialized": supported, + "name.variable.destructuring": supported, "name.iteration.document": supported, "name.iteration.class": supported, "name.iteration.interface": supported, @@ -166,13 +171,14 @@ export const kotlinScopeSupport: LanguageScopeSupportFacetMap = { "value.argument.formal.method": supported, "value.argument.formal.method.iteration": supported, "value.assignment": supported, + "value.constant": supported, + "value.variable": supported, + "value.variable.destructuring": supported, "value.foreach": supported, "value.switch": supported, "value.field.class": supported, "value.return": supported, "value.return.lambda": supported, - "value.variable": supported, - "value.variable.pattern": supported, "value.typeAlias": supported, "value.iteration.block": supported, "value.iteration.class": supported, @@ -191,7 +197,9 @@ export const kotlinScopeSupport: LanguageScopeSupportFacetMap = { "type.field.class": supported, "type.field.interface": supported, "type.return": supported, - "type.variable": supported, + "type.constant": supported, + "type.variable.uninitialized": supported, + "type.variable.initialized": supported, "type.typeArgument": supported, "type.typeArgument.iteration": supported, "type.class": supported, @@ -280,9 +288,6 @@ export const kotlinScopeSupport: LanguageScopeSupportFacetMap = { "statement.yield": notApplicable, "value.yield": notApplicable, - // Keyword argument assignment pattern - "name.assignment.pattern": notApplicable, - // Values in enum "value.field.enum": notApplicable, "value.iteration.enum": notApplicable, @@ -303,4 +308,6 @@ export const kotlinScopeSupport: LanguageScopeSupportFacetMap = { "class.iteration.block": notApplicable, "type.cast": notApplicable, "statement.misc": notApplicable, + "statement.assignment.destructuring": notApplicable, + "name.assignment.destructuring": notApplicable, }; diff --git a/packages/common/src/scopeSupportFacets/latex.ts b/packages/common/src/scopeSupportFacets/latex.ts index 038698915e..26c5f16218 100644 --- a/packages/common/src/scopeSupportFacets/latex.ts +++ b/packages/common/src/scopeSupportFacets/latex.ts @@ -35,16 +35,27 @@ export const latexScopeSupport: LanguageScopeSupportFacetMap = { /* NOT APPLICABLE */ // Variable - "statement.variable": notApplicable, + "statement.variable.uninitialized": notApplicable, + "statement.variable.initialized": notApplicable, + "statement.variable.destructuring": notApplicable, "statement.assignment": notApplicable, + "statement.assignment.destructuring": notApplicable, "name.assignment": notApplicable, - "name.assignment.pattern": notApplicable, - "name.variable": notApplicable, - "name.variable.pattern": notApplicable, - "type.variable": notApplicable, + "name.assignment.destructuring": notApplicable, + "name.variable.uninitialized": notApplicable, + "name.variable.initialized": notApplicable, + "name.variable.destructuring": notApplicable, + "type.variable.uninitialized": notApplicable, + "type.variable.initialized": notApplicable, "value.assignment": notApplicable, "value.variable": notApplicable, - "value.variable.pattern": notApplicable, + "value.variable.destructuring": notApplicable, + + // Constant + "statement.constant": notApplicable, + "name.constant": notApplicable, + "value.constant": notApplicable, + "type.constant": notApplicable, // Class class: notApplicable, diff --git a/packages/common/src/scopeSupportFacets/lua.ts b/packages/common/src/scopeSupportFacets/lua.ts index 8b40bc48c2..8f63946ccc 100644 --- a/packages/common/src/scopeSupportFacets/lua.ts +++ b/packages/common/src/scopeSupportFacets/lua.ts @@ -54,7 +54,7 @@ export const luaScopeSupport: LanguageScopeSupportFacetMap = { "argumentList.formal.method.multiLine": supported, "name.assignment": supported, - "name.assignment.pattern": supported, + "name.assignment.destructuring": supported, "name.argument.formal": supported, "name.argument.formal.iteration": supported, "name.argument.formal.method": supported, @@ -62,8 +62,9 @@ export const luaScopeSupport: LanguageScopeSupportFacetMap = { "name.foreach": supported, "name.function": supported, "name.method": supported, - "name.variable": supported, - "name.variable.pattern": supported, + "name.variable.uninitialized": supported, + "name.variable.initialized": supported, + "name.variable.destructuring": supported, "name.iteration.block": supported, "name.iteration.document": supported, @@ -71,7 +72,7 @@ export const luaScopeSupport: LanguageScopeSupportFacetMap = { "value.foreach": supported, "value.return": supported, "value.variable": supported, - "value.variable.pattern": supported, + "value.variable.destructuring": supported, "value.iteration.block": supported, "value.iteration.document": supported, @@ -104,8 +105,11 @@ export const luaScopeSupport: LanguageScopeSupportFacetMap = { "statement.doWhile": supported, "statement.for": supported, "statement.foreach": supported, - "statement.variable": supported, "statement.assignment": supported, + "statement.assignment.destructuring": supported, + "statement.variable.uninitialized": supported, + "statement.variable.initialized": supported, + "statement.variable.destructuring": supported, "statement.return": supported, "statement.break": supported, "statement.iteration.document": supported, @@ -202,7 +206,8 @@ export const luaScopeSupport: LanguageScopeSupportFacetMap = { "type.argument.formal.method.iteration": notApplicable, "type.argument.catch": notApplicable, "type.return": notApplicable, - "type.variable": notApplicable, + "type.variable.uninitialized": notApplicable, + "type.variable.initialized": notApplicable, "type.typeArgument": notApplicable, "type.typeArgument.iteration": notApplicable, "type.alias": notApplicable, @@ -308,6 +313,12 @@ export const luaScopeSupport: LanguageScopeSupportFacetMap = { notebookCell: notApplicable, "interior.cell": notApplicable, + // Constant + "statement.constant": notApplicable, + "name.constant": notApplicable, + "value.constant": notApplicable, + "type.constant": notApplicable, + // Miscellaneous "statement.misc": notApplicable, pairDelimiter: notApplicable, diff --git a/packages/common/src/scopeSupportFacets/markdown.ts b/packages/common/src/scopeSupportFacets/markdown.ts index e257e5bc00..f0021b08d4 100644 --- a/packages/common/src/scopeSupportFacets/markdown.ts +++ b/packages/common/src/scopeSupportFacets/markdown.ts @@ -25,16 +25,27 @@ export const markdownScopeSupport: LanguageScopeSupportFacetMap = { "collectionItem.unenclosed.singleLine": notApplicable, // Variable - "statement.variable": notApplicable, + "statement.variable.uninitialized": notApplicable, + "statement.variable.initialized": notApplicable, + "statement.variable.destructuring": notApplicable, "statement.assignment": notApplicable, + "statement.assignment.destructuring": notApplicable, "name.assignment": notApplicable, - "name.assignment.pattern": notApplicable, - "name.variable": notApplicable, - "name.variable.pattern": notApplicable, - "type.variable": notApplicable, + "name.assignment.destructuring": notApplicable, + "name.variable.uninitialized": notApplicable, + "name.variable.initialized": notApplicable, + "name.variable.destructuring": notApplicable, + "type.variable.uninitialized": notApplicable, + "type.variable.initialized": notApplicable, "value.assignment": notApplicable, "value.variable": notApplicable, - "value.variable.pattern": notApplicable, + "value.variable.destructuring": notApplicable, + + // Constant + "statement.constant": notApplicable, + "name.constant": notApplicable, + "value.constant": notApplicable, + "type.constant": notApplicable, // Class class: notApplicable, diff --git a/packages/common/src/scopeSupportFacets/php.ts b/packages/common/src/scopeSupportFacets/php.ts index ab00d104ae..05c657b47e 100644 --- a/packages/common/src/scopeSupportFacets/php.ts +++ b/packages/common/src/scopeSupportFacets/php.ts @@ -1,8 +1,7 @@ import type { LanguageScopeSupportFacetMap } from "./scopeSupportFacets.types"; import { ScopeSupportFacetLevel } from "./scopeSupportFacets.types"; -// eslint-disable-next-line @typescript-eslint/no-unused-vars -const { supported, unsupported, notApplicable } = ScopeSupportFacetLevel; +const { supported, notApplicable } = ScopeSupportFacetLevel; export const phpScopeSupport: LanguageScopeSupportFacetMap = { "comment.line": supported, @@ -29,7 +28,7 @@ export const phpScopeSupport: LanguageScopeSupportFacetMap = { "argument.actual.multiLine": supported, "argument.actual.iteration": supported, - "name.variable": supported, + "name.variable.initialized": supported, "name.assignment": supported, "key.mapPair": supported, @@ -54,4 +53,15 @@ export const phpScopeSupport: LanguageScopeSupportFacetMap = { "string.singleLine": supported, disqualifyDelimiter: supported, + + /* NOT APPLICABLE */ + + // Constant + "statement.constant": notApplicable, + "name.constant": notApplicable, + "value.constant": notApplicable, + "type.constant": notApplicable, + + // Miscellaneous + "name.variable.uninitialized": notApplicable, }; diff --git a/packages/common/src/scopeSupportFacets/properties.ts b/packages/common/src/scopeSupportFacets/properties.ts index 0acba4feaa..d7d630fd30 100644 --- a/packages/common/src/scopeSupportFacets/properties.ts +++ b/packages/common/src/scopeSupportFacets/properties.ts @@ -4,10 +4,10 @@ import { ScopeSupportFacetLevel } from "./scopeSupportFacets.types"; const { supported, notApplicable } = ScopeSupportFacetLevel; export const propertiesScopeSupport: LanguageScopeSupportFacetMap = { - "statement.variable": supported, + "statement.variable.initialized": supported, "statement.iteration.document": supported, - "name.variable": supported, + "name.variable.initialized": supported, "name.iteration.document": supported, "key.mapPair": supported, @@ -235,10 +235,12 @@ export const propertiesScopeSupport: LanguageScopeSupportFacetMap = { "value.resource": notApplicable, "value.resource.iteration": notApplicable, - // Pattern destruction - "name.assignment.pattern": notApplicable, - "name.variable.pattern": notApplicable, - "value.variable.pattern": notApplicable, + // Pattern destructuring + "statement.variable.destructuring": notApplicable, + "statement.assignment.destructuring": notApplicable, + "name.assignment.destructuring": notApplicable, + "name.variable.destructuring": notApplicable, + "value.variable.destructuring": notApplicable, // String "string.singleLine": notApplicable, @@ -316,14 +318,27 @@ export const propertiesScopeSupport: LanguageScopeSupportFacetMap = { "statement.break": notApplicable, "statement.continue": notApplicable, - // Miscellaneous - "statement.misc": notApplicable, + // Types "type.cast": notApplicable, "type.iteration.block": notApplicable, "type.iteration.document": notApplicable, "type.typeArgument.iteration": notApplicable, "type.typeArgument": notApplicable, - "type.variable": notApplicable, + "type.variable.uninitialized": notApplicable, + "type.variable.initialized": notApplicable, + + // Constant + "statement.constant": notApplicable, + "name.constant": notApplicable, + "value.constant": notApplicable, + "type.constant": notApplicable, + + // Uninitialized variables + "statement.variable.uninitialized": notApplicable, + "name.variable.uninitialized": notApplicable, + + // Miscellaneous + "statement.misc": notApplicable, disqualifyDelimiter: notApplicable, environment: notApplicable, fieldAccess: notApplicable, diff --git a/packages/common/src/scopeSupportFacets/python.ts b/packages/common/src/scopeSupportFacets/python.ts index c624909643..16081316aa 100644 --- a/packages/common/src/scopeSupportFacets/python.ts +++ b/packages/common/src/scopeSupportFacets/python.ts @@ -17,7 +17,10 @@ export const pythonScopeSupport: LanguageScopeSupportFacetMap = { "name.argument.formal.method.iteration": supported, "name.argument.catch": supported, "name.assignment": supported, - "name.assignment.pattern": supported, + "name.assignment.destructuring": supported, + "name.variable.uninitialized": supported, + "name.variable.initialized": supported, + "name.variable.destructuring": supported, "name.class": supported, "name.constructor": supported, "name.field.class": supported, @@ -26,8 +29,6 @@ export const pythonScopeSupport: LanguageScopeSupportFacetMap = { "name.iteration.class": supported, "name.iteration.document": supported, "name.method": supported, - "name.variable": supported, - "name.variable.pattern": supported, "value.foreach": supported, "value.yield": supported, @@ -42,13 +43,13 @@ export const pythonScopeSupport: LanguageScopeSupportFacetMap = { "value.argument.formal.method": supported, "value.argument.formal.method.iteration": supported, "value.assignment": supported, + "value.variable": supported, + "value.variable.destructuring": supported, "value.field.class": supported, "value.mapPair": supported, "value.mapPair.iteration": supported, "value.return": supported, "value.return.lambda": supported, - "value.variable": supported, - "value.variable.pattern": supported, "value.switch": supported, "value.iteration.block": supported, "value.iteration.class": supported, @@ -66,7 +67,8 @@ export const pythonScopeSupport: LanguageScopeSupportFacetMap = { "type.return": supported, "type.typeArgument": supported, "type.typeArgument.iteration": supported, - "type.variable": supported, + "type.variable.uninitialized": supported, + "type.variable.initialized": supported, "type.iteration.block": supported, "type.iteration.class": supported, "type.iteration.document": supported, @@ -185,8 +187,11 @@ export const pythonScopeSupport: LanguageScopeSupportFacetMap = { "statement.switch": supported, "statement.foreach": supported, "statement.while": supported, - "statement.variable": supported, "statement.assignment": supported, + "statement.assignment.destructuring": supported, + "statement.variable.uninitialized": supported, + "statement.variable.initialized": supported, + "statement.variable.destructuring": supported, "statement.return": supported, "statement.yield": supported, "statement.break": supported, @@ -302,6 +307,12 @@ export const pythonScopeSupport: LanguageScopeSupportFacetMap = { "interior.static": notApplicable, "statement.static": notApplicable, + // Constant + "statement.constant": notApplicable, + "name.constant": notApplicable, + "value.constant": notApplicable, + "type.constant": notApplicable, + // Miscellaneous "statement.misc": notApplicable, environment: notApplicable, diff --git a/packages/common/src/scopeSupportFacets/r.ts b/packages/common/src/scopeSupportFacets/r.ts index dfd6ed26a8..0cf51e5bff 100644 --- a/packages/common/src/scopeSupportFacets/r.ts +++ b/packages/common/src/scopeSupportFacets/r.ts @@ -34,7 +34,7 @@ export const rScopeSupport: LanguageScopeSupportFacetMap = { ifStatement: supported, "name.assignment": supported, "name.function": supported, - "name.variable": supported, + "name.variable.initialized": supported, namedFunction: supported, "value.assignment": supported, "value.variable": supported, @@ -83,10 +83,15 @@ export const rScopeSupport: LanguageScopeSupportFacetMap = { "functionCall.chain": notApplicable, "functionCallee.chain": notApplicable, + // Uninitialized variables + "statement.variable.uninitialized": notApplicable, + "name.variable.uninitialized": notApplicable, + "type.variable.uninitialized": notApplicable, + "interior.cell": notApplicable, "interior.command": notApplicable, "interior.element": notApplicable, - "name.assignment.pattern": notApplicable, + "name.assignment.destructuring": notApplicable, "branch.loop": notApplicable, "branch.loop.iteration": notApplicable, @@ -112,9 +117,9 @@ export const rScopeSupport: LanguageScopeSupportFacetMap = { "type.iteration.class": notApplicable, "type.typeArgument": notApplicable, "type.typeArgument.iteration": notApplicable, - "type.variable": notApplicable, + "type.variable.initialized": notApplicable, "value.typeAlias": notApplicable, - "value.variable.pattern": notApplicable, + "value.variable.destructuring": notApplicable, command: notApplicable, element: notApplicable, endTag: notApplicable, diff --git a/packages/common/src/scopeSupportFacets/rust.ts b/packages/common/src/scopeSupportFacets/rust.ts index 4eda7c1491..a6af570788 100644 --- a/packages/common/src/scopeSupportFacets/rust.ts +++ b/packages/common/src/scopeSupportFacets/rust.ts @@ -82,8 +82,12 @@ export const rustScopeSupport: LanguageScopeSupportFacetMap = { "statement.switch": supported, "statement.foreach": supported, "statement.while": supported, - "statement.variable": supported, "statement.assignment": supported, + "statement.assignment.destructuring": supported, + "statement.constant": supported, + "statement.variable.uninitialized": supported, + "statement.variable.initialized": supported, + "statement.variable.destructuring": supported, "statement.return": supported, "statement.break": supported, "statement.continue": supported, @@ -105,7 +109,11 @@ export const rustScopeSupport: LanguageScopeSupportFacetMap = { "name.argument.formal.method": supported, "name.argument.formal.method.iteration": supported, "name.assignment": supported, - "name.assignment.pattern": supported, + "name.assignment.destructuring": supported, + "name.constant": supported, + "name.variable.uninitialized": supported, + "name.variable.initialized": supported, + "name.variable.destructuring": supported, "name.class": supported, "name.enum": supported, "name.field.class": supported, @@ -114,8 +122,6 @@ export const rustScopeSupport: LanguageScopeSupportFacetMap = { "name.function": supported, "name.method": supported, "name.namespace": supported, - "name.variable": supported, - "name.variable.pattern": supported, "name.iteration.block": supported, "name.iteration.class": supported, "name.iteration.enum": supported, @@ -130,8 +136,9 @@ export const rustScopeSupport: LanguageScopeSupportFacetMap = { "value.return.lambda": supported, "value.switch": supported, "value.typeAlias": supported, + "value.constant": supported, "value.variable": supported, - "value.variable.pattern": supported, + "value.variable.destructuring": supported, "value.iteration.block": supported, "value.iteration.class": supported, "value.iteration.document": supported, @@ -146,7 +153,9 @@ export const rustScopeSupport: LanguageScopeSupportFacetMap = { "type.enum": supported, "type.field.class": supported, "type.return": supported, - "type.variable": supported, + "type.constant": supported, + "type.variable.uninitialized": supported, + "type.variable.initialized": supported, "type.typeArgument": supported, "type.typeArgument.iteration": supported, "type.alias": supported, diff --git a/packages/common/src/scopeSupportFacets/scala.ts b/packages/common/src/scopeSupportFacets/scala.ts index b695848460..ea096efffe 100644 --- a/packages/common/src/scopeSupportFacets/scala.ts +++ b/packages/common/src/scopeSupportFacets/scala.ts @@ -107,8 +107,11 @@ export const scalaScopeSupport: LanguageScopeSupportFacetMap = { "statement.foreach": supported, "statement.while": supported, "statement.doWhile": supported, - "statement.variable": supported, "statement.assignment": supported, + "statement.constant": supported, + "statement.variable.uninitialized": supported, + "statement.variable.initialized": supported, + "statement.variable.destructuring": supported, "statement.return": supported, "statement.namespace": supported, "statement.iteration.document": supported, @@ -133,7 +136,6 @@ export const scalaScopeSupport: LanguageScopeSupportFacetMap = { "name.argument.formal.constructor": supported, "name.argument.formal.constructor.iteration": supported, "name.argument.catch": supported, - "name.assignment": supported, "name.class": supported, "name.interface": supported, "name.enum": supported, @@ -143,8 +145,11 @@ export const scalaScopeSupport: LanguageScopeSupportFacetMap = { "name.foreach": supported, "name.function": supported, "name.method": supported, - "name.variable": supported, - "name.variable.pattern": supported, + "name.assignment": supported, + "name.constant": supported, + "name.variable.uninitialized": supported, + "name.variable.initialized": supported, + "name.variable.destructuring": supported, "name.iteration.document": supported, "name.iteration.class": supported, "name.iteration.interface": supported, @@ -161,13 +166,14 @@ export const scalaScopeSupport: LanguageScopeSupportFacetMap = { "value.argument.formal.constructor": supported, "value.argument.formal.constructor.iteration": supported, "value.assignment": supported, + "value.constant": supported, "value.foreach": supported, "value.switch": supported, "value.field.class": supported, "value.return": supported, "value.return.lambda": supported, "value.variable": supported, - "value.variable.pattern": supported, + "value.variable.destructuring": supported, "value.iteration.block": supported, "value.iteration.class": supported, "value.iteration.document": supported, @@ -184,7 +190,9 @@ export const scalaScopeSupport: LanguageScopeSupportFacetMap = { "type.field.class": supported, "type.field.interface": supported, "type.return": supported, - "type.variable": supported, + "type.constant": supported, + "type.variable.uninitialized": supported, + "type.variable.initialized": supported, "type.typeArgument": supported, "type.typeArgument.iteration": supported, "type.class": supported, @@ -251,9 +259,6 @@ export const scalaScopeSupport: LanguageScopeSupportFacetMap = { "value.resource": notApplicable, "value.resource.iteration": notApplicable, - // Pattern destructuring assignment - "name.assignment.pattern": notApplicable, - // Branches and conditions "branch.ternary": notApplicable, "branch.ternary.iteration": notApplicable, @@ -308,4 +313,6 @@ export const scalaScopeSupport: LanguageScopeSupportFacetMap = { attribute: notApplicable, "type.cast": notApplicable, "statement.misc": notApplicable, + "statement.assignment.destructuring": notApplicable, + "name.assignment.destructuring": notApplicable, }; diff --git a/packages/common/src/scopeSupportFacets/scm.ts b/packages/common/src/scopeSupportFacets/scm.ts index c7047363bf..ef8a518cc3 100644 --- a/packages/common/src/scopeSupportFacets/scm.ts +++ b/packages/common/src/scopeSupportFacets/scm.ts @@ -26,16 +26,27 @@ export const scmScopeSupport: LanguageScopeSupportFacetMap = { /* NOT APPLICABLE */ // Variable - "statement.variable": notApplicable, + "statement.variable.uninitialized": notApplicable, + "statement.variable.initialized": notApplicable, + "statement.variable.destructuring": notApplicable, "statement.assignment": notApplicable, + "statement.assignment.destructuring": notApplicable, "name.assignment": notApplicable, - "name.assignment.pattern": notApplicable, - "name.variable": notApplicable, - "name.variable.pattern": notApplicable, - "type.variable": notApplicable, + "name.assignment.destructuring": notApplicable, + "name.variable.uninitialized": notApplicable, + "name.variable.initialized": notApplicable, + "name.variable.destructuring": notApplicable, + "type.variable.uninitialized": notApplicable, + "type.variable.initialized": notApplicable, "value.assignment": notApplicable, "value.variable": notApplicable, - "value.variable.pattern": notApplicable, + "value.variable.destructuring": notApplicable, + + // Constant + "statement.constant": notApplicable, + "name.constant": notApplicable, + "value.constant": notApplicable, + "type.constant": notApplicable, // Class class: notApplicable, diff --git a/packages/common/src/scopeSupportFacets/scopeSupportFacetInfos.ts b/packages/common/src/scopeSupportFacets/scopeSupportFacetInfos.ts index 05ef8f340b..ae7a9b4d9c 100644 --- a/packages/common/src/scopeSupportFacets/scopeSupportFacetInfos.ts +++ b/packages/common/src/scopeSupportFacets/scopeSupportFacetInfos.ts @@ -130,14 +130,30 @@ export const scopeSupportFacetInfos: Record< description: "A do-while loop statement", scopeType: "statement", }, - "statement.variable": { - description: "A variable declaration", + "statement.variable.uninitialized": { + description: "An uninitialized variable declaration", + scopeType: "statement", + }, + "statement.variable.initialized": { + description: "An initialized variable declaration", + scopeType: "statement", + }, + "statement.variable.destructuring": { + description: "A variable declaration pattern destructuring", + scopeType: "statement", + }, + "statement.constant": { + description: "A constant declaration", scopeType: "statement", }, "statement.assignment": { description: "An assignment statement", scopeType: "statement", }, + "statement.assignment.destructuring": { + description: "An assignment statement with pattern destructuring", + scopeType: "statement", + }, "statement.return": { description: "A return statement", scopeType: "statement", @@ -574,27 +590,35 @@ export const scopeSupportFacetInfos: Record< "the switch statement body", ), - "name.assignment": { - description: "Name (LHS) of an assignment", - scopeType: "name", - }, - "name.assignment.pattern": { - description: "LHS of an assignment with pattern destructuring", - scopeType: "name", - }, "name.command": { description: "LHS of a command, eg Talon spoken command or bash", scopeType: "name", }, - "name.variable": { - description: "Name (LHS) of a variable declaration", + "name.variable.uninitialized": { + description: "Name (LHS) of an uninitialized variable declaration", scopeType: "name", }, - "name.variable.pattern": { + "name.variable.initialized": { + description: "Name (LHS) of an initialized variable declaration", + scopeType: "name", + }, + "name.variable.destructuring": { description: "Name (LHS) of a variable declaration with pattern destructuring", scopeType: "name", }, + "name.constant": { + description: "Name (LHS) of a constant declaration", + scopeType: "name", + }, + "name.assignment": { + description: "Name (LHS) of an assignment", + scopeType: "name", + }, + "name.assignment.destructuring": { + description: "LHS of an assignment with pattern destructuring", + scopeType: "name", + }, "name.foreach": { description: "Iteration variable name in a for each loop", scopeType: "name", @@ -708,10 +732,6 @@ export const scopeSupportFacetInfos: Record< "should be between the braces", ), - "value.assignment": { - description: "Value (RHS) of an assignment", - scopeType: "value", - }, "value.command": { description: "Value (RHS) of an command, eg Talon spoken command", scopeType: "value", @@ -720,11 +740,19 @@ export const scopeSupportFacetInfos: Record< description: "Value (RHS) of a variable declaration", scopeType: "value", }, - "value.variable.pattern": { + "value.variable.destructuring": { description: "Value (RHS) of a variable declaration with pattern destructuring", scopeType: "value", }, + "value.constant": { + description: "Value (RHS) of a constant declaration", + scopeType: "value", + }, + "value.assignment": { + description: "Value (RHS) of an assignment", + scopeType: "value", + }, "value.mapPair": { description: "Value (RHS) of a key-value pair in a map", scopeType: "value", @@ -820,12 +848,20 @@ export const scopeSupportFacetInfos: Record< scopeType: "value", }, - "type.variable": { - description: "Type of variable in a variable declaration", + "type.variable.uninitialized": { + description: "Type of an uninitialized variable declaration", + scopeType: "type", + }, + "type.variable.initialized": { + description: "Type of an initialized variable declaration", + scopeType: "type", + }, + "type.constant": { + description: "Type of a constant declaration", scopeType: "type", }, "type.argument.formal": { - description: "Type of formal parameter in a function declaration", + description: "Type of a formal parameter in a function declaration", scopeType: "type", }, "type.argument.formal.iteration": iteration( @@ -834,7 +870,7 @@ export const scopeSupportFacetInfos: Record< "the parameters list. The domain should be the entire function", ), "type.argument.formal.method": { - description: "Type of formal parameter in a class method declaration", + description: "Type of a formal parameter in a class method declaration", scopeType: "type", }, "type.argument.formal.method.iteration": iteration( @@ -843,7 +879,7 @@ export const scopeSupportFacetInfos: Record< "the parameters list. The domain should be the entire method", ), "type.argument.formal.constructor": { - description: "Type of formal parameter in a constructor declaration", + description: "Type of a formal parameter in a constructor declaration", scopeType: "type", }, "type.argument.formal.constructor.iteration": iteration( @@ -852,24 +888,24 @@ export const scopeSupportFacetInfos: Record< "the parameters list. The domain should be the entire constructor", ), "type.argument.catch": { - description: "Type of parameter in a catch clause", + description: "Type of a parameter in a catch clause", scopeType: "type", }, "type.return": { - description: "Type of return value in a function declaration", + description: "Type of a return value in a function declaration", scopeType: "type", }, "type.field.class": { - description: "Type of field in a class", + description: "Type of a field in a class", scopeType: "type", }, "type.field.interface": { - description: "Type of field in a interface", + description: "Type of a field in a interface", scopeType: "type", }, "type.foreach": { - description: "Type of variable in a for each loop", + description: "Type of a variable in a for each loop", scopeType: "type", }, "type.enum": { diff --git a/packages/common/src/scopeSupportFacets/scopeSupportFacets.types.ts b/packages/common/src/scopeSupportFacets/scopeSupportFacets.types.ts index 0b21f3c068..befa7e4fe4 100644 --- a/packages/common/src/scopeSupportFacets/scopeSupportFacets.types.ts +++ b/packages/common/src/scopeSupportFacets/scopeSupportFacets.types.ts @@ -43,8 +43,12 @@ export const scopeSupportFacets = [ "statement.foreach", "statement.while", "statement.doWhile", - "statement.variable", + "statement.variable.uninitialized", + "statement.variable.initialized", + "statement.variable.destructuring", + "statement.constant", "statement.assignment", + "statement.assignment.destructuring", "statement.return", "statement.yield", "statement.break", @@ -167,11 +171,13 @@ export const scopeSupportFacets = [ "condition.switchCase", "condition.switchCase.iteration", - "name.assignment", - "name.assignment.pattern", "name.command", - "name.variable", - "name.variable.pattern", + "name.variable.uninitialized", + "name.variable.initialized", + "name.variable.destructuring", + "name.constant", + "name.assignment", + "name.assignment.destructuring", "name.foreach", "name.function", "name.method", @@ -204,10 +210,11 @@ export const scopeSupportFacets = [ "key.mapPair", "key.mapPair.iteration", - "value.assignment", "value.command", "value.variable", - "value.variable.pattern", + "value.variable.destructuring", + "value.constant", + "value.assignment", "value.mapPair", "value.mapPair.iteration", "value.attribute", @@ -234,7 +241,9 @@ export const scopeSupportFacets = [ "value.iteration.enum", "value.iteration.document", - "type.variable", + "type.variable.uninitialized", + "type.variable.initialized", + "type.constant", "type.return", "type.field.class", "type.field.interface", diff --git a/packages/common/src/scopeSupportFacets/talon.ts b/packages/common/src/scopeSupportFacets/talon.ts index ee3385a8f8..9a48cba82b 100644 --- a/packages/common/src/scopeSupportFacets/talon.ts +++ b/packages/common/src/scopeSupportFacets/talon.ts @@ -18,12 +18,12 @@ export const talonScopeSupport: LanguageScopeSupportFacetMap = { "name.assignment": supported, "name.command": supported, - "name.variable": supported, + "name.variable.initialized": supported, "name.iteration.block": supported, "name.iteration.document": supported, "statement.command": supported, - "statement.variable": supported, + "statement.variable.initialized": supported, "statement.assignment": supported, "statement.iteration.block": supported, "statement.iteration.document": supported, @@ -263,10 +263,12 @@ export const talonScopeSupport: LanguageScopeSupportFacetMap = { "value.resource": notApplicable, "value.resource.iteration": notApplicable, - // Pattern destruction - "name.assignment.pattern": notApplicable, - "name.variable.pattern": notApplicable, - "value.variable.pattern": notApplicable, + // Pattern destructuring + "statement.variable.destructuring": notApplicable, + "statement.assignment.destructuring": notApplicable, + "name.assignment.destructuring": notApplicable, + "name.variable.destructuring": notApplicable, + "value.variable.destructuring": notApplicable, // Multiline string "string.multiLine": notApplicable, @@ -325,6 +327,25 @@ export const talonScopeSupport: LanguageScopeSupportFacetMap = { "statement.break": notApplicable, "statement.continue": notApplicable, + // Types + "type.variable.uninitialized": notApplicable, + "type.variable.initialized": notApplicable, + "type.cast": notApplicable, + "type.typeArgument": notApplicable, + "type.typeArgument.iteration": notApplicable, + "type.iteration.block": notApplicable, + "type.iteration.document": notApplicable, + + // Constant + "statement.constant": notApplicable, + "name.constant": notApplicable, + "value.constant": notApplicable, + "type.constant": notApplicable, + + // Uninitialized variables + "name.variable.uninitialized": notApplicable, + "statement.variable.uninitialized": notApplicable, + // Miscellaneous list: notApplicable, map: notApplicable, @@ -332,12 +353,6 @@ export const talonScopeSupport: LanguageScopeSupportFacetMap = { pairDelimiter: notApplicable, regularExpression: notApplicable, "statement.misc": notApplicable, - "type.variable": notApplicable, - "type.cast": notApplicable, - "type.typeArgument": notApplicable, - "type.typeArgument.iteration": notApplicable, - "type.iteration.block": notApplicable, - "type.iteration.document": notApplicable, selector: notApplicable, unit: notApplicable, disqualifyDelimiter: notApplicable, diff --git a/packages/common/src/scopeSupportFacets/talonList.ts b/packages/common/src/scopeSupportFacets/talonList.ts index bb6a7a8ab9..30696adfb1 100644 --- a/packages/common/src/scopeSupportFacets/talonList.ts +++ b/packages/common/src/scopeSupportFacets/talonList.ts @@ -4,10 +4,10 @@ import { ScopeSupportFacetLevel } from "./scopeSupportFacets.types"; const { supported, notApplicable } = ScopeSupportFacetLevel; export const talonListScopeSupport: LanguageScopeSupportFacetMap = { - "statement.variable": supported, + "statement.variable.initialized": supported, "statement.iteration.document": supported, - "name.variable": supported, + "name.variable.initialized": supported, "name.iteration.document": supported, "key.mapPair": supported, @@ -238,10 +238,12 @@ export const talonListScopeSupport: LanguageScopeSupportFacetMap = { "value.resource": notApplicable, "value.resource.iteration": notApplicable, - // Pattern destruction - "name.assignment.pattern": notApplicable, - "name.variable.pattern": notApplicable, - "value.variable.pattern": notApplicable, + // Pattern destructuring + "statement.variable.destructuring": notApplicable, + "statement.assignment.destructuring": notApplicable, + "name.assignment.destructuring": notApplicable, + "name.variable.destructuring": notApplicable, + "value.variable.destructuring": notApplicable, // String "string.multiLine": notApplicable, @@ -317,14 +319,27 @@ export const talonListScopeSupport: LanguageScopeSupportFacetMap = { "statement.break": notApplicable, "statement.continue": notApplicable, - // Miscellaneous - "statement.misc": notApplicable, + // Types "type.cast": notApplicable, "type.iteration.block": notApplicable, "type.iteration.document": notApplicable, "type.typeArgument.iteration": notApplicable, "type.typeArgument": notApplicable, - "type.variable": notApplicable, + "type.variable.uninitialized": notApplicable, + "type.variable.initialized": notApplicable, + + // Uninitialized variables + "statement.variable.uninitialized": notApplicable, + "name.variable.uninitialized": notApplicable, + + // Constant + "statement.constant": notApplicable, + "name.constant": notApplicable, + "value.constant": notApplicable, + "type.constant": notApplicable, + + // Miscellaneous + "statement.misc": notApplicable, disqualifyDelimiter: notApplicable, environment: notApplicable, fieldAccess: notApplicable, diff --git a/packages/common/src/scopeSupportFacets/typescript.ts b/packages/common/src/scopeSupportFacets/typescript.ts index 75cd78dc86..23b3a5e862 100644 --- a/packages/common/src/scopeSupportFacets/typescript.ts +++ b/packages/common/src/scopeSupportFacets/typescript.ts @@ -22,7 +22,9 @@ export const typescriptScopeSupport: LanguageScopeSupportFacetMap = { "type.interface": supported, "type.enum": supported, "type.return": supported, - "type.variable": supported, + "type.constant": supported, + "type.variable.uninitialized": supported, + "type.variable.initialized": supported, "type.typeArgument": supported, "type.typeArgument.iteration": supported, "type.iteration.block": supported, diff --git a/packages/common/src/scopeSupportFacets/xml.ts b/packages/common/src/scopeSupportFacets/xml.ts index e4bb0a0a93..e34a14dad8 100644 --- a/packages/common/src/scopeSupportFacets/xml.ts +++ b/packages/common/src/scopeSupportFacets/xml.ts @@ -21,16 +21,27 @@ export const xmlScopeSupport: LanguageScopeSupportFacetMap = { /* NOT APPLICABLE */ // Variable - "statement.variable": notApplicable, + "statement.variable.uninitialized": notApplicable, + "statement.variable.initialized": notApplicable, + "statement.variable.destructuring": notApplicable, "statement.assignment": notApplicable, + "statement.assignment.destructuring": notApplicable, "name.assignment": notApplicable, - "name.assignment.pattern": notApplicable, - "name.variable": notApplicable, - "name.variable.pattern": notApplicable, - "type.variable": notApplicable, + "name.assignment.destructuring": notApplicable, + "name.variable.uninitialized": notApplicable, + "name.variable.initialized": notApplicable, + "name.variable.destructuring": notApplicable, + "type.variable.uninitialized": notApplicable, + "type.variable.initialized": notApplicable, "value.assignment": notApplicable, "value.variable": notApplicable, - "value.variable.pattern": notApplicable, + "value.variable.destructuring": notApplicable, + + // Constant + "statement.constant": notApplicable, + "name.constant": notApplicable, + "value.constant": notApplicable, + "type.constant": notApplicable, // Class class: notApplicable, diff --git a/packages/common/src/scopeSupportFacets/yaml.ts b/packages/common/src/scopeSupportFacets/yaml.ts index 7687cc114b..89362390f3 100644 --- a/packages/common/src/scopeSupportFacets/yaml.ts +++ b/packages/common/src/scopeSupportFacets/yaml.ts @@ -29,20 +29,28 @@ export const yamlScopeSupport: LanguageScopeSupportFacetMap = { /* NOT APPLICABLE */ - // Single line unenclosed item - "collectionItem.unenclosed.singleLine": notApplicable, - // Variable - "statement.variable": notApplicable, + "statement.variable.uninitialized": notApplicable, + "statement.variable.initialized": notApplicable, + "statement.variable.destructuring": notApplicable, "statement.assignment": notApplicable, + "statement.assignment.destructuring": notApplicable, "name.assignment": notApplicable, - "name.assignment.pattern": notApplicable, - "name.variable": notApplicable, - "name.variable.pattern": notApplicable, - "type.variable": notApplicable, + "name.assignment.destructuring": notApplicable, + "name.variable.uninitialized": notApplicable, + "name.variable.initialized": notApplicable, + "name.variable.destructuring": notApplicable, + "type.variable.uninitialized": notApplicable, + "type.variable.initialized": notApplicable, "value.assignment": notApplicable, "value.variable": notApplicable, - "value.variable.pattern": notApplicable, + "value.variable.destructuring": notApplicable, + + // Constant + "statement.constant": notApplicable, + "name.constant": notApplicable, + "value.constant": notApplicable, + "type.constant": notApplicable, // Class class: notApplicable, @@ -328,6 +336,7 @@ export const yamlScopeSupport: LanguageScopeSupportFacetMap = { "type.iteration.document": notApplicable, "value.iteration.block": notApplicable, "value.iteration.document": notApplicable, + "collectionItem.unenclosed.singleLine": notApplicable, selector: notApplicable, unit: notApplicable, }; diff --git a/packages/cursorless-org-docs/src/docs/components/ScopeVisualizer.tsx b/packages/cursorless-org-docs/src/docs/components/ScopeVisualizer.tsx index 7fbcd0359b..a60f4e93e0 100644 --- a/packages/cursorless-org-docs/src/docs/components/ScopeVisualizer.tsx +++ b/packages/cursorless-org-docs/src/docs/components/ScopeVisualizer.tsx @@ -47,7 +47,9 @@ export function ScopeVisualizer({ languageId, scopeTypeType }: Props) { const [scopes] = useState( getScopeFixtures(scopeTests, languageId, scopeTypeType), ); - const [rangeType, setRangeType] = useState("content"); + const [rangeType, setRangeType] = useState( + scopeTypeType != null ? "blend" : "content", + ); const [renderWhitespace, setRenderWhitespace] = useState( scopeTypeType != null, ); diff --git a/queries/c.scm b/queries/c.scm index 5d18781451..e151706833 100644 --- a/queries/c.scm +++ b/queries/c.scm @@ -128,7 +128,7 @@ ;;! ^^^ ^ (enumerator name: (_) @name @value.leading.endOf - value: (_)? @value + value: (_)? @value @name.trailing.startOf ) @_.domain ;;!! void foo(); @@ -172,13 +172,14 @@ declarator: (_ !declarator ) @name -) @statement @name.domain + . +) @statement @name.domain @name.removal (field_declaration declarator: (_ declarator: (_) @name ) -) @statement @name.domain +) @statement @name.domain @name.removal (initializer_list) @list @@ -202,7 +203,7 @@ declarator: (_ !declarator ) @name -) @_.domain +) @_.domain @name.removal ;;!! aaa = 0; (_ diff --git a/queries/cpp.scm b/queries/cpp.scm index 86fea784a1..61b74fd73f 100644 --- a/queries/cpp.scm +++ b/queries/cpp.scm @@ -44,11 +44,12 @@ ) @_.domain ;;!! int aaa = 0; +;;! ^^^ ;;! ^ (field_declaration - declarator: (_) @_.leading.endOf - default_value: (_) @value -) @_.domain + declarator: (_) @name @_.leading.endOf + default_value: (_) @value @name.removal.end.startOf +) @_.domain @name.removal.start.startOf ;;!! []() {} ;;! ^^^^^^^ diff --git a/queries/csharp.scm b/queries/csharp.scm index 2f215d2b68..9c6bd30834 100644 --- a/queries/csharp.scm +++ b/queries/csharp.scm @@ -351,13 +351,13 @@ (variable_declaration type: (_) @type (variable_declarator - (identifier) @name @value.leading.endOf + (identifier) @name @value.leading.endOf @name.removal.end.endOf (equals_value_clause - (_) @value + (_) @value @name.removal.end.startOf )? ) ) -) @_.domain +) @_.domain @name.removal.start.startOf ;;!! aaa = "bbb"; ;;! ^^^ @@ -383,7 +383,7 @@ (_ name: (_) @name - (#not-parent-type? @name catch_declaration) + (#not-parent-type? @name catch_declaration enum_member_declaration) ) @_.domain ( @@ -412,8 +412,8 @@ ;;!! bar = 0 ;;! ^ (enum_member_declaration - name: (_) @value.leading.endOf - value: (_) @value + name: (_) @name @value.leading.endOf + value: (_) @value @name.trailing.startOf ) @_.domain ;; Dictionary values; diff --git a/queries/go.scm b/queries/go.scm index d8e003ead8..df358c9cf0 100644 --- a/queries/go.scm +++ b/queries/go.scm @@ -463,10 +463,10 @@ (var_declaration (var_spec name: (_) @name - type: (_) @type @value.leading.endOf - value: (_)? @value + type: (_) @type @value.leading.endOf @name.removal.end.endOf + value: (_)? @value @name.removal.end.startOf ) -) @_.domain +) @_.domain @name.removal.start.startOf ;;!! var foo = 0 ;;! ^^^ @@ -475,17 +475,40 @@ (var_spec name: (_) @name @value.leading.endOf !type - value: (_) @value + value: (_) @value @name.removal.end.startOf ) -) @_.domain +) @_.domain @name.removal.start.startOf + +;;!! const foo int = 0 +;;! ^^^ +;;! ^^^ +;;! ^ +(const_declaration + (const_spec + name: (_) @name + type: (_) @type @value.leading.endOf @name.removal.end.endOf + value: (_)? @value @name.removal.end.startOf + ) +) @_.domain @name.removal.start.startOf + +;;!! const foo = 0 +;;! ^^^ +;;! ^ +(const_declaration + (const_spec + name: (_) @name @value.leading.endOf + !type + value: (_) @value @name.removal.end.startOf + ) +) @_.domain @name.removal.start.startOf ;;!! foo := 0 ;;! ^^^ ;;! ^ (short_var_declaration left: (_) @name @value.leading.endOf - right: (_) @value -) @_.domain + right: (_) @value @name.removal.end.startOf +) @_.domain @name.removal.start.startOf ;;!! foo = 0 ;;! ^^^ diff --git a/queries/java.scm b/queries/java.scm index 3c0eb8fb38..96a6fff848 100644 --- a/queries/java.scm +++ b/queries/java.scm @@ -41,6 +41,7 @@ ;; Disabled on purpose. We have a better definition of this below. ;; (if_statement) ;; (enum_declaration) + ;; (local_variable_declaration) ] @statement ( @@ -335,13 +336,6 @@ ")" @type.iteration.end.startOf @name.iteration.end.startOf ) -;;!! List list = value; -;;! ^^^^^^^^^^^^ -;;! -------------------------- -(local_variable_declaration - type: (_) @type -) @_.domain - ;;!! name = new ArrayList(); ;;! ^^^^^^^^^^^^^^^^^ ;;! ----------------------- @@ -412,38 +406,42 @@ value: (_) @value ) @branch @_.domain -;;!! int value = 0; -;;! ^ -;;! xxxx -;;! -------------- +;;!! int foo = 0; +;;! ^^^ +;;! ^^^ +;;! ^ (local_variable_declaration + type: (_) @type (variable_declarator - name: (_) @name @value.leading.endOf - value: (_)? @value @name.trailing.startOf + name: (_) @name @value.leading.endOf @name.removal.end.endOf + value: (_)? @value @name.removal.end.startOf ) -) @_.domain +) @_.domain @name.removal.start.startOf -;;!! int value = 0; +;;!! int foo = 0; ;;! ^^^ -;;! ^^^^^ -;;! ^ +;;! ^^^ +;;! ^ (field_declaration type: (_) @type (variable_declarator - name: (_) @name @value.leading.endOf - value: (_)? @value @name.trailing.startOf + name: (_) @name @value.leading.endOf @name.removal.end.endOf + value: (_)? @value @name.removal.end.startOf ) -) @_.domain +) @_.domain @name.removal.start.startOf ;;!! int value; ;;! ^^^ ;;! ^^^^^ -(constant_declaration - type: (_) @type - (variable_declarator - name: (_) @name - ) -) @_.domain +(interface_body + (constant_declaration + type: (_) @type + (variable_declarator + name: (_) @name @name.removal.end.endOf @value.leading.endOf + value: (_)? @value @name.removal.end.startOf + ) + ) @_.domain @name.removal.start.startOf +) ;;!! int foo, bar; ;;! ^^^ ^^^ diff --git a/queries/javascript.core.scm b/queries/javascript.core.scm index 1d4a81e8a8..bdcdf139a0 100644 --- a/queries/javascript.core.scm +++ b/queries/javascript.core.scm @@ -89,6 +89,7 @@ field_definition generic_type property_signature + type_alias_declaration ) ) @@ -100,7 +101,7 @@ ;; We have a special case for this one. Note we don't need to list the other ;; special cases from above because they can't be exported - (#not-type? @_dummy variable_declarator) + (#not-type? @_dummy variable_declarator type_alias_declaration) ) @_.domain ;; Special cases for `(let | const | var) foo = ...;` because the full statement @@ -120,10 +121,16 @@ ;;! ------------------------ (lexical_declaration . - (variable_declarator - name: (_) @name @name.removal.end.endOf - value: (_)? @name.removal.end.startOf - ) + [ + (variable_declarator + name: (_) @name + value: (_) @name.removal.end.startOf + ) + (variable_declarator + name: (_) @name + !value + ) @name.removal.end.endOf + ] ) ;; name: @@ -140,10 +147,16 @@ ;; of https://github.com/tree-sitter/tree-sitter/issues/1442#issuecomment-1584628651 (variable_declaration . - (variable_declarator - name: (_) @name @name.removal.end.endOf - value: (_)? @name.removal.end.startOf - ) + [ + (variable_declarator + name: (_) @name + value: (_) @name.removal.end.startOf + ) + (variable_declarator + name: (_) @name + !value + ) @name.removal.end.endOf + ] ) ] @_.domain @name.removal.start.startOf (#not-parent-type? @_.domain export_statement) diff --git a/queries/javascript.scm b/queries/javascript.scm index 857c6c8b4a..cbc4109b8a 100644 --- a/queries/javascript.scm +++ b/queries/javascript.scm @@ -79,12 +79,12 @@ ) (_ - ;;!! foo = ...; - ;;! ^^^------- + ;;!! foo = 0; + ;;! ^^^ (field_definition - property: (_) @name @value.leading.endOf - value: (_)? @value @name.trailing.startOf - ) @statement.start @_.domain.start + property: (_) @name @name.removal.end.endOf @value.leading.endOf + value: (_)? @value @name.trailing.startOf @name.removal.end.startOf + ) @statement.start @_.domain.start @name.removal.start.startOf . ";"? @statement.end @_.domain.end ) diff --git a/queries/kotlin.scm b/queries/kotlin.scm index 7277364f1a..242c70b903 100644 --- a/queries/kotlin.scm +++ b/queries/kotlin.scm @@ -285,27 +285,17 @@ ;;! ^^^ ;;! ^ (property_declaration - (variable_declaration - (simple_identifier) @name @type.leading.endOf - (type_modifiers)? @type.start - [ - (user_type) - (function_type) - ] ? @type.end - ) @value.leading.endOf - ( - "=" - (_) @value - )? -) @_.domain - -;;!! val (foo: Int, bar: Int) = baz -;;! ^^^^^^^^^^^^^^^^^^ -;;! ^^^ -(property_declaration - (multi_variable_declaration) @name @value.leading.endOf - (_) @value -) @_.domain + [ + (variable_declaration + (simple_identifier) @name @type.leading.endOf + (type_modifiers)? @type.start + (_)? @type.end + . + ) + (multi_variable_declaration) @name + ] @value.leading.endOf @name.removal.end.endOf + (_)? @value @name.removal.end.startOf +) @_.domain @name.removal.start.startOf ;;!! foo = 0 ;;! ^^^ diff --git a/queries/lua.scm b/queries/lua.scm index 60ece77c99..80b022f9e5 100644 --- a/queries/lua.scm +++ b/queries/lua.scm @@ -13,6 +13,9 @@ (repeat_statement) (return_statement) (while_statement) + + ;; Disabled on purpose. We have a better definition of this below. + ;; (assignment_statement) ] @statement ;; Only treat function declarions and calls as statements if they @@ -25,14 +28,6 @@ (#not-parent-type? @statement expression_list) ) -;; Capture assignment only if without variable prefix -;;!! count = count + 1 -;;! ^^^^^^^^^^^^^^^^^ -( - (assignment_statement) @statement - (#not-parent-type? @statement variable_declaration) -) - ;; Document iteration scopes ( @@ -288,57 +283,43 @@ ;; Names and values -;; Handle variable assignments -;;!! a = 42 -;;! ^----- -;;! xxxx-- -( - (assignment_statement +;;!! local foo +;;! ^^^ +(_ + local_declaration: (variable_declaration (variable_list) @name - (_) @_.trailing.startOf - ) @_dummy @_.domain - (#not-parent-type? @_dummy variable_declaration) + ) @name.domain @name.removal ) -;; Handle variable declarations -;;!! local a = 42 -;;! ------^----- -;;! xxxxxxxxxx-- -local_declaration: (variable_declaration - (assignment_statement - (variable_list) @name - (_) @_.removal.end.startOf - ) -) @_.domain @_.removal.start.startOf -;; Handle assignment values -;;!! a = 42 -;;! ----^^ -;;! -xxxxx +;;!! foo = 0 +;;! ^^^ +;;! ^ ( (assignment_statement - (_) @_.leading.endOf - (expression_list) @value - ) @_dummy @_.domain - (#not-parent-type? @_dummy variable_declaration) + (variable_list) @name @value.leading.endOf + (_) @value @name.trailing.startOf + ) @statement @_.domain + (#not-parent-type? @statement variable_declaration) ) -;; Handle variable declaration values -;;!! local a = 42 -;;! ----------^^ -;;! -------xxxxx -local_declaration: (variable_declaration - (assignment_statement - (_) @_.leading.endOf - (expression_list) @value - ) -) @_.domain +;;!! local foo = 0 +;;! ^^^ +;;! ^ +(_ + local_declaration: (variable_declaration + (assignment_statement + (variable_list) @name @value.leading.endOf + (_) @value @name.removal.end.startOf + ) + ) @_.domain @name.removal.start.startOf +) ;;!! return a + b ;;! -------^^^^^ ;;! ------xxxxxx (return_statement (_) @value -) @_.domain +) @value.domain ;; match a ternary condition ;;!! local max = x > y and x or y diff --git a/queries/php.scm b/queries/php.scm index 455f40c669..e72f4fe7de 100644 --- a/queries/php.scm +++ b/queries/php.scm @@ -265,10 +265,12 @@ ;;! ^^^^^^ ;;! ^^^^^^ (property_declaration - type: (_)? @type + (_)? @name.removal.start.startOf + type: (_)? @type @name.removal.start.startOf (property_element - (variable_name) @name - ) + name: (_) @name @name.removal.end.endOf @value.leading.endOf + default_value: (_)? @value @name.removal.end.startOf + ) @name.removal.start.startOf ) @_.domain operator: [ diff --git a/queries/python.scm b/queries/python.scm index 0cedb62a25..178427524c 100644 --- a/queries/python.scm +++ b/queries/python.scm @@ -42,16 +42,24 @@ (block) @interior.end.endOf ) -;;!! a = 25 -;;! ^^ -;;! xxxxx -;;! ------ +;;!! foo = 0 +;;! ^^^ +;;! ^ (assignment - (_) @_.leading.endOf - . - right: (_) @value + left: (_) @name @value.leading.endOf + !type + right: (_)? @value @name.trailing.end.startOf ) @_.domain +;;!! foo: int = 0 +;;! ^^^ +;;! ^ +(assignment + left: (_) @name + type: (_) @name.removal.end.endOf @value.leading.endOf + right: (_)? @value @name.removal.end.startOf +) @_.domain @name.removal.start.startOf + ;; value: ;;!! a /= 25 ;;! ^^ @@ -67,19 +75,6 @@ right: (_) @value @name.trailing.startOf ) @_.domain -;;!! a = 25 -;;! ^ -;;! xxxx -;;! ------ -;;!! a: int = 25 -;;! ^ -;;! xxxxxxxxx -;;! ----------- -(assignment - left: (_) @name - right: (_)? @name.trailing.startOf -) @name.domain - ;;!! foo(aaa=1, bbb=2) ;;! ^^^ ^^^ (keyword_argument diff --git a/queries/rust.scm b/queries/rust.scm index 77b126aee3..f8b9c4acf5 100644 --- a/queries/rust.scm +++ b/queries/rust.scm @@ -207,7 +207,7 @@ (field_declaration name: (_) @name @type.leading.endOf type: (_) @type -) @statement @_.domain +) @statement @_.domain @name.removal ;;!! (t: &T, u: &U) ;;! ^ ^ @@ -263,7 +263,7 @@ (_) @_.trailing.startOf ) @_.domain -;;!! let Foo {aaa: 1, bbb: 2} +;;!! let Foo {aaa: 0, bbb: 1} ;;! ^^^ ^^^ ;;! ^ ^ (field_initializer @@ -271,7 +271,7 @@ value: (_) @value @collectionKey.trailing.startOf ) @_.domain -;;!! Foo {aaa: 1, bbb: 2} +;;!! Foo {aaa: 0, bbb: 1} ;;! ^^^ ^^^ ;;! ^ ^ (field_pattern @@ -279,45 +279,37 @@ pattern: (_) @value @collectionKey.trailing.startOf ) @_.domain -;;!! const foo: u8 = 2; +;;!! const foo: u8 = 0; ;;! ^ (const_item name: (_) @name @type.leading.endOf type: (_) @type @value.leading.endOf - value: (_) @value -) @_.domain + value: (_) @value @name.removal.end.startOf +) @_.domain @name.removal.start.startOf -;;!! let foo = 2; +;;!! let foo: i32 = 0; ;;! ^^^ -;;! ^ -(let_declaration - pattern: (_) @name @value.leading.start.endOf - . - value: (_) @value -) @_.domain - -;;!! let foo: u8 = 2; -;;! ^^^ -;;! ^ +;;! ^^^ +;;! ^ (let_declaration pattern: (_) @name @type.leading.endOf - type: (_) @type @value.leading.start.endOf - value: (_) @value -) @_.domain + type: (_) @type @value.leading.endOf @name.removal.end.endOf + value: (_)? @value @name.removal.end.startOf +) @_.domain @name.removal.start.startOf -;;!! let foo: u8; +;;!! let foo = 0; ;;! ^^^ ;;! ^ (let_declaration - pattern: (_) @name @type.leading.endOf - type: (_) @type - !value -) @_.domain + pattern: (_) @name @value.leading.endOf @name.removal.end.endOf + !type + value: (_)? @value @name.removal.end.startOf +) @_.domain @name.removal.start.startOf (expression_statement (assignment_expression - left: (_) @name @value.leading.start.endOf - right: (_) @value @name.trailing.start.startOf + left: (_) @name @value.leading.endOf + right: (_) @value @name.trailing.startOf ) ) @_.domain @@ -329,7 +321,7 @@ value: (_) @value ) @_.domain -;;!! return 2; +;;!! return 0; ;;! ^ (expression_statement (return_expression diff --git a/queries/scala.scm b/queries/scala.scm index 8afa69b232..c6338a9f1a 100644 --- a/queries/scala.scm +++ b/queries/scala.scm @@ -18,6 +18,7 @@ (do_while_expression) (for_expression) (try_expression) + (var_declaration) ;; Disabled on purpose. We have a better definition of this below. ;; (if_expression) @@ -184,20 +185,34 @@ (_ name: (_) @name ) @name.domain - (#not-type? @name.domain simple_enum_case full_enum_case) + (#not-type? @name.domain simple_enum_case full_enum_case var_declaration val_declaration) ) +;;!! var foo: Int +;;! ^^^ +(var_declaration + name: (_) @name +) @name.domain @name.removal + +;;!! val foo: Int +;;! ^^^ +(val_declaration + name: (_) @name +) @name.domain @name.removal + ;;!! var foo = 0 ;;! ^^^ (var_definition pattern: (_) @name -) @name.domain + value: (_) @name.removal.end.startOf +) @name.domain @name.removal.start.startOf ;;!! val foo = 0 ;;! ^^^ (val_definition pattern: (_) @name -) @name.domain + value: (_) @name.removal.end.startOf +) @name.domain @name.removal.start.startOf (enum_case_definitions [ diff --git a/queries/talon-list.scm b/queries/talon-list.scm index f0cd88fe40..a9a872cdf2 100644 --- a/queries/talon-list.scm +++ b/queries/talon-list.scm @@ -15,8 +15,8 @@ ;;! ^^^^^ (_ left: _ @name @value.leading.endOf - right: (_) @value -) @_.domain + right: (_) @value @name.removal.end.startOf +) @_.domain @name.removal.start.startOf ;;!! not mode: command ;;! ^^^^^^^^ diff --git a/queries/typescript.core.scm b/queries/typescript.core.scm index 02c8590100..4ac50c74fa 100644 --- a/queries/typescript.core.scm +++ b/queries/typescript.core.scm @@ -55,7 +55,7 @@ ;;! ^ ^ (enum_assignment name: (_) @name @value.leading.endOf - value: (_) @value + value: (_) @value @name.trailing.startOf ) @_.domain ;;!! function foo(aaa: number = 0) {} @@ -190,10 +190,10 @@ ;;!! (public | private | protected) foo = ...; ;;! ----------------------------------------- (public_field_definition - name: (_) @name @value.leading.endOf + name: (_) @name @name.removal.end.endOf @value.leading.endOf !type - value: (_)? @value @name.trailing.startOf - ) @_.domain.start + value: (_)? @value @name.trailing.startOf @name.removal.end.startOf + ) @_.domain.start @name.removal.start.startOf . ";"? @_.domain.end ) @@ -206,9 +206,9 @@ type: (_ ":" (_) @type - ) @value.leading.endOf - value: (_)? @value - ) @_.domain.start + ) @value.leading.endOf @name.removal.end.endOf + value: (_)? @value @name.removal.end.startOf + ) @_.domain.start @name.removal.start.startOf . ";"? @_.domain.end ) @@ -216,19 +216,19 @@ ;;!! type Foo = Bar; ( (type_alias_declaration - name: (_) @value.leading.endOf - value: (_) @value - ) @value.domain - (#not-parent-type? @value.domain export_statement) + name: (_) @name @value.leading.endOf + value: (_) @value @name.removal.end.startOf + ) @_.domain @name.removal.start.startOf + (#not-parent-type? @_.domain export_statement) ) ;;!! export type Foo = Bar; (export_statement (type_alias_declaration - name: (_) @value.leading.endOf - value: (_) @value + name: (_) @name @value.leading.endOf + value: (_) @value @name.removal.end.startOf ) -) @value.domain +) @_.domain @name.removal.start.startOf [ (interface_declaration) @@ -492,7 +492,7 @@ ":" (_) @type @collectionKey.trailing.startOf ) - ) @_.domain.start + ) @_.domain.start @name.removal . ";"? @_.domain.end )