diff --git a/data/fixtures/scopes/dart/anonymousFunction.scope b/data/fixtures/scopes/dart/anonymousFunction.scope new file mode 100644 index 0000000000..57c97f3077 --- /dev/null +++ b/data/fixtures/scopes/dart/anonymousFunction.scope @@ -0,0 +1,17 @@ +var foo = () {}; +--- + +[Content] = +[Domain] = 0:10-0:15 + >-----< +0| var foo = () {}; + +[Removal] = 0:9-0:15 + >------< +0| var foo = () {}; + +[Leading delimiter] = 0:9-0:10 + >-< +0| var foo = () {}; + +[Insertion delimiter] = "\n" diff --git a/data/fixtures/scopes/dart/anonymousFunction2.scope b/data/fixtures/scopes/dart/anonymousFunction2.scope new file mode 100644 index 0000000000..ba2afe0480 --- /dev/null +++ b/data/fixtures/scopes/dart/anonymousFunction2.scope @@ -0,0 +1,17 @@ +var foo = () => 0; +--- + +[Content] = +[Domain] = 0:10-0:17 + >-------< +0| var foo = () => 0; + +[Removal] = 0:9-0:17 + >--------< +0| var foo = () => 0; + +[Leading delimiter] = 0:9-0:10 + >-< +0| var foo = () => 0; + +[Insertion delimiter] = "\n" diff --git a/data/fixtures/scopes/dart/argument/argument.actual.constructor.iteration.scope b/data/fixtures/scopes/dart/argument/argument.actual.constructor.iteration.scope new file mode 100644 index 0000000000..1d3ee10058 --- /dev/null +++ b/data/fixtures/scopes/dart/argument/argument.actual.constructor.iteration.scope @@ -0,0 +1,10 @@ +var foo = Bar(aaa, bbb); +--- + +[Content] = 0:14-0:22 + >--------< +0| var foo = Bar(aaa, bbb); + +[Domain] = 0:10-0:23 + >-------------< +0| var foo = Bar(aaa, bbb); diff --git a/data/fixtures/scopes/dart/argument/argument.actual.constructor.multiLine.scope b/data/fixtures/scopes/dart/argument/argument.actual.constructor.multiLine.scope new file mode 100644 index 0000000000..a8133f576d --- /dev/null +++ b/data/fixtures/scopes/dart/argument/argument.actual.constructor.multiLine.scope @@ -0,0 +1,44 @@ +var foo = Bar( + aaa, + bbb +); +--- + +[#1 Content] = +[#1 Domain] = 1:8-1:11 + >---< +1| aaa, + +[#1 Removal] = 1:8-2:8 + >---- +1| aaa, +2| bbb + --------< + +[#1 Trailing delimiter] = 1:11-2:8 + >- +1| aaa, +2| bbb + --------< + +[#1 Insertion delimiter] = ",\n" + + +[#2 Content] = +[#2 Domain] = 2:8-2:11 + >---< +2| bbb + +[#2 Removal] = 1:11-2:11 + >- +1| aaa, +2| bbb + -----------< + +[#2 Leading delimiter] = 1:11-2:8 + >- +1| aaa, +2| bbb + --------< + +[#2 Insertion delimiter] = ",\n" diff --git a/data/fixtures/scopes/dart/argument/argument.actual.constructor.singleLine.scope b/data/fixtures/scopes/dart/argument/argument.actual.constructor.singleLine.scope new file mode 100644 index 0000000000..f84d1f507a --- /dev/null +++ b/data/fixtures/scopes/dart/argument/argument.actual.constructor.singleLine.scope @@ -0,0 +1,33 @@ +var foo = Bar(aaa, bbb); +--- + +[#1 Content] = +[#1 Domain] = 0:14-0:17 + >---< +0| var foo = Bar(aaa, bbb); + +[#1 Removal] = 0:14-0:19 + >-----< +0| var foo = Bar(aaa, bbb); + +[#1 Trailing delimiter] = 0:17-0:19 + >--< +0| var foo = Bar(aaa, bbb); + +[#1 Insertion delimiter] = ", " + + +[#2 Content] = +[#2 Domain] = 0:19-0:22 + >---< +0| var foo = Bar(aaa, bbb); + +[#2 Removal] = 0:17-0:22 + >-----< +0| var foo = Bar(aaa, bbb); + +[#2 Leading delimiter] = 0:17-0:19 + >--< +0| var foo = Bar(aaa, bbb); + +[#2 Insertion delimiter] = ", " diff --git a/data/fixtures/scopes/dart/argument/argument.actual.iteration.scope b/data/fixtures/scopes/dart/argument/argument.actual.iteration.scope new file mode 100644 index 0000000000..8284707cc5 --- /dev/null +++ b/data/fixtures/scopes/dart/argument/argument.actual.iteration.scope @@ -0,0 +1,10 @@ +var foo = bar(aaa, bbb); +--- + +[Content] = 0:14-0:22 + >--------< +0| var foo = bar(aaa, bbb); + +[Domain] = 0:10-0:23 + >-------------< +0| var foo = bar(aaa, bbb); diff --git a/data/fixtures/scopes/dart/argument/argument.actual.method.iteration.scope b/data/fixtures/scopes/dart/argument/argument.actual.method.iteration.scope new file mode 100644 index 0000000000..d60804b34b --- /dev/null +++ b/data/fixtures/scopes/dart/argument/argument.actual.method.iteration.scope @@ -0,0 +1,10 @@ +var foo = bar.baz(aaa, bbb); +--- + +[Content] = 0:18-0:26 + >--------< +0| var foo = bar.baz(aaa, bbb); + +[Domain] = 0:10-0:27 + >-----------------< +0| var foo = bar.baz(aaa, bbb); diff --git a/data/fixtures/scopes/dart/argument/argument.actual.method.multiLine.scope b/data/fixtures/scopes/dart/argument/argument.actual.method.multiLine.scope new file mode 100644 index 0000000000..a089e826f2 --- /dev/null +++ b/data/fixtures/scopes/dart/argument/argument.actual.method.multiLine.scope @@ -0,0 +1,44 @@ +var foo = bar.baz( + aaa, + bbb +); +--- + +[#1 Content] = +[#1 Domain] = 1:8-1:11 + >---< +1| aaa, + +[#1 Removal] = 1:8-2:8 + >---- +1| aaa, +2| bbb + --------< + +[#1 Trailing delimiter] = 1:11-2:8 + >- +1| aaa, +2| bbb + --------< + +[#1 Insertion delimiter] = ",\n" + + +[#2 Content] = +[#2 Domain] = 2:8-2:11 + >---< +2| bbb + +[#2 Removal] = 1:11-2:11 + >- +1| aaa, +2| bbb + -----------< + +[#2 Leading delimiter] = 1:11-2:8 + >- +1| aaa, +2| bbb + --------< + +[#2 Insertion delimiter] = ",\n" diff --git a/data/fixtures/scopes/dart/argument/argument.actual.method.singleLine.scope b/data/fixtures/scopes/dart/argument/argument.actual.method.singleLine.scope new file mode 100644 index 0000000000..4c9e75831c --- /dev/null +++ b/data/fixtures/scopes/dart/argument/argument.actual.method.singleLine.scope @@ -0,0 +1,33 @@ +var foo = bar.baz(aaa, bbb); +--- + +[#1 Content] = +[#1 Domain] = 0:18-0:21 + >---< +0| var foo = bar.baz(aaa, bbb); + +[#1 Removal] = 0:18-0:23 + >-----< +0| var foo = bar.baz(aaa, bbb); + +[#1 Trailing delimiter] = 0:21-0:23 + >--< +0| var foo = bar.baz(aaa, bbb); + +[#1 Insertion delimiter] = ", " + + +[#2 Content] = +[#2 Domain] = 0:23-0:26 + >---< +0| var foo = bar.baz(aaa, bbb); + +[#2 Removal] = 0:21-0:26 + >-----< +0| var foo = bar.baz(aaa, bbb); + +[#2 Leading delimiter] = 0:21-0:23 + >--< +0| var foo = bar.baz(aaa, bbb); + +[#2 Insertion delimiter] = ", " diff --git a/data/fixtures/scopes/dart/argument/argument.actual.multiLine.scope b/data/fixtures/scopes/dart/argument/argument.actual.multiLine.scope new file mode 100644 index 0000000000..b33f841ccd --- /dev/null +++ b/data/fixtures/scopes/dart/argument/argument.actual.multiLine.scope @@ -0,0 +1,44 @@ +var foo = bar( + aaa, + bbb +); +--- + +[#1 Content] = +[#1 Domain] = 1:8-1:11 + >---< +1| aaa, + +[#1 Removal] = 1:8-2:8 + >---- +1| aaa, +2| bbb + --------< + +[#1 Trailing delimiter] = 1:11-2:8 + >- +1| aaa, +2| bbb + --------< + +[#1 Insertion delimiter] = ",\n" + + +[#2 Content] = +[#2 Domain] = 2:8-2:11 + >---< +2| bbb + +[#2 Removal] = 1:11-2:11 + >- +1| aaa, +2| bbb + -----------< + +[#2 Leading delimiter] = 1:11-2:8 + >- +1| aaa, +2| bbb + --------< + +[#2 Insertion delimiter] = ",\n" diff --git a/data/fixtures/scopes/dart/argument/argument.actual.singleLine.scope b/data/fixtures/scopes/dart/argument/argument.actual.singleLine.scope new file mode 100644 index 0000000000..b362b10b33 --- /dev/null +++ b/data/fixtures/scopes/dart/argument/argument.actual.singleLine.scope @@ -0,0 +1,33 @@ +var foo = bar(aaa, bbb); +--- + +[#1 Content] = +[#1 Domain] = 0:14-0:17 + >---< +0| var foo = bar(aaa, bbb); + +[#1 Removal] = 0:14-0:19 + >-----< +0| var foo = bar(aaa, bbb); + +[#1 Trailing delimiter] = 0:17-0:19 + >--< +0| var foo = bar(aaa, bbb); + +[#1 Insertion delimiter] = ", " + + +[#2 Content] = +[#2 Domain] = 0:19-0:22 + >---< +0| var foo = bar(aaa, bbb); + +[#2 Removal] = 0:17-0:22 + >-----< +0| var foo = bar(aaa, bbb); + +[#2 Leading delimiter] = 0:17-0:19 + >--< +0| var foo = bar(aaa, bbb); + +[#2 Insertion delimiter] = ", " diff --git a/data/fixtures/scopes/dart/argument/argument.catch.scope b/data/fixtures/scopes/dart/argument/argument.catch.scope new file mode 100644 index 0000000000..e8fc3d0b57 --- /dev/null +++ b/data/fixtures/scopes/dart/argument/argument.catch.scope @@ -0,0 +1,36 @@ +void main() { + try {} + catch (e, s) {} +} +--- + +[#1 Content] = +[#1 Domain] = 2:11-2:12 + >-< +2| catch (e, s) {} + +[#1 Removal] = 2:11-2:14 + >---< +2| catch (e, s) {} + +[#1 Trailing delimiter] = 2:12-2:14 + >--< +2| catch (e, s) {} + +[#1 Insertion delimiter] = ", " + + +[#2 Content] = +[#2 Domain] = 2:14-2:15 + >-< +2| catch (e, s) {} + +[#2 Removal] = 2:12-2:15 + >---< +2| catch (e, s) {} + +[#2 Leading delimiter] = 2:12-2:14 + >--< +2| catch (e, s) {} + +[#2 Insertion delimiter] = ", " diff --git a/data/fixtures/scopes/dart/argument/argument.formal.constructor.iteration.scope b/data/fixtures/scopes/dart/argument/argument.formal.constructor.iteration.scope new file mode 100644 index 0000000000..dd095cb49c --- /dev/null +++ b/data/fixtures/scopes/dart/argument/argument.formal.constructor.iteration.scope @@ -0,0 +1,12 @@ +class Foo { + Foo(aaa, bbb) {} +} +--- + +[Content] = 1:12-1:20 + >--------< +1| Foo(aaa, bbb) {} + +[Domain] = 1:8-1:24 + >----------------< +1| Foo(aaa, bbb) {} diff --git a/data/fixtures/scopes/dart/argument/argument.formal.constructor.multiLine.scope b/data/fixtures/scopes/dart/argument/argument.formal.constructor.multiLine.scope new file mode 100644 index 0000000000..4af5ef6e55 --- /dev/null +++ b/data/fixtures/scopes/dart/argument/argument.formal.constructor.multiLine.scope @@ -0,0 +1,46 @@ +class Foo { + Foo( + aaa, + bbb + ) {} +} +--- + +[#1 Content] = +[#1 Domain] = 2:8-2:11 + >---< +2| aaa, + +[#1 Removal] = 2:8-3:8 + >---- +2| aaa, +3| bbb + --------< + +[#1 Trailing delimiter] = 2:11-3:8 + >- +2| aaa, +3| bbb + --------< + +[#1 Insertion delimiter] = ",\n" + + +[#2 Content] = +[#2 Domain] = 3:8-3:11 + >---< +3| bbb + +[#2 Removal] = 2:11-3:11 + >- +2| aaa, +3| bbb + -----------< + +[#2 Leading delimiter] = 2:11-3:8 + >- +2| aaa, +3| bbb + --------< + +[#2 Insertion delimiter] = ",\n" diff --git a/data/fixtures/scopes/dart/argument/argument.formal.constructor.singleLine.scope b/data/fixtures/scopes/dart/argument/argument.formal.constructor.singleLine.scope new file mode 100644 index 0000000000..b6541a3246 --- /dev/null +++ b/data/fixtures/scopes/dart/argument/argument.formal.constructor.singleLine.scope @@ -0,0 +1,35 @@ +class Foo { + Foo(aaa, bbb) {} +} +--- + +[#1 Content] = +[#1 Domain] = 1:8-1:11 + >---< +1| Foo(aaa, bbb) {} + +[#1 Removal] = 1:8-1:13 + >-----< +1| Foo(aaa, bbb) {} + +[#1 Trailing delimiter] = 1:11-1:13 + >--< +1| Foo(aaa, bbb) {} + +[#1 Insertion delimiter] = ", " + + +[#2 Content] = +[#2 Domain] = 1:13-1:16 + >---< +1| Foo(aaa, bbb) {} + +[#2 Removal] = 1:11-1:16 + >-----< +1| Foo(aaa, bbb) {} + +[#2 Leading delimiter] = 1:11-1:13 + >--< +1| Foo(aaa, bbb) {} + +[#2 Insertion delimiter] = ", " diff --git a/data/fixtures/scopes/dart/argument/argument.formal.iteration.scope b/data/fixtures/scopes/dart/argument/argument.formal.iteration.scope new file mode 100644 index 0000000000..d77a8814c2 --- /dev/null +++ b/data/fixtures/scopes/dart/argument/argument.formal.iteration.scope @@ -0,0 +1,10 @@ +void foo(aaa, bbb) {} +--- + +[Content] = 0:9-0:17 + >--------< +0| void foo(aaa, bbb) {} + +[Domain] = 0:0-0:21 + >---------------------< +0| void foo(aaa, bbb) {} diff --git a/data/fixtures/scopes/dart/argument/argument.formal.lambda.iteration.scope b/data/fixtures/scopes/dart/argument/argument.formal.lambda.iteration.scope new file mode 100644 index 0000000000..824b5665e7 --- /dev/null +++ b/data/fixtures/scopes/dart/argument/argument.formal.lambda.iteration.scope @@ -0,0 +1,12 @@ +void main() { + var foo = (aaa, bbb) {}; +} +--- + +[Content] = 1:15-1:23 + >--------< +1| var foo = (aaa, bbb) {}; + +[Domain] = 1:14-1:27 + >-------------< +1| var foo = (aaa, bbb) {}; diff --git a/data/fixtures/scopes/dart/argument/argument.formal.lambda.multiLine.scope b/data/fixtures/scopes/dart/argument/argument.formal.lambda.multiLine.scope new file mode 100644 index 0000000000..c5627dfc65 --- /dev/null +++ b/data/fixtures/scopes/dart/argument/argument.formal.lambda.multiLine.scope @@ -0,0 +1,47 @@ +void main() { + var foo = ( + aaa, + bbb + ) {}; + +} +--- + +[#1 Content] = +[#1 Domain] = 2:8-2:11 + >---< +2| aaa, + +[#1 Removal] = 2:8-3:8 + >---- +2| aaa, +3| bbb + --------< + +[#1 Trailing delimiter] = 2:11-3:8 + >- +2| aaa, +3| bbb + --------< + +[#1 Insertion delimiter] = ",\n" + + +[#2 Content] = +[#2 Domain] = 3:8-3:11 + >---< +3| bbb + +[#2 Removal] = 2:11-3:11 + >- +2| aaa, +3| bbb + -----------< + +[#2 Leading delimiter] = 2:11-3:8 + >- +2| aaa, +3| bbb + --------< + +[#2 Insertion delimiter] = ",\n" diff --git a/data/fixtures/scopes/dart/argument/argument.formal.lambda.singleLine.scope b/data/fixtures/scopes/dart/argument/argument.formal.lambda.singleLine.scope new file mode 100644 index 0000000000..16adfe5d7a --- /dev/null +++ b/data/fixtures/scopes/dart/argument/argument.formal.lambda.singleLine.scope @@ -0,0 +1,35 @@ +void main() { + var foo = (aaa, bbb) {}; +} +--- + +[#1 Content] = +[#1 Domain] = 1:15-1:18 + >---< +1| var foo = (aaa, bbb) {}; + +[#1 Removal] = 1:15-1:20 + >-----< +1| var foo = (aaa, bbb) {}; + +[#1 Trailing delimiter] = 1:18-1:20 + >--< +1| var foo = (aaa, bbb) {}; + +[#1 Insertion delimiter] = ", " + + +[#2 Content] = +[#2 Domain] = 1:20-1:23 + >---< +1| var foo = (aaa, bbb) {}; + +[#2 Removal] = 1:18-1:23 + >-----< +1| var foo = (aaa, bbb) {}; + +[#2 Leading delimiter] = 1:18-1:20 + >--< +1| var foo = (aaa, bbb) {}; + +[#2 Insertion delimiter] = ", " diff --git a/data/fixtures/scopes/dart/argument/argument.formal.method.iteration.scope b/data/fixtures/scopes/dart/argument/argument.formal.method.iteration.scope new file mode 100644 index 0000000000..71bcba801b --- /dev/null +++ b/data/fixtures/scopes/dart/argument/argument.formal.method.iteration.scope @@ -0,0 +1,12 @@ +class Foo { + void bar(aaa, bbb) {} +} +--- + +[Content] = 1:17-1:25 + >--------< +1| void bar(aaa, bbb) {} + +[Domain] = 1:8-1:29 + >---------------------< +1| void bar(aaa, bbb) {} diff --git a/data/fixtures/scopes/dart/argument/argument.formal.method.multiLine.scope b/data/fixtures/scopes/dart/argument/argument.formal.method.multiLine.scope new file mode 100644 index 0000000000..11fccfc74a --- /dev/null +++ b/data/fixtures/scopes/dart/argument/argument.formal.method.multiLine.scope @@ -0,0 +1,46 @@ +class Foo { + void bar( + aaa, + bbb + ) {} +} +--- + +[#1 Content] = +[#1 Domain] = 2:8-2:11 + >---< +2| aaa, + +[#1 Removal] = 2:8-3:8 + >---- +2| aaa, +3| bbb + --------< + +[#1 Trailing delimiter] = 2:11-3:8 + >- +2| aaa, +3| bbb + --------< + +[#1 Insertion delimiter] = ",\n" + + +[#2 Content] = +[#2 Domain] = 3:8-3:11 + >---< +3| bbb + +[#2 Removal] = 2:11-3:11 + >- +2| aaa, +3| bbb + -----------< + +[#2 Leading delimiter] = 2:11-3:8 + >- +2| aaa, +3| bbb + --------< + +[#2 Insertion delimiter] = ",\n" diff --git a/data/fixtures/scopes/dart/argument/argument.formal.method.singleLine.scope b/data/fixtures/scopes/dart/argument/argument.formal.method.singleLine.scope new file mode 100644 index 0000000000..08af2e3f0d --- /dev/null +++ b/data/fixtures/scopes/dart/argument/argument.formal.method.singleLine.scope @@ -0,0 +1,35 @@ +class Foo { + void bar(aaa, bbb) {} +} +--- + +[#1 Content] = +[#1 Domain] = 1:13-1:16 + >---< +1| void bar(aaa, bbb) {} + +[#1 Removal] = 1:13-1:18 + >-----< +1| void bar(aaa, bbb) {} + +[#1 Trailing delimiter] = 1:16-1:18 + >--< +1| void bar(aaa, bbb) {} + +[#1 Insertion delimiter] = ", " + + +[#2 Content] = +[#2 Domain] = 1:18-1:21 + >---< +1| void bar(aaa, bbb) {} + +[#2 Removal] = 1:16-1:21 + >-----< +1| void bar(aaa, bbb) {} + +[#2 Leading delimiter] = 1:16-1:18 + >--< +1| void bar(aaa, bbb) {} + +[#2 Insertion delimiter] = ", " diff --git a/data/fixtures/scopes/dart/argument/argument.formal.multiLine.scope b/data/fixtures/scopes/dart/argument/argument.formal.multiLine.scope new file mode 100644 index 0000000000..959eec95f5 --- /dev/null +++ b/data/fixtures/scopes/dart/argument/argument.formal.multiLine.scope @@ -0,0 +1,44 @@ +void foo( + aaa, + bbb +) {} +--- + +[#1 Content] = +[#1 Domain] = 1:4-1:7 + >---< +1| aaa, + +[#1 Removal] = 1:4-2:4 + >---- +1| aaa, +2| bbb + ----< + +[#1 Trailing delimiter] = 1:7-2:4 + >- +1| aaa, +2| bbb + ----< + +[#1 Insertion delimiter] = ",\n" + + +[#2 Content] = +[#2 Domain] = 2:4-2:7 + >---< +2| bbb + +[#2 Removal] = 1:7-2:7 + >- +1| aaa, +2| bbb + -------< + +[#2 Leading delimiter] = 1:7-2:4 + >- +1| aaa, +2| bbb + ----< + +[#2 Insertion delimiter] = ",\n" diff --git a/data/fixtures/scopes/dart/argument/argument.formal.singleLine.scope b/data/fixtures/scopes/dart/argument/argument.formal.singleLine.scope new file mode 100644 index 0000000000..36e4f037b4 --- /dev/null +++ b/data/fixtures/scopes/dart/argument/argument.formal.singleLine.scope @@ -0,0 +1,33 @@ +void foo(aaa, bbb) {} +--- + +[#1 Content] = +[#1 Domain] = 0:9-0:12 + >---< +0| void foo(aaa, bbb) {} + +[#1 Removal] = 0:9-0:14 + >-----< +0| void foo(aaa, bbb) {} + +[#1 Trailing delimiter] = 0:12-0:14 + >--< +0| void foo(aaa, bbb) {} + +[#1 Insertion delimiter] = ", " + + +[#2 Content] = +[#2 Domain] = 0:14-0:17 + >---< +0| void foo(aaa, bbb) {} + +[#2 Removal] = 0:12-0:17 + >-----< +0| void foo(aaa, bbb) {} + +[#2 Leading delimiter] = 0:12-0:14 + >--< +0| void foo(aaa, bbb) {} + +[#2 Insertion delimiter] = ", " diff --git a/data/fixtures/scopes/dart/argumentList/argumentList.actual.constructor.empty.scope b/data/fixtures/scopes/dart/argumentList/argumentList.actual.constructor.empty.scope new file mode 100644 index 0000000000..a90dabb1d1 --- /dev/null +++ b/data/fixtures/scopes/dart/argumentList/argumentList.actual.constructor.empty.scope @@ -0,0 +1,13 @@ +var foo = Bar(); +--- + +[Content] = +[Removal] = 0:14-0:14 + >< +0| var foo = Bar(); + +[Domain] = 0:10-0:15 + >-----< +0| var foo = Bar(); + +[Insertion delimiter] = "" diff --git a/data/fixtures/scopes/dart/argumentList/argumentList.actual.constructor.multiLine.scope b/data/fixtures/scopes/dart/argumentList/argumentList.actual.constructor.multiLine.scope new file mode 100644 index 0000000000..065cb9d8c7 --- /dev/null +++ b/data/fixtures/scopes/dart/argumentList/argumentList.actual.constructor.multiLine.scope @@ -0,0 +1,33 @@ +var foo = Bar( + aaa, + bbb +); +--- + +[Content] = 1:4-2:7 + >---- +1| aaa, +2| bbb + -------< + +[Removal] = 0:14-3:0 + > +0| var foo = Bar( +1| aaa, +2| bbb +3| ); + < + +[Leading delimiter] = 1:0-1:4 + >----< +1| aaa, + +[Domain] = 0:10-3:1 + >---- +0| var foo = Bar( +1| aaa, +2| bbb +3| ); + -< + +[Insertion delimiter] = ",\n" diff --git a/data/fixtures/scopes/dart/argumentList/argumentList.actual.constructor.singleLine.scope b/data/fixtures/scopes/dart/argumentList/argumentList.actual.constructor.singleLine.scope new file mode 100644 index 0000000000..b7dae559f7 --- /dev/null +++ b/data/fixtures/scopes/dart/argumentList/argumentList.actual.constructor.singleLine.scope @@ -0,0 +1,13 @@ +var foo = Bar(aaa, bbb); +--- + +[Content] = +[Removal] = 0:14-0:22 + >--------< +0| var foo = Bar(aaa, bbb); + +[Domain] = 0:10-0:23 + >-------------< +0| var foo = Bar(aaa, bbb); + +[Insertion delimiter] = ", " diff --git a/data/fixtures/scopes/dart/argumentList/argumentList.actual.empty.scope b/data/fixtures/scopes/dart/argumentList/argumentList.actual.empty.scope new file mode 100644 index 0000000000..42ffba4741 --- /dev/null +++ b/data/fixtures/scopes/dart/argumentList/argumentList.actual.empty.scope @@ -0,0 +1,13 @@ +var foo = bar(); +--- + +[Content] = +[Removal] = 0:14-0:14 + >< +0| var foo = bar(); + +[Domain] = 0:10-0:15 + >-----< +0| var foo = bar(); + +[Insertion delimiter] = "" diff --git a/data/fixtures/scopes/dart/argumentList/argumentList.actual.method.empty.scope b/data/fixtures/scopes/dart/argumentList/argumentList.actual.method.empty.scope new file mode 100644 index 0000000000..b345bd4b6c --- /dev/null +++ b/data/fixtures/scopes/dart/argumentList/argumentList.actual.method.empty.scope @@ -0,0 +1,13 @@ +var foo = bar.baz(); +--- + +[Content] = +[Removal] = 0:18-0:18 + >< +0| var foo = bar.baz(); + +[Domain] = 0:10-0:19 + >---------< +0| var foo = bar.baz(); + +[Insertion delimiter] = "" diff --git a/data/fixtures/scopes/dart/argumentList/argumentList.actual.method.multiLine.scope b/data/fixtures/scopes/dart/argumentList/argumentList.actual.method.multiLine.scope new file mode 100644 index 0000000000..ac6ef892fe --- /dev/null +++ b/data/fixtures/scopes/dart/argumentList/argumentList.actual.method.multiLine.scope @@ -0,0 +1,33 @@ +var foo = bar.baz( + aaa, + bbb +); +--- + +[Content] = 1:4-2:7 + >---- +1| aaa, +2| bbb + -------< + +[Removal] = 0:18-3:0 + > +0| var foo = bar.baz( +1| aaa, +2| bbb +3| ); + < + +[Leading delimiter] = 1:0-1:4 + >----< +1| aaa, + +[Domain] = 0:10-3:1 + >-------- +0| var foo = bar.baz( +1| aaa, +2| bbb +3| ); + -< + +[Insertion delimiter] = ",\n" diff --git a/data/fixtures/scopes/dart/argumentList/argumentList.actual.method.singleLine.scope b/data/fixtures/scopes/dart/argumentList/argumentList.actual.method.singleLine.scope new file mode 100644 index 0000000000..ad7c89111e --- /dev/null +++ b/data/fixtures/scopes/dart/argumentList/argumentList.actual.method.singleLine.scope @@ -0,0 +1,13 @@ +var foo = bar.baz(aaa, bbb); +--- + +[Content] = +[Removal] = 0:18-0:26 + >--------< +0| var foo = bar.baz(aaa, bbb); + +[Domain] = 0:10-0:27 + >-----------------< +0| var foo = bar.baz(aaa, bbb); + +[Insertion delimiter] = ", " diff --git a/data/fixtures/scopes/dart/argumentList/argumentList.actual.multiLine.scope b/data/fixtures/scopes/dart/argumentList/argumentList.actual.multiLine.scope new file mode 100644 index 0000000000..2f0992b947 --- /dev/null +++ b/data/fixtures/scopes/dart/argumentList/argumentList.actual.multiLine.scope @@ -0,0 +1,33 @@ +var foo = bar( + aaa, + bbb +); +--- + +[Content] = 1:4-2:7 + >---- +1| aaa, +2| bbb + -------< + +[Removal] = 0:14-3:0 + > +0| var foo = bar( +1| aaa, +2| bbb +3| ); + < + +[Leading delimiter] = 1:0-1:4 + >----< +1| aaa, + +[Domain] = 0:10-3:1 + >---- +0| var foo = bar( +1| aaa, +2| bbb +3| ); + -< + +[Insertion delimiter] = ",\n" diff --git a/data/fixtures/scopes/dart/argumentList/argumentList.actual.singleLine.scope b/data/fixtures/scopes/dart/argumentList/argumentList.actual.singleLine.scope new file mode 100644 index 0000000000..a717b1884d --- /dev/null +++ b/data/fixtures/scopes/dart/argumentList/argumentList.actual.singleLine.scope @@ -0,0 +1,13 @@ +var foo = bar(aaa, bbb); +--- + +[Content] = +[Removal] = 0:14-0:22 + >--------< +0| var foo = bar(aaa, bbb); + +[Domain] = 0:10-0:23 + >-------------< +0| var foo = bar(aaa, bbb); + +[Insertion delimiter] = ", " diff --git a/data/fixtures/scopes/dart/argumentList/argumentList.formal.constructor.empty.scope b/data/fixtures/scopes/dart/argumentList/argumentList.formal.constructor.empty.scope new file mode 100644 index 0000000000..99ce24e01a --- /dev/null +++ b/data/fixtures/scopes/dart/argumentList/argumentList.formal.constructor.empty.scope @@ -0,0 +1,15 @@ +class Foo { + Foo() {} +} +--- + +[Content] = +[Removal] = 1:8-1:8 + >< +1| Foo() {} + +[Domain] = 1:4-1:12 + >--------< +1| Foo() {} + +[Insertion delimiter] = "" diff --git a/data/fixtures/scopes/dart/argumentList/argumentList.formal.constructor.multiLine.scope b/data/fixtures/scopes/dart/argumentList/argumentList.formal.constructor.multiLine.scope new file mode 100644 index 0000000000..d1875c43c3 --- /dev/null +++ b/data/fixtures/scopes/dart/argumentList/argumentList.formal.constructor.multiLine.scope @@ -0,0 +1,35 @@ +class Foo { + Foo( + aaa, + bbb + ) {} +} +--- + +[Content] = 2:8-3:11 + >---- +2| aaa, +3| bbb + -----------< + +[Removal] = 1:8-4:4 + > +1| Foo( +2| aaa, +3| bbb +4| ) {} + ----< + +[Leading delimiter] = 2:0-2:8 + >--------< +2| aaa, + +[Domain] = 1:4-4:8 + >---- +1| Foo( +2| aaa, +3| bbb +4| ) {} + --------< + +[Insertion delimiter] = ",\n" diff --git a/data/fixtures/scopes/dart/argumentList/argumentList.formal.constructor.singleLine.scope b/data/fixtures/scopes/dart/argumentList/argumentList.formal.constructor.singleLine.scope new file mode 100644 index 0000000000..14a98ffa41 --- /dev/null +++ b/data/fixtures/scopes/dart/argumentList/argumentList.formal.constructor.singleLine.scope @@ -0,0 +1,15 @@ +class Foo { + Foo(aaa, bbb) {} +} +--- + +[Content] = +[Removal] = 1:8-1:16 + >--------< +1| Foo(aaa, bbb) {} + +[Domain] = 1:4-1:20 + >----------------< +1| Foo(aaa, bbb) {} + +[Insertion delimiter] = ", " diff --git a/data/fixtures/scopes/dart/argumentList/argumentList.formal.empty.scope b/data/fixtures/scopes/dart/argumentList/argumentList.formal.empty.scope new file mode 100644 index 0000000000..9d4dd443f0 --- /dev/null +++ b/data/fixtures/scopes/dart/argumentList/argumentList.formal.empty.scope @@ -0,0 +1,13 @@ +void foo() {} +--- + +[Content] = +[Removal] = 0:9-0:9 + >< +0| void foo() {} + +[Domain] = 0:0-0:13 + >-------------< +0| void foo() {} + +[Insertion delimiter] = "" diff --git a/data/fixtures/scopes/dart/argumentList/argumentList.formal.lambda.empty.scope b/data/fixtures/scopes/dart/argumentList/argumentList.formal.lambda.empty.scope new file mode 100644 index 0000000000..1b964ec4f9 --- /dev/null +++ b/data/fixtures/scopes/dart/argumentList/argumentList.formal.lambda.empty.scope @@ -0,0 +1,30 @@ +void main() { + var foo = () {}; +} +--- + +[#1 Content] = +[#1 Removal] = 0:10-0:10 + >< +0| void main() { + +[#1 Domain] = 0:0-2:1 + >------------- +0| void main() { +1| var foo = () {}; +2| } + -< + +[#1 Insertion delimiter] = "" + + +[#2 Content] = +[#2 Removal] = 1:15-1:15 + >< +1| var foo = () {}; + +[#2 Domain] = 1:14-1:19 + >-----< +1| var foo = () {}; + +[#2 Insertion delimiter] = "" diff --git a/data/fixtures/scopes/dart/argumentList/argumentList.formal.lambda.multiLine.scope b/data/fixtures/scopes/dart/argumentList/argumentList.formal.lambda.multiLine.scope new file mode 100644 index 0000000000..82b22d7e0d --- /dev/null +++ b/data/fixtures/scopes/dart/argumentList/argumentList.formal.lambda.multiLine.scope @@ -0,0 +1,53 @@ +void main() { + var foo = ( + aaa, + bbb + ) {}; +} +--- + +[#1 Content] = +[#1 Removal] = 0:10-0:10 + >< +0| void main() { + +[#1 Domain] = 0:0-5:1 + >------------- +0| void main() { +1| var foo = ( +2| aaa, +3| bbb +4| ) {}; +5| } + -< + +[#1 Insertion delimiter] = "" + + +[#2 Content] = 2:8-3:11 + >---- +2| aaa, +3| bbb + -----------< + +[#2 Removal] = 1:15-4:4 + > +1| var foo = ( +2| aaa, +3| bbb +4| ) {}; + ----< + +[#2 Leading delimiter] = 2:0-2:8 + >--------< +2| aaa, + +[#2 Domain] = 1:14-4:8 + >- +1| var foo = ( +2| aaa, +3| bbb +4| ) {}; + --------< + +[#2 Insertion delimiter] = ",\n" diff --git a/data/fixtures/scopes/dart/argumentList/argumentList.formal.lambda.singleLine.scope b/data/fixtures/scopes/dart/argumentList/argumentList.formal.lambda.singleLine.scope new file mode 100644 index 0000000000..39a3088704 --- /dev/null +++ b/data/fixtures/scopes/dart/argumentList/argumentList.formal.lambda.singleLine.scope @@ -0,0 +1,30 @@ +void main() { + var foo = (aaa, bbb) {}; +} +--- + +[#1 Content] = +[#1 Removal] = 0:10-0:10 + >< +0| void main() { + +[#1 Domain] = 0:0-2:1 + >------------- +0| void main() { +1| var foo = (aaa, bbb) {}; +2| } + -< + +[#1 Insertion delimiter] = "" + + +[#2 Content] = +[#2 Removal] = 1:15-1:23 + >--------< +1| var foo = (aaa, bbb) {}; + +[#2 Domain] = 1:14-1:27 + >-------------< +1| var foo = (aaa, bbb) {}; + +[#2 Insertion delimiter] = ", " diff --git a/data/fixtures/scopes/dart/argumentList/argumentList.formal.method.empty.scope b/data/fixtures/scopes/dart/argumentList/argumentList.formal.method.empty.scope new file mode 100644 index 0000000000..a9d9cfde55 --- /dev/null +++ b/data/fixtures/scopes/dart/argumentList/argumentList.formal.method.empty.scope @@ -0,0 +1,15 @@ +class Foo { + void bar() {} +} +--- + +[Content] = +[Removal] = 1:13-1:13 + >< +1| void bar() {} + +[Domain] = 1:4-1:17 + >-------------< +1| void bar() {} + +[Insertion delimiter] = "" diff --git a/data/fixtures/scopes/dart/argumentList/argumentList.formal.method.multiLine.scope b/data/fixtures/scopes/dart/argumentList/argumentList.formal.method.multiLine.scope new file mode 100644 index 0000000000..966b9cf8ab --- /dev/null +++ b/data/fixtures/scopes/dart/argumentList/argumentList.formal.method.multiLine.scope @@ -0,0 +1,35 @@ +class Foo { + void bar( + aaa, + bbb + ) {} +} +--- + +[Content] = 2:8-3:11 + >---- +2| aaa, +3| bbb + -----------< + +[Removal] = 1:13-4:4 + > +1| void bar( +2| aaa, +3| bbb +4| ) {} + ----< + +[Leading delimiter] = 2:0-2:8 + >--------< +2| aaa, + +[Domain] = 1:4-4:8 + >--------- +1| void bar( +2| aaa, +3| bbb +4| ) {} + --------< + +[Insertion delimiter] = ",\n" diff --git a/data/fixtures/scopes/dart/argumentList/argumentList.formal.method.singleLine.scope b/data/fixtures/scopes/dart/argumentList/argumentList.formal.method.singleLine.scope new file mode 100644 index 0000000000..45ad3311d8 --- /dev/null +++ b/data/fixtures/scopes/dart/argumentList/argumentList.formal.method.singleLine.scope @@ -0,0 +1,15 @@ +class Foo { + void bar(aaa, bbb) {} +} +--- + +[Content] = +[Removal] = 1:13-1:21 + >--------< +1| void bar(aaa, bbb) {} + +[Domain] = 1:4-1:25 + >---------------------< +1| void bar(aaa, bbb) {} + +[Insertion delimiter] = ", " diff --git a/data/fixtures/scopes/dart/argumentList/argumentList.formal.multiLine.scope b/data/fixtures/scopes/dart/argumentList/argumentList.formal.multiLine.scope new file mode 100644 index 0000000000..05885b233c --- /dev/null +++ b/data/fixtures/scopes/dart/argumentList/argumentList.formal.multiLine.scope @@ -0,0 +1,33 @@ +void foo( + aaa, + bbb +) {} +--- + +[Content] = 1:4-2:7 + >---- +1| aaa, +2| bbb + -------< + +[Removal] = 0:9-3:0 + > +0| void foo( +1| aaa, +2| bbb +3| ) {} + < + +[Leading delimiter] = 1:0-1:4 + >----< +1| aaa, + +[Domain] = 0:0-3:4 + >--------- +0| void foo( +1| aaa, +2| bbb +3| ) {} + ----< + +[Insertion delimiter] = ",\n" diff --git a/data/fixtures/scopes/dart/argumentList/argumentList.formal.singleLine.scope b/data/fixtures/scopes/dart/argumentList/argumentList.formal.singleLine.scope new file mode 100644 index 0000000000..165a51acda --- /dev/null +++ b/data/fixtures/scopes/dart/argumentList/argumentList.formal.singleLine.scope @@ -0,0 +1,13 @@ +void foo(aaa, bbb) {} +--- + +[Content] = +[Removal] = 0:9-0:17 + >--------< +0| void foo(aaa, bbb) {} + +[Domain] = 0:0-0:21 + >---------------------< +0| void foo(aaa, bbb) {} + +[Insertion delimiter] = ", " diff --git a/data/fixtures/scopes/dart/branch/branch.if.elif.else.scope b/data/fixtures/scopes/dart/branch/branch.if.elif.else.scope new file mode 100644 index 0000000000..c5a958ed19 --- /dev/null +++ b/data/fixtures/scopes/dart/branch/branch.if.elif.else.scope @@ -0,0 +1,59 @@ +void main() { + if (true) {} + else if (false) {} + else {} +} +--- + +[#1 Content] = +[#1 Domain] = 1:4-1:16 + >------------< +1| if (true) {} + +[#1 Removal] = 1:4-2:9 + >------------ +1| if (true) {} +2| else if (false) {} + ---------< + +[#1 Leading delimiter] = 1:0-1:4 + >----< +1| if (true) {} + +[#1 Insertion delimiter] = "\n" + + +[#2 Content] = +[#2 Domain] = 2:4-2:22 + >------------------< +2| else if (false) {} + +[#2 Removal] = 2:4-3:4 + >------------------ +2| else if (false) {} +3| else {} + ----< + +[#2 Leading delimiter] = 2:0-2:4 + >----< +2| else if (false) {} + +[#2 Insertion delimiter] = "\n" + + +[#3 Content] = +[#3 Domain] = 3:4-3:11 + >-------< +3| else {} + +[#3 Removal] = 3:0-4:0 + >----------- +3| else {} +4| } + < + +[#3 Leading delimiter] = 3:0-3:4 + >----< +3| else {} + +[#3 Insertion delimiter] = "\n" diff --git a/data/fixtures/scopes/dart/branch/branch.if.else.scope b/data/fixtures/scopes/dart/branch/branch.if.else.scope new file mode 100644 index 0000000000..cd74705076 --- /dev/null +++ b/data/fixtures/scopes/dart/branch/branch.if.else.scope @@ -0,0 +1,40 @@ +void main() { + if (true) {} + else {} +} +--- + +[#1 Content] = +[#1 Domain] = 1:4-1:16 + >------------< +1| if (true) {} + +[#1 Removal] = 1:4-2:4 + >------------ +1| if (true) {} +2| else {} + ----< + +[#1 Leading delimiter] = 1:0-1:4 + >----< +1| if (true) {} + +[#1 Insertion delimiter] = "\n" + + +[#2 Content] = +[#2 Domain] = 2:4-2:11 + >-------< +2| else {} + +[#2 Removal] = 2:0-3:0 + >----------- +2| else {} +3| } + < + +[#2 Leading delimiter] = 2:0-2:4 + >----< +2| else {} + +[#2 Insertion delimiter] = "\n" diff --git a/data/fixtures/scopes/dart/branch/branch.if.iteration.scope b/data/fixtures/scopes/dart/branch/branch.if.iteration.scope new file mode 100644 index 0000000000..9b9826c344 --- /dev/null +++ b/data/fixtures/scopes/dart/branch/branch.if.iteration.scope @@ -0,0 +1,14 @@ +void main() { + if (true) {} + else if (false) {} + else {} +} +--- + +[Content] = +[Domain] = 1:4-3:11 + >------------ +1| if (true) {} +2| else if (false) {} +3| else {} + -----------< diff --git a/data/fixtures/scopes/dart/branch/branch.if.scope b/data/fixtures/scopes/dart/branch/branch.if.scope new file mode 100644 index 0000000000..ed25feef07 --- /dev/null +++ b/data/fixtures/scopes/dart/branch/branch.if.scope @@ -0,0 +1,16 @@ +void main() { + if (true) {} +} +--- + +[Content] = +[Removal] = +[Domain] = 1:4-1:16 + >------------< +1| if (true) {} + +[Leading delimiter] = 1:0-1:4 + >----< +1| if (true) {} + +[Insertion delimiter] = "\n" diff --git a/data/fixtures/scopes/dart/branch/branch.switchCase.iteration.scope b/data/fixtures/scopes/dart/branch/branch.switchCase.iteration.scope new file mode 100644 index 0000000000..0dc65caa10 --- /dev/null +++ b/data/fixtures/scopes/dart/branch/branch.switchCase.iteration.scope @@ -0,0 +1,9 @@ +void main() { + switch (foo) { } +} +--- + +[Content] = +[Domain] = 1:18-1:19 + >-< +1| switch (foo) { } diff --git a/data/fixtures/scopes/dart/branch/branch.switchCase.scope b/data/fixtures/scopes/dart/branch/branch.switchCase.scope new file mode 100644 index 0000000000..413f68bc0e --- /dev/null +++ b/data/fixtures/scopes/dart/branch/branch.switchCase.scope @@ -0,0 +1,27 @@ +void main() { + switch (foo) { + case 0: + break; + } +} +--- + +[Content] = +[Domain] = 2:8-3:18 + >------- +2| case 0: +3| break; + ------------------< + +[Removal] = 2:0-4:0 + >--------------- +2| case 0: +3| break; +4| } + < + +[Leading delimiter] = 2:0-2:8 + >--------< +2| case 0: + +[Insertion delimiter] = "\n" diff --git a/data/fixtures/scopes/dart/branch/branch.switchCase2.scope b/data/fixtures/scopes/dart/branch/branch.switchCase2.scope new file mode 100644 index 0000000000..8250be9d93 --- /dev/null +++ b/data/fixtures/scopes/dart/branch/branch.switchCase2.scope @@ -0,0 +1,23 @@ +void main() { + switch (foo) { + default: {} + } +} +--- + +[Content] = +[Domain] = 2:8-2:19 + >-----------< +2| default: {} + +[Removal] = 2:0-3:0 + >------------------- +2| default: {} +3| } + < + +[Leading delimiter] = 2:0-2:8 + >--------< +2| default: {} + +[Insertion delimiter] = "\n" diff --git a/data/fixtures/scopes/dart/branch/branch.ternary.iteration.scope b/data/fixtures/scopes/dart/branch/branch.ternary.iteration.scope new file mode 100644 index 0000000000..f7db1a12c3 --- /dev/null +++ b/data/fixtures/scopes/dart/branch/branch.ternary.iteration.scope @@ -0,0 +1,9 @@ +void main() { + true ? 0 : 1; +} +--- + +[Content] = +[Domain] = 1:4-1:16 + >------------< +1| true ? 0 : 1; diff --git a/data/fixtures/scopes/dart/branch/branch.ternary.scope b/data/fixtures/scopes/dart/branch/branch.ternary.scope new file mode 100644 index 0000000000..d7d3751aed --- /dev/null +++ b/data/fixtures/scopes/dart/branch/branch.ternary.scope @@ -0,0 +1,39 @@ +void main() { + true ? 0 : 1; +} +--- + +[#1 Content] = +[#1 Domain] = 1:11-1:12 + >-< +1| true ? 0 : 1; + +[#1 Removal] = 1:11-1:13 + >--< +1| true ? 0 : 1; + +[#1 Leading delimiter] = 1:10-1:11 + >-< +1| true ? 0 : 1; + +[#1 Trailing delimiter] = 1:12-1:13 + >-< +1| true ? 0 : 1; + +[#1 Insertion delimiter] = "\n" + + +[#2 Content] = +[#2 Domain] = 1:15-1:16 + >-< +1| true ? 0 : 1; + +[#2 Removal] = 1:14-1:16 + >--< +1| true ? 0 : 1; + +[#2 Leading delimiter] = 1:14-1:15 + >-< +1| true ? 0 : 1; + +[#2 Insertion delimiter] = "\n" diff --git a/data/fixtures/scopes/dart/branch/branch.try.iteration.scope b/data/fixtures/scopes/dart/branch/branch.try.iteration.scope new file mode 100644 index 0000000000..5f591026e5 --- /dev/null +++ b/data/fixtures/scopes/dart/branch/branch.try.iteration.scope @@ -0,0 +1,14 @@ +void main() { + try {} + catch (e) {} + finally {} +} +--- + +[Content] = +[Domain] = 1:4-3:14 + >------ +1| try {} +2| catch (e) {} +3| finally {} + --------------< diff --git a/data/fixtures/scopes/dart/branch/branch.try.scope b/data/fixtures/scopes/dart/branch/branch.try.scope new file mode 100644 index 0000000000..8e005b2714 --- /dev/null +++ b/data/fixtures/scopes/dart/branch/branch.try.scope @@ -0,0 +1,59 @@ +void main() { + try {} + catch (e) {} + finally {} +} +--- + +[#1 Content] = +[#1 Domain] = 1:4-1:10 + >------< +1| try {} + +[#1 Removal] = 1:0-2:0 + >---------- +1| try {} +2| catch (e) {} + < + +[#1 Leading delimiter] = 1:0-1:4 + >----< +1| try {} + +[#1 Insertion delimiter] = "\n" + + +[#2 Content] = +[#2 Domain] = 2:4-2:16 + >------------< +2| catch (e) {} + +[#2 Removal] = 2:0-3:0 + >---------------- +2| catch (e) {} +3| finally {} + < + +[#2 Leading delimiter] = 2:0-2:4 + >----< +2| catch (e) {} + +[#2 Insertion delimiter] = "\n" + + +[#3 Content] = +[#3 Domain] = 3:4-3:14 + >----------< +3| finally {} + +[#3 Removal] = 3:0-4:0 + >-------------- +3| finally {} +4| } + < + +[#3 Leading delimiter] = 3:0-3:4 + >----< +3| finally {} + +[#3 Insertion delimiter] = "\n" diff --git a/data/fixtures/scopes/dart/class.iteration.document.scope b/data/fixtures/scopes/dart/class.iteration.document.scope new file mode 100644 index 0000000000..813bb62ea9 --- /dev/null +++ b/data/fixtures/scopes/dart/class.iteration.document.scope @@ -0,0 +1,12 @@ + +class Foo {} + +--- + +[Content] = +[Domain] = 0:0-2:0 + > +0| +1| class Foo {} +2| + < diff --git a/data/fixtures/scopes/dart/collectionItem.unenclosed.iteration.scope b/data/fixtures/scopes/dart/collectionItem.unenclosed.iteration.scope new file mode 100644 index 0000000000..d082914468 --- /dev/null +++ b/data/fixtures/scopes/dart/collectionItem.unenclosed.iteration.scope @@ -0,0 +1,10 @@ +var foo, bar; +--- + +[Content] = 0:4-0:12 + >--------< +0| var foo, bar; + +[Domain] = 0:0-0:13 + >-------------< +0| var foo, bar; diff --git a/data/fixtures/scopes/dart/collectionItem.unenclosed.multiLine.scope b/data/fixtures/scopes/dart/collectionItem.unenclosed.multiLine.scope new file mode 100644 index 0000000000..b70957c47e --- /dev/null +++ b/data/fixtures/scopes/dart/collectionItem.unenclosed.multiLine.scope @@ -0,0 +1,58 @@ +var foo, + bar; +--- + +[#1 Content] = +[#1 Domain] = 0:0-0:7 + >-------< +0| var foo, + +[#1 Removal] = 0:0-0:8 + >--------< +0| var foo, + +[#1 Trailing delimiter] = 0:7-0:8 + >-< +0| var foo, + +[#1 Insertion delimiter] = ", " + + +[#2 Content] = +[#2 Domain] = 0:4-0:7 + >---< +0| var foo, + +[#2 Removal] = 0:4-1:8 + >---- +0| var foo, +1| bar; + --------< + +[#2 Trailing delimiter] = 0:7-1:8 + >- +0| var foo, +1| bar; + --------< + +[#2 Insertion delimiter] = ",\n" + + +[#3 Content] = +[#3 Domain] = 1:8-1:11 + >---< +1| bar; + +[#3 Removal] = 0:7-1:11 + >- +0| var foo, +1| bar; + -----------< + +[#3 Leading delimiter] = 0:7-1:8 + >- +0| var foo, +1| bar; + --------< + +[#3 Insertion delimiter] = ",\n" diff --git a/data/fixtures/scopes/dart/collectionItem.unenclosed.singleLine.scope b/data/fixtures/scopes/dart/collectionItem.unenclosed.singleLine.scope new file mode 100644 index 0000000000..b69df55916 --- /dev/null +++ b/data/fixtures/scopes/dart/collectionItem.unenclosed.singleLine.scope @@ -0,0 +1,65 @@ +var foo, bar; +--- + +[#1 Content] = +[#1 Domain] = 0:0-0:7 + >-------< +0| var foo, bar; + +[#1 Removal] = 0:0-0:9 + >---------< +0| var foo, bar; + +[#1 Trailing delimiter] = 0:7-0:9 + >--< +0| var foo, bar; + +[#1 Insertion delimiter] = ", " + + +[#2 Content] = +[#2 Domain] = 0:4-0:7 + >---< +0| var foo, bar; + +[#2 Removal] = 0:4-0:9 + >-----< +0| var foo, bar; + +[#2 Trailing delimiter] = 0:7-0:9 + >--< +0| var foo, bar; + +[#2 Insertion delimiter] = ", " + + +[#3 Content] = +[#3 Domain] = 0:9-0:12 + >---< +0| var foo, bar; + +[#3 Removal] = 0:7-0:12 + >-----< +0| var foo, bar; + +[#3 Leading delimiter] = 0:7-0:9 + >--< +0| var foo, bar; + +[#3 Insertion delimiter] = ", " + + +[#4 Content] = +[#4 Domain] = 0:9-0:13 + >----< +0| var foo, bar; + +[#4 Removal] = 0:7-0:13 + >------< +0| var foo, bar; + +[#4 Leading delimiter] = 0:7-0:9 + >--< +0| var foo, bar; + +[#4 Insertion delimiter] = ", " diff --git a/data/fixtures/scopes/dart/comment.block.scope b/data/fixtures/scopes/dart/comment.block.scope new file mode 100644 index 0000000000..5e8b51111c --- /dev/null +++ b/data/fixtures/scopes/dart/comment.block.scope @@ -0,0 +1,10 @@ +/* Hello world */ +--- + +[Content] = +[Removal] = +[Domain] = 0:0-0:17 + >-----------------< +0| /* Hello world */ + +[Insertion delimiter] = "\n" diff --git a/data/fixtures/scopes/dart/comment.line.scope b/data/fixtures/scopes/dart/comment.line.scope new file mode 100644 index 0000000000..7d1477b8a1 --- /dev/null +++ b/data/fixtures/scopes/dart/comment.line.scope @@ -0,0 +1,10 @@ +// Hello world +--- + +[Content] = +[Removal] = +[Domain] = 0:0-0:14 + >--------------< +0| // Hello world + +[Insertion delimiter] = "\n" diff --git a/data/fixtures/scopes/dart/condition/condition.doWhile.scope b/data/fixtures/scopes/dart/condition/condition.doWhile.scope new file mode 100644 index 0000000000..e8acd57698 --- /dev/null +++ b/data/fixtures/scopes/dart/condition/condition.doWhile.scope @@ -0,0 +1,15 @@ +void main() { + do {} while (true); +} +--- + +[Content] = +[Removal] = 1:17-1:21 + >----< +1| do {} while (true); + +[Domain] = 1:4-1:23 + >-------------------< +1| do {} while (true); + +[Insertion delimiter] = " " diff --git a/data/fixtures/scopes/dart/condition/condition.for.scope b/data/fixtures/scopes/dart/condition/condition.for.scope new file mode 100644 index 0000000000..6a97afe44f --- /dev/null +++ b/data/fixtures/scopes/dart/condition/condition.for.scope @@ -0,0 +1,22 @@ +void main() { + for (var i = 0; i < size; i++) {} +} +--- + +[Content] = 1:20-1:28 + >--------< +1| for (var i = 0; i < size; i++) {} + +[Removal] = 1:19-1:28 + >---------< +1| for (var i = 0; i < size; i++) {} + +[Leading delimiter] = 1:19-1:20 + >-< +1| for (var i = 0; i < size; i++) {} + +[Domain] = 1:4-1:37 + >---------------------------------< +1| for (var i = 0; i < size; i++) {} + +[Insertion delimiter] = " " diff --git a/data/fixtures/scopes/dart/condition/condition.if.scope b/data/fixtures/scopes/dart/condition/condition.if.scope new file mode 100644 index 0000000000..c7d2ec769c --- /dev/null +++ b/data/fixtures/scopes/dart/condition/condition.if.scope @@ -0,0 +1,32 @@ +void main() { + if (true) {} + else if (false) {} + else {} +} +--- + +[#1 Content] = +[#1 Removal] = 1:8-1:12 + >----< +1| if (true) {} + +[#1 Domain] = 1:4-3:11 + >------------ +1| if (true) {} +2| else if (false) {} +3| else {} + -----------< + +[#1 Insertion delimiter] = " " + + +[#2 Content] = +[#2 Removal] = 2:13-2:18 + >-----< +2| else if (false) {} + +[#2 Domain] = 2:4-2:22 + >------------------< +2| else if (false) {} + +[#2 Insertion delimiter] = " " diff --git a/data/fixtures/scopes/dart/condition/condition.switchCase.iteration.scope b/data/fixtures/scopes/dart/condition/condition.switchCase.iteration.scope new file mode 100644 index 0000000000..0dc65caa10 --- /dev/null +++ b/data/fixtures/scopes/dart/condition/condition.switchCase.iteration.scope @@ -0,0 +1,9 @@ +void main() { + switch (foo) { } +} +--- + +[Content] = +[Domain] = 1:18-1:19 + >-< +1| switch (foo) { } diff --git a/data/fixtures/scopes/dart/condition/condition.switchCase.scope b/data/fixtures/scopes/dart/condition/condition.switchCase.scope new file mode 100644 index 0000000000..f661838de8 --- /dev/null +++ b/data/fixtures/scopes/dart/condition/condition.switchCase.scope @@ -0,0 +1,24 @@ +void main() { + switch (foo) { + case 0: break; + } +} +--- + +[Content] = 2:13-2:14 + >-< +2| case 0: break; + +[Removal] = 2:12-2:14 + >--< +2| case 0: break; + +[Leading delimiter] = 2:12-2:13 + >-< +2| case 0: break; + +[Domain] = 2:8-2:22 + >--------------< +2| case 0: break; + +[Insertion delimiter] = " " diff --git a/data/fixtures/scopes/dart/condition/condition.ternary.scope b/data/fixtures/scopes/dart/condition/condition.ternary.scope new file mode 100644 index 0000000000..661043b1b9 --- /dev/null +++ b/data/fixtures/scopes/dart/condition/condition.ternary.scope @@ -0,0 +1,26 @@ +void main() { + true ? 0 : 1; +} +--- + +[Content] = 1:4-1:8 + >----< +1| true ? 0 : 1; + +[Removal] = 1:4-1:9 + >-----< +1| true ? 0 : 1; + +[Leading delimiter] = 1:0-1:4 + >----< +1| true ? 0 : 1; + +[Trailing delimiter] = 1:8-1:9 + >-< +1| true ? 0 : 1; + +[Domain] = 1:4-1:16 + >------------< +1| true ? 0 : 1; + +[Insertion delimiter] = " " diff --git a/data/fixtures/scopes/dart/condition/condition.while.scope b/data/fixtures/scopes/dart/condition/condition.while.scope new file mode 100644 index 0000000000..c8f2ddd08d --- /dev/null +++ b/data/fixtures/scopes/dart/condition/condition.while.scope @@ -0,0 +1,15 @@ +void main() { + while (true) {} +} +--- + +[Content] = +[Removal] = 1:11-1:15 + >----< +1| while (true) {} + +[Domain] = 1:4-1:19 + >---------------< +1| while (true) {} + +[Insertion delimiter] = " " diff --git a/data/fixtures/scopes/dart/disqualifyDelimiter.scope b/data/fixtures/scopes/dart/disqualifyDelimiter.scope new file mode 100644 index 0000000000..45065e8d65 --- /dev/null +++ b/data/fixtures/scopes/dart/disqualifyDelimiter.scope @@ -0,0 +1,64 @@ +void main() { + 1 < 2; + 1 > 2; + 1 <= 2; + 1 >= 2; + a << 2; + a >> 2; + a <<= 2; + a >>= 2; + a >>> 2; + a >>>= 2; + () => 2; +} +class Foo { + int get bar => 0; +} +--- +[#1 Content] = 1:6-1:7 + >-< +1| 1 < 2; + +[#2 Content] = 2:6-2:7 + >-< +2| 1 > 2; + +[#3 Content] = 3:6-3:8 + >--< +3| 1 <= 2; + +[#4 Content] = 4:6-4:8 + >--< +4| 1 >= 2; + +[#5 Content] = 5:6-5:8 + >--< +5| a << 2; + +[#6 Content] = 6:6-6:8 + >--< +6| a >> 2; + +[#7 Content] = 7:6-7:9 + >---< +7| a <<= 2; + +[#8 Content] = 8:6-8:9 + >---< +8| a >>= 2; + +[#9 Content] = 9:6-9:9 + >---< +9| a >>> 2; + +[#10 Content] = 10:6-10:10 + >----< +10| a >>>= 2; + +[#11 Content] = 11:7-11:9 + >--< +11| () => 2; + +[#12 Content] = 14:16-14:18 + >--< +14| int get bar => 0; diff --git a/data/fixtures/scopes/dart/functionCall/functionCall.chain.scope b/data/fixtures/scopes/dart/functionCall/functionCall.chain.scope new file mode 100644 index 0000000000..6c5b9258a6 --- /dev/null +++ b/data/fixtures/scopes/dart/functionCall/functionCall.chain.scope @@ -0,0 +1,30 @@ +var foo = bar().baz(); +--- + +[#1 Content] = +[#1 Removal] = +[#1 Domain] = 0:10-0:15 + >-----< +0| var foo = bar().baz(); + +[#1 Leading delimiter] = 0:9-0:10 + >-< +0| var foo = bar().baz(); + +[#1 Insertion delimiter] = " " + + +[#2 Content] = +[#2 Domain] = 0:10-0:21 + >-----------< +0| var foo = bar().baz(); + +[#2 Removal] = 0:9-0:21 + >------------< +0| var foo = bar().baz(); + +[#2 Leading delimiter] = 0:9-0:10 + >-< +0| var foo = bar().baz(); + +[#2 Insertion delimiter] = " " diff --git a/data/fixtures/scopes/dart/functionCall/functionCall.constructor.scope b/data/fixtures/scopes/dart/functionCall/functionCall.constructor.scope new file mode 100644 index 0000000000..a850e8434e --- /dev/null +++ b/data/fixtures/scopes/dart/functionCall/functionCall.constructor.scope @@ -0,0 +1,17 @@ +var foo = Bar(); +--- + +[Content] = +[Domain] = 0:10-0:15 + >-----< +0| var foo = Bar(); + +[Removal] = 0:9-0:15 + >------< +0| var foo = Bar(); + +[Leading delimiter] = 0:9-0:10 + >-< +0| var foo = Bar(); + +[Insertion delimiter] = " " diff --git a/data/fixtures/scopes/dart/functionCall/functionCall.enum.scope b/data/fixtures/scopes/dart/functionCall/functionCall.enum.scope new file mode 100644 index 0000000000..c64c6f6094 --- /dev/null +++ b/data/fixtures/scopes/dart/functionCall/functionCall.enum.scope @@ -0,0 +1,19 @@ +enum Foo { + bar(); +} +--- + +[Content] = +[Domain] = 1:4-1:9 + >-----< +1| bar(); + +[Removal] = 1:0-1:9 + >---------< +1| bar(); + +[Leading delimiter] = 1:0-1:4 + >----< +1| bar(); + +[Insertion delimiter] = " " diff --git a/data/fixtures/scopes/dart/functionCall/functionCall.generic.scope b/data/fixtures/scopes/dart/functionCall/functionCall.generic.scope new file mode 100644 index 0000000000..eeee4d6fab --- /dev/null +++ b/data/fixtures/scopes/dart/functionCall/functionCall.generic.scope @@ -0,0 +1,17 @@ +var foo = bar(); +--- + +[Content] = +[Domain] = 0:10-0:20 + >----------< +0| var foo = bar(); + +[Removal] = 0:9-0:20 + >-----------< +0| var foo = bar(); + +[Leading delimiter] = 0:9-0:10 + >-< +0| var foo = bar(); + +[Insertion delimiter] = " " diff --git a/data/fixtures/scopes/dart/functionCall/functionCall.method.scope b/data/fixtures/scopes/dart/functionCall/functionCall.method.scope new file mode 100644 index 0000000000..3b26f52406 --- /dev/null +++ b/data/fixtures/scopes/dart/functionCall/functionCall.method.scope @@ -0,0 +1,17 @@ +var foo = bar.baz(); +--- + +[Content] = +[Domain] = 0:10-0:19 + >---------< +0| var foo = bar.baz(); + +[Removal] = 0:9-0:19 + >----------< +0| var foo = bar.baz(); + +[Leading delimiter] = 0:9-0:10 + >-< +0| var foo = bar.baz(); + +[Insertion delimiter] = " " diff --git a/data/fixtures/scopes/dart/functionCall/functionCall.scope b/data/fixtures/scopes/dart/functionCall/functionCall.scope new file mode 100644 index 0000000000..89db2bf9d8 --- /dev/null +++ b/data/fixtures/scopes/dart/functionCall/functionCall.scope @@ -0,0 +1,17 @@ +var foo = bar(); +--- + +[Content] = +[Domain] = 0:10-0:15 + >-----< +0| var foo = bar(); + +[Removal] = 0:9-0:15 + >------< +0| var foo = bar(); + +[Leading delimiter] = 0:9-0:10 + >-< +0| var foo = bar(); + +[Insertion delimiter] = " " diff --git a/data/fixtures/scopes/dart/functionCallee/functionCallee.chain.scope b/data/fixtures/scopes/dart/functionCallee/functionCallee.chain.scope new file mode 100644 index 0000000000..3194cfc4d6 --- /dev/null +++ b/data/fixtures/scopes/dart/functionCallee/functionCallee.chain.scope @@ -0,0 +1,33 @@ +var foo = bar().baz(); +--- + +[#1 Content] = +[#1 Removal] = 0:10-0:13 + >---< +0| var foo = bar().baz(); + +[#1 Leading delimiter] = 0:9-0:10 + >-< +0| var foo = bar().baz(); + +[#1 Domain] = 0:10-0:15 + >-----< +0| var foo = bar().baz(); + +[#1 Insertion delimiter] = " " + + +[#2 Content] = +[#2 Removal] = 0:10-0:19 + >---------< +0| var foo = bar().baz(); + +[#2 Leading delimiter] = 0:9-0:10 + >-< +0| var foo = bar().baz(); + +[#2 Domain] = 0:10-0:21 + >-----------< +0| var foo = bar().baz(); + +[#2 Insertion delimiter] = " " diff --git a/data/fixtures/scopes/dart/functionCallee/functionCallee.constructor.scope b/data/fixtures/scopes/dart/functionCallee/functionCallee.constructor.scope new file mode 100644 index 0000000000..73732d318c --- /dev/null +++ b/data/fixtures/scopes/dart/functionCallee/functionCallee.constructor.scope @@ -0,0 +1,17 @@ +var foo = Bar(); +--- + +[Content] = +[Removal] = 0:10-0:13 + >---< +0| var foo = Bar(); + +[Leading delimiter] = 0:9-0:10 + >-< +0| var foo = Bar(); + +[Domain] = 0:10-0:15 + >-----< +0| var foo = Bar(); + +[Insertion delimiter] = " " diff --git a/data/fixtures/scopes/dart/functionCallee/functionCallee.enum.scope b/data/fixtures/scopes/dart/functionCallee/functionCallee.enum.scope new file mode 100644 index 0000000000..332b38850a --- /dev/null +++ b/data/fixtures/scopes/dart/functionCallee/functionCallee.enum.scope @@ -0,0 +1,19 @@ +enum Foo { + bar(); +} +--- + +[Content] = +[Removal] = 1:4-1:7 + >---< +1| bar(); + +[Leading delimiter] = 1:0-1:4 + >----< +1| bar(); + +[Domain] = 1:4-1:9 + >-----< +1| bar(); + +[Insertion delimiter] = " " diff --git a/data/fixtures/scopes/dart/functionCallee/functionCallee.generic.scope b/data/fixtures/scopes/dart/functionCallee/functionCallee.generic.scope new file mode 100644 index 0000000000..c8c2403ce1 --- /dev/null +++ b/data/fixtures/scopes/dart/functionCallee/functionCallee.generic.scope @@ -0,0 +1,17 @@ +var foo = bar(); +--- + +[Content] = +[Removal] = 0:10-0:18 + >--------< +0| var foo = bar(); + +[Leading delimiter] = 0:9-0:10 + >-< +0| var foo = bar(); + +[Domain] = 0:10-0:20 + >----------< +0| var foo = bar(); + +[Insertion delimiter] = " " diff --git a/data/fixtures/scopes/dart/functionCallee/functionCallee.method.scope b/data/fixtures/scopes/dart/functionCallee/functionCallee.method.scope new file mode 100644 index 0000000000..673d15d2e8 --- /dev/null +++ b/data/fixtures/scopes/dart/functionCallee/functionCallee.method.scope @@ -0,0 +1,17 @@ +var foo = bar.baz(); +--- + +[Content] = +[Removal] = 0:10-0:17 + >-------< +0| var foo = bar.baz(); + +[Leading delimiter] = 0:9-0:10 + >-< +0| var foo = bar.baz(); + +[Domain] = 0:10-0:19 + >---------< +0| var foo = bar.baz(); + +[Insertion delimiter] = " " diff --git a/data/fixtures/scopes/dart/functionCallee/functionCallee.scope b/data/fixtures/scopes/dart/functionCallee/functionCallee.scope new file mode 100644 index 0000000000..2b4e432f01 --- /dev/null +++ b/data/fixtures/scopes/dart/functionCallee/functionCallee.scope @@ -0,0 +1,17 @@ +var foo = bar(); +--- + +[Content] = +[Removal] = 0:10-0:13 + >---< +0| var foo = bar(); + +[Leading delimiter] = 0:9-0:10 + >-< +0| var foo = bar(); + +[Domain] = 0:10-0:15 + >-----< +0| var foo = bar(); + +[Insertion delimiter] = " " diff --git a/data/fixtures/scopes/dart/interior/interior.class.scope b/data/fixtures/scopes/dart/interior/interior.class.scope new file mode 100644 index 0000000000..13ef2f4d94 --- /dev/null +++ b/data/fixtures/scopes/dart/interior/interior.class.scope @@ -0,0 +1,10 @@ +class Foo { } +--- + +[Content] = +[Removal] = +[Domain] = 0:11-0:12 + >-< +0| class Foo { } + +[Insertion delimiter] = " " diff --git a/data/fixtures/scopes/dart/interior/interior.constructor.scope b/data/fixtures/scopes/dart/interior/interior.constructor.scope new file mode 100644 index 0000000000..3c0f1442bc --- /dev/null +++ b/data/fixtures/scopes/dart/interior/interior.constructor.scope @@ -0,0 +1,27 @@ +class Foo { + Foo() { } +} +--- + +[#1 Content] = 1:4-1:13 + >---------< +1| Foo() { } + +[#1 Removal] = +[#1 Domain] = 0:11-2:0 + > +0| class Foo { +1| Foo() { } +2| } + < + +[#1 Insertion delimiter] = " " + + +[#2 Content] = +[#2 Removal] = +[#2 Domain] = 1:11-1:12 + >-< +1| Foo() { } + +[#2 Insertion delimiter] = " " diff --git a/data/fixtures/scopes/dart/interior/interior.doWhile.scope b/data/fixtures/scopes/dart/interior/interior.doWhile.scope new file mode 100644 index 0000000000..e41339863b --- /dev/null +++ b/data/fixtures/scopes/dart/interior/interior.doWhile.scope @@ -0,0 +1,27 @@ +void main() { + do { } while (true); +} +--- + +[#1 Content] = 1:4-1:24 + >--------------------< +1| do { } while (true); + +[#1 Removal] = +[#1 Domain] = 0:13-2:0 + > +0| void main() { +1| do { } while (true); +2| } + < + +[#1 Insertion delimiter] = " " + + +[#2 Content] = +[#2 Removal] = +[#2 Domain] = 1:8-1:9 + >-< +1| do { } while (true); + +[#2 Insertion delimiter] = " " diff --git a/data/fixtures/scopes/dart/interior/interior.enum.scope b/data/fixtures/scopes/dart/interior/interior.enum.scope new file mode 100644 index 0000000000..d96875b078 --- /dev/null +++ b/data/fixtures/scopes/dart/interior/interior.enum.scope @@ -0,0 +1,10 @@ +enum Foo { } +--- + +[Content] = +[Removal] = +[Domain] = 0:10-0:11 + >-< +0| enum Foo { } + +[Insertion delimiter] = " " diff --git a/data/fixtures/scopes/dart/interior/interior.for.scope b/data/fixtures/scopes/dart/interior/interior.for.scope new file mode 100644 index 0000000000..362f422bbb --- /dev/null +++ b/data/fixtures/scopes/dart/interior/interior.for.scope @@ -0,0 +1,27 @@ +void main() { + for (var i = 0; i < size; ++i) { } +} +--- + +[#1 Content] = 1:4-1:38 + >----------------------------------< +1| for (var i = 0; i < size; ++i) { } + +[#1 Removal] = +[#1 Domain] = 0:13-2:0 + > +0| void main() { +1| for (var i = 0; i < size; ++i) { } +2| } + < + +[#1 Insertion delimiter] = " " + + +[#2 Content] = +[#2 Removal] = +[#2 Domain] = 1:36-1:37 + >-< +1| for (var i = 0; i < size; ++i) { } + +[#2 Insertion delimiter] = " " diff --git a/data/fixtures/scopes/dart/interior/interior.foreach.scope b/data/fixtures/scopes/dart/interior/interior.foreach.scope new file mode 100644 index 0000000000..896bd45c94 --- /dev/null +++ b/data/fixtures/scopes/dart/interior/interior.foreach.scope @@ -0,0 +1,27 @@ +void main() { + for (final v in values) { } +} +--- + +[#1 Content] = 1:4-1:31 + >---------------------------< +1| for (final v in values) { } + +[#1 Removal] = +[#1 Domain] = 0:13-2:0 + > +0| void main() { +1| for (final v in values) { } +2| } + < + +[#1 Insertion delimiter] = " " + + +[#2 Content] = +[#2 Removal] = +[#2 Domain] = 1:29-1:30 + >-< +1| for (final v in values) { } + +[#2 Insertion delimiter] = " " diff --git a/data/fixtures/scopes/dart/interior/interior.function.scope b/data/fixtures/scopes/dart/interior/interior.function.scope new file mode 100644 index 0000000000..8a0c0bc456 --- /dev/null +++ b/data/fixtures/scopes/dart/interior/interior.function.scope @@ -0,0 +1,10 @@ +void foo() { } +--- + +[Content] = +[Removal] = +[Domain] = 0:12-0:13 + >-< +0| void foo() { } + +[Insertion delimiter] = " " diff --git a/data/fixtures/scopes/dart/interior/interior.if.scope b/data/fixtures/scopes/dart/interior/interior.if.scope new file mode 100644 index 0000000000..d78f2e1188 --- /dev/null +++ b/data/fixtures/scopes/dart/interior/interior.if.scope @@ -0,0 +1,52 @@ +void main() { + if (true) { } + else if (false) { } + else { } +} +--- + +[#1 Content] = 1:4-3:12 + >------------- +1| if (true) { } +2| else if (false) { } +3| else { } + ------------< + +[#1 Removal] = +[#1 Domain] = 0:13-4:0 + > +0| void main() { +1| if (true) { } +2| else if (false) { } +3| else { } +4| } + < + +[#1 Insertion delimiter] = " " + + +[#2 Content] = +[#2 Removal] = +[#2 Domain] = 1:15-1:16 + >-< +1| if (true) { } + +[#2 Insertion delimiter] = " " + + +[#3 Content] = +[#3 Removal] = +[#3 Domain] = 2:21-2:22 + >-< +2| else if (false) { } + +[#3 Insertion delimiter] = " " + + +[#4 Content] = +[#4 Removal] = +[#4 Domain] = 3:10-3:11 + >-< +3| else { } + +[#4 Insertion delimiter] = " " diff --git a/data/fixtures/scopes/dart/interior/interior.lambda.scope b/data/fixtures/scopes/dart/interior/interior.lambda.scope new file mode 100644 index 0000000000..9c3594fb03 --- /dev/null +++ b/data/fixtures/scopes/dart/interior/interior.lambda.scope @@ -0,0 +1,27 @@ +void main() { + var foo = () { }; +} +--- + +[#1 Content] = 1:4-1:21 + >-----------------< +1| var foo = () { }; + +[#1 Removal] = +[#1 Domain] = 0:13-2:0 + > +0| void main() { +1| var foo = () { }; +2| } + < + +[#1 Insertion delimiter] = " " + + +[#2 Content] = +[#2 Removal] = +[#2 Domain] = 1:18-1:19 + >-< +1| var foo = () { }; + +[#2 Insertion delimiter] = " " diff --git a/data/fixtures/scopes/dart/interior/interior.method.scope b/data/fixtures/scopes/dart/interior/interior.method.scope new file mode 100644 index 0000000000..a292acdca1 --- /dev/null +++ b/data/fixtures/scopes/dart/interior/interior.method.scope @@ -0,0 +1,27 @@ +class Foo { + void bar() { } +} +--- + +[#1 Content] = 1:4-1:18 + >--------------< +1| void bar() { } + +[#1 Removal] = +[#1 Domain] = 0:11-2:0 + > +0| class Foo { +1| void bar() { } +2| } + < + +[#1 Insertion delimiter] = " " + + +[#2 Content] = +[#2 Removal] = +[#2 Domain] = 1:16-1:17 + >-< +1| void bar() { } + +[#2 Insertion delimiter] = " " diff --git a/data/fixtures/scopes/dart/interior/interior.switch.scope b/data/fixtures/scopes/dart/interior/interior.switch.scope new file mode 100644 index 0000000000..1aafa9a4db --- /dev/null +++ b/data/fixtures/scopes/dart/interior/interior.switch.scope @@ -0,0 +1,27 @@ +void main() { + switch (value) { } +} +--- + +[#1 Content] = 1:4-1:22 + >------------------< +1| switch (value) { } + +[#1 Removal] = +[#1 Domain] = 0:13-2:0 + > +0| void main() { +1| switch (value) { } +2| } + < + +[#1 Insertion delimiter] = " " + + +[#2 Content] = +[#2 Removal] = +[#2 Domain] = 1:20-1:21 + >-< +1| switch (value) { } + +[#2 Insertion delimiter] = " " diff --git a/data/fixtures/scopes/dart/interior/interior.switchCase.scope b/data/fixtures/scopes/dart/interior/interior.switchCase.scope new file mode 100644 index 0000000000..cfe04f5d2d --- /dev/null +++ b/data/fixtures/scopes/dart/interior/interior.switchCase.scope @@ -0,0 +1,100 @@ +void main() { + switch (foo) { + case 0: + bar; + break; + default: + bar; + break; + } +} +--- + +[#1 Content] = 1:4-8:5 + >-------------- +1| switch (foo) { +2| case 0: +3| bar; +4| break; +5| default: +6| bar; +7| break; +8| } + -----< + +[#1 Removal] = +[#1 Domain] = 0:13-9:0 + > +0| void main() { +1| switch (foo) { +2| case 0: +3| bar; +4| break; +5| default: +6| bar; +7| break; +8| } +9| } + < + +[#1 Insertion delimiter] = " " + + +[#2 Content] = 2:8-7:18 + >------- +2| case 0: +3| bar; +4| break; +5| default: +6| bar; +7| break; + ------------------< + +[#2 Removal] = +[#2 Domain] = 1:18-8:4 + > +1| switch (foo) { +2| case 0: +3| bar; +4| break; +5| default: +6| bar; +7| break; +8| } + ----< + +[#2 Insertion delimiter] = " " + + +[#3 Content] = 3:12-4:18 + >---- +3| bar; +4| break; + ------------------< + +[#3 Removal] = +[#3 Domain] = 2:15-4:18 + > +2| case 0: +3| bar; +4| break; + ------------------< + +[#3 Insertion delimiter] = " " + + +[#4 Content] = 6:12-7:18 + >---- +6| bar; +7| break; + ------------------< + +[#4 Removal] = +[#4 Domain] = 5:16-7:18 + > +5| default: +6| bar; +7| break; + ------------------< + +[#4 Insertion delimiter] = " " diff --git a/data/fixtures/scopes/dart/interior/interior.switchCase2.scope b/data/fixtures/scopes/dart/interior/interior.switchCase2.scope new file mode 100644 index 0000000000..70aa693e11 --- /dev/null +++ b/data/fixtures/scopes/dart/interior/interior.switchCase2.scope @@ -0,0 +1,64 @@ +void main() { + switch (foo) { + case 0: { } + default: { } + } +} +--- + +[#1 Content] = 1:4-4:5 + >-------------- +1| switch (foo) { +2| case 0: { } +3| default: { } +4| } + -----< + +[#1 Removal] = +[#1 Domain] = 0:13-5:0 + > +0| void main() { +1| switch (foo) { +2| case 0: { } +3| default: { } +4| } +5| } + < + +[#1 Insertion delimiter] = " " + + +[#2 Content] = 2:8-3:20 + >----------- +2| case 0: { } +3| default: { } + --------------------< + +[#2 Removal] = +[#2 Domain] = 1:18-4:4 + > +1| switch (foo) { +2| case 0: { } +3| default: { } +4| } + ----< + +[#2 Insertion delimiter] = " " + + +[#3 Content] = +[#3 Removal] = +[#3 Domain] = 2:17-2:18 + >-< +2| case 0: { } + +[#3 Insertion delimiter] = " " + + +[#4 Content] = +[#4 Removal] = +[#4 Domain] = 3:18-3:19 + >-< +3| default: { } + +[#4 Insertion delimiter] = " " diff --git a/data/fixtures/scopes/dart/interior/interior.try.scope b/data/fixtures/scopes/dart/interior/interior.try.scope new file mode 100644 index 0000000000..02c421f801 --- /dev/null +++ b/data/fixtures/scopes/dart/interior/interior.try.scope @@ -0,0 +1,52 @@ +void main() { + try { } + catch (e) { } + finally { } +} +--- + +[#1 Content] = 1:4-3:15 + >------- +1| try { } +2| catch (e) { } +3| finally { } + ---------------< + +[#1 Removal] = +[#1 Domain] = 0:13-4:0 + > +0| void main() { +1| try { } +2| catch (e) { } +3| finally { } +4| } + < + +[#1 Insertion delimiter] = " " + + +[#2 Content] = +[#2 Removal] = +[#2 Domain] = 1:9-1:10 + >-< +1| try { } + +[#2 Insertion delimiter] = " " + + +[#3 Content] = +[#3 Removal] = +[#3 Domain] = 2:15-2:16 + >-< +2| catch (e) { } + +[#3 Insertion delimiter] = " " + + +[#4 Content] = +[#4 Removal] = +[#4 Domain] = 3:13-3:14 + >-< +3| finally { } + +[#4 Insertion delimiter] = " " diff --git a/data/fixtures/scopes/dart/interior/interior.while.scope b/data/fixtures/scopes/dart/interior/interior.while.scope new file mode 100644 index 0000000000..1999b39f09 --- /dev/null +++ b/data/fixtures/scopes/dart/interior/interior.while.scope @@ -0,0 +1,27 @@ +void main() { + while (true) { } +} +--- + +[#1 Content] = 1:4-1:20 + >----------------< +1| while (true) { } + +[#1 Removal] = +[#1 Domain] = 0:13-2:0 + > +0| void main() { +1| while (true) { } +2| } + < + +[#1 Insertion delimiter] = " " + + +[#2 Content] = +[#2 Removal] = +[#2 Domain] = 1:18-1:19 + >-< +1| while (true) { } + +[#2 Insertion delimiter] = " " diff --git a/data/fixtures/scopes/dart/key/key.mapPair.iteration.scope b/data/fixtures/scopes/dart/key/key.mapPair.iteration.scope new file mode 100644 index 0000000000..c1d91d11eb --- /dev/null +++ b/data/fixtures/scopes/dart/key/key.mapPair.iteration.scope @@ -0,0 +1,9 @@ +void main() { + {"aaa": 0, "bbb": 1}; +} +--- + +[Content] = +[Domain] = 1:5-1:23 + >------------------< +1| {"aaa": 0, "bbb": 1}; diff --git a/data/fixtures/scopes/dart/key/key.mapPair.scope b/data/fixtures/scopes/dart/key/key.mapPair.scope new file mode 100644 index 0000000000..6c0733528a --- /dev/null +++ b/data/fixtures/scopes/dart/key/key.mapPair.scope @@ -0,0 +1,41 @@ +void main() { + {"aaa": 0, "bbb": 1}; +} +--- + +[#1 Content] = 1:5-1:10 + >-----< +1| {"aaa": 0, "bbb": 1}; + +[#1 Removal] = 1:5-1:12 + >-------< +1| {"aaa": 0, "bbb": 1}; + +[#1 Trailing delimiter] = 1:10-1:12 + >--< +1| {"aaa": 0, "bbb": 1}; + +[#1 Domain] = 1:5-1:13 + >--------< +1| {"aaa": 0, "bbb": 1}; + +[#1 Insertion delimiter] = " " + + +[#2 Content] = 1:15-1:20 + >-----< +1| {"aaa": 0, "bbb": 1}; + +[#2 Removal] = 1:15-1:22 + >-------< +1| {"aaa": 0, "bbb": 1}; + +[#2 Trailing delimiter] = 1:20-1:22 + >--< +1| {"aaa": 0, "bbb": 1}; + +[#2 Domain] = 1:15-1:23 + >--------< +1| {"aaa": 0, "bbb": 1}; + +[#2 Insertion delimiter] = " " diff --git a/data/fixtures/scopes/dart/map2.scope b/data/fixtures/scopes/dart/map2.scope new file mode 100644 index 0000000000..9b79803695 --- /dev/null +++ b/data/fixtures/scopes/dart/map2.scope @@ -0,0 +1,23 @@ +void mai9n() { + final {"aaa": bar, "bbb": baz} = foo; +} +--- + +[Content] = +[Domain] = 1:10-1:34 + >------------------------< +1| final {"aaa": bar, "bbb": baz} = foo; + +[Removal] = 1:10-1:35 + >-------------------------< +1| final {"aaa": bar, "bbb": baz} = foo; + +[Leading delimiter] = 1:9-1:10 + >-< +1| final {"aaa": bar, "bbb": baz} = foo; + +[Trailing delimiter] = 1:34-1:35 + >-< +1| final {"aaa": bar, "bbb": baz} = foo; + +[Insertion delimiter] = " " diff --git a/data/fixtures/scopes/dart/name/name.argument.actual.iteration.scope b/data/fixtures/scopes/dart/name/name.argument.actual.iteration.scope new file mode 100644 index 0000000000..f43dbc7a00 --- /dev/null +++ b/data/fixtures/scopes/dart/name/name.argument.actual.iteration.scope @@ -0,0 +1,27 @@ +void main() { + foo(aaa: 0, bbb: 1); +} +--- + +[#1 Content] = +[#1 Domain] = 0:0-2:1 + >------------- +0| void main() { +1| foo(aaa: 0, bbb: 1); +2| } + -< + + +[#2 Content] = +[#2 Domain] = 0:13-2:0 + > +0| void main() { +1| foo(aaa: 0, bbb: 1); +2| } + < + + +[#3 Content] = +[#3 Domain] = 1:8-1:22 + >--------------< +1| foo(aaa: 0, bbb: 1); diff --git a/data/fixtures/scopes/dart/name/name.argument.actual.scope b/data/fixtures/scopes/dart/name/name.argument.actual.scope new file mode 100644 index 0000000000..6438a689ad --- /dev/null +++ b/data/fixtures/scopes/dart/name/name.argument.actual.scope @@ -0,0 +1,60 @@ +void main() { + foo(aaa: 0, bbb: 1); +} +--- + +[#1 Content] = +[#1 Removal] = 0:5-0:9 + >----< +0| void main() { + +[#1 Leading delimiter] = 0:4-0:5 + >-< +0| void main() { + +[#1 Domain] = 0:0-2:1 + >------------- +0| void main() { +1| foo(aaa: 0, bbb: 1); +2| } + -< + +[#1 Insertion delimiter] = " " + + +[#2 Content] = 1:8-1:11 + >---< +1| foo(aaa: 0, bbb: 1); + +[#2 Removal] = 1:8-1:13 + >-----< +1| foo(aaa: 0, bbb: 1); + +[#2 Trailing delimiter] = 1:11-1:13 + >--< +1| foo(aaa: 0, bbb: 1); + +[#2 Domain] = 1:8-1:14 + >------< +1| foo(aaa: 0, bbb: 1); + +[#2 Insertion delimiter] = " " + + +[#3 Content] = 1:16-1:19 + >---< +1| foo(aaa: 0, bbb: 1); + +[#3 Removal] = 1:16-1:21 + >-----< +1| foo(aaa: 0, bbb: 1); + +[#3 Trailing delimiter] = 1:19-1:21 + >--< +1| foo(aaa: 0, bbb: 1); + +[#3 Domain] = 1:16-1:22 + >------< +1| foo(aaa: 0, bbb: 1); + +[#3 Insertion delimiter] = " " diff --git a/data/fixtures/scopes/dart/name/name.argument.catch.scope b/data/fixtures/scopes/dart/name/name.argument.catch.scope new file mode 100644 index 0000000000..ed3594cea8 --- /dev/null +++ b/data/fixtures/scopes/dart/name/name.argument.catch.scope @@ -0,0 +1,49 @@ +void main() { + try {} + catch (e, s) {} +} +--- + +[#1 Content] = +[#1 Removal] = 0:5-0:9 + >----< +0| void main() { + +[#1 Leading delimiter] = 0:4-0:5 + >-< +0| void main() { + +[#1 Domain] = 0:0-3:1 + >------------- +0| void main() { +1| try {} +2| catch (e, s) {} +3| } + -< + +[#1 Insertion delimiter] = " " + + +[#2 Content] = +[#2 Removal] = +[#2 Domain] = 2:11-2:12 + >-< +2| catch (e, s) {} + +[#2 Insertion delimiter] = " " + + +[#3 Content] = +[#3 Domain] = 2:14-2:15 + >-< +2| catch (e, s) {} + +[#3 Removal] = 2:13-2:15 + >--< +2| catch (e, s) {} + +[#3 Leading delimiter] = 2:13-2:14 + >-< +2| catch (e, s) {} + +[#3 Insertion delimiter] = " " diff --git a/data/fixtures/scopes/dart/name/name.argument.formal.constructor.iteration.scope b/data/fixtures/scopes/dart/name/name.argument.formal.constructor.iteration.scope new file mode 100644 index 0000000000..3286fefc20 --- /dev/null +++ b/data/fixtures/scopes/dart/name/name.argument.formal.constructor.iteration.scope @@ -0,0 +1,27 @@ +class Foo { + Foo(aaa, [int bbb, ccc = 0]) {} +} +--- + +[#1 Content] = +[#1 Domain] = 0:0-2:1 + >----------- +0| class Foo { +1| Foo(aaa, [int bbb, ccc = 0]) {} +2| } + -< + + +[#2 Content] = +[#2 Domain] = 0:11-2:0 + > +0| class Foo { +1| Foo(aaa, [int bbb, ccc = 0]) {} +2| } + < + + +[#3 Content] = +[#3 Domain] = 1:8-1:31 + >-----------------------< +1| Foo(aaa, [int bbb, ccc = 0]) {} diff --git a/data/fixtures/scopes/dart/name/name.argument.formal.constructor.scope b/data/fixtures/scopes/dart/name/name.argument.formal.constructor.scope new file mode 100644 index 0000000000..8cd0a21a18 --- /dev/null +++ b/data/fixtures/scopes/dart/name/name.argument.formal.constructor.scope @@ -0,0 +1,96 @@ +class Foo { + Foo(aaa, [int bbb, ccc = 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-2:1 + >----------- +0| class Foo { +1| Foo(aaa, [int bbb, ccc = 0]) {} +2| } + -< + +[#1 Insertion delimiter] = " " + + +[#2 Content] = +[#2 Removal] = 1:4-1:7 + >---< +1| Foo(aaa, [int bbb, ccc = 0]) {} + +[#2 Leading delimiter] = 1:0-1:4 + >----< +1| Foo(aaa, [int bbb, ccc = 0]) {} + +[#2 Domain] = 1:4-1:35 + >-------------------------------< +1| Foo(aaa, [int bbb, ccc = 0]) {} + +[#2 Insertion delimiter] = " " + + +[#3 Content] = +[#3 Removal] = +[#3 Domain] = 1:8-1:11 + >---< +1| Foo(aaa, [int bbb, ccc = 0]) {} + +[#3 Insertion delimiter] = " " + + +[#4 Content] = 1:18-1:21 + >---< +1| Foo(aaa, [int bbb, ccc = 0]) {} + +[#4 Removal] = 1:17-1:21 + >----< +1| Foo(aaa, [int bbb, ccc = 0]) {} + +[#4 Leading delimiter] = 1:17-1:18 + >-< +1| Foo(aaa, [int bbb, ccc = 0]) {} + +[#4 Domain] = 1:14-1:21 + >-------< +1| Foo(aaa, [int bbb, ccc = 0]) {} + +[#4 Insertion delimiter] = " " + + +[#5 Content] = 1:23-1:26 + >---< +1| Foo(aaa, [int bbb, ccc = 0]) {} + +[#5 Removal] = 1:23-1:27 + >----< +1| Foo(aaa, [int bbb, ccc = 0]) {} + +[#5 Leading delimiter] = 1:22-1:23 + >-< +1| Foo(aaa, [int bbb, ccc = 0]) {} + +[#5 Trailing delimiter] = 1:26-1:27 + >-< +1| Foo(aaa, [int bbb, ccc = 0]) {} + +[#5 Domain] = 1:23-1:30 + >-------< +1| Foo(aaa, [int bbb, ccc = 0]) {} + +[#5 Insertion delimiter] = " " diff --git a/data/fixtures/scopes/dart/name/name.argument.formal.iteration.scope b/data/fixtures/scopes/dart/name/name.argument.formal.iteration.scope new file mode 100644 index 0000000000..bc21558abf --- /dev/null +++ b/data/fixtures/scopes/dart/name/name.argument.formal.iteration.scope @@ -0,0 +1,13 @@ +void foo(aaa, [int bbb, ccc = 0]) {} +--- + +[#1 Content] = +[#1 Domain] = 0:0-0:36 + >------------------------------------< +0| void foo(aaa, [int bbb, ccc = 0]) {} + + +[#2 Content] = +[#2 Domain] = 0:9-0:32 + >-----------------------< +0| void foo(aaa, [int bbb, ccc = 0]) {} diff --git a/data/fixtures/scopes/dart/name/name.argument.formal.lambda.iteration.scope b/data/fixtures/scopes/dart/name/name.argument.formal.lambda.iteration.scope new file mode 100644 index 0000000000..c7b891f5e7 --- /dev/null +++ b/data/fixtures/scopes/dart/name/name.argument.formal.lambda.iteration.scope @@ -0,0 +1,27 @@ +void main() { + var foo = (aaa, [int bbb, ccc = 0]) {} +} +--- + +[#1 Content] = +[#1 Domain] = 0:0-2:1 + >------------- +0| void main() { +1| var foo = (aaa, [int bbb, ccc = 0]) {} +2| } + -< + + +[#2 Content] = +[#2 Domain] = 0:13-2:0 + > +0| void main() { +1| var foo = (aaa, [int bbb, ccc = 0]) {} +2| } + < + + +[#3 Content] = +[#3 Domain] = 1:15-1:38 + >-----------------------< +1| var foo = (aaa, [int bbb, ccc = 0]) {} diff --git a/data/fixtures/scopes/dart/name/name.argument.formal.lambda.scope b/data/fixtures/scopes/dart/name/name.argument.formal.lambda.scope new file mode 100644 index 0000000000..fdfcfb1ebf --- /dev/null +++ b/data/fixtures/scopes/dart/name/name.argument.formal.lambda.scope @@ -0,0 +1,96 @@ +void main() { + var foo = (aaa, [int bbb, ccc = 0]) {} +} +--- + +[#1 Content] = +[#1 Removal] = 0:5-0:9 + >----< +0| void main() { + +[#1 Leading delimiter] = 0:4-0:5 + >-< +0| void main() { + +[#1 Domain] = 0:0-2:1 + >------------- +0| void main() { +1| var foo = (aaa, [int bbb, ccc = 0]) {} +2| } + -< + +[#1 Insertion delimiter] = " " + + +[#2 Content] = 1:8-1:11 + >---< +1| var foo = (aaa, [int bbb, ccc = 0]) {} + +[#2 Removal] = 1:4-1:14 + >----------< +1| var foo = (aaa, [int bbb, ccc = 0]) {} + +[#2 Leading delimiter] = 1:7-1:8 + >-< +1| var foo = (aaa, [int bbb, ccc = 0]) {} + +[#2 Trailing delimiter] = 1:11-1:12 + >-< +1| var foo = (aaa, [int bbb, ccc = 0]) {} + +[#2 Domain] = 1:4-1:42 + >--------------------------------------< +1| var foo = (aaa, [int bbb, ccc = 0]) {} + +[#2 Insertion delimiter] = " " + + +[#3 Content] = +[#3 Removal] = +[#3 Domain] = 1:15-1:18 + >---< +1| var foo = (aaa, [int bbb, ccc = 0]) {} + +[#3 Insertion delimiter] = " " + + +[#4 Content] = 1:25-1:28 + >---< +1| var foo = (aaa, [int bbb, ccc = 0]) {} + +[#4 Removal] = 1:24-1:28 + >----< +1| var foo = (aaa, [int bbb, ccc = 0]) {} + +[#4 Leading delimiter] = 1:24-1:25 + >-< +1| var foo = (aaa, [int bbb, ccc = 0]) {} + +[#4 Domain] = 1:21-1:28 + >-------< +1| var foo = (aaa, [int bbb, ccc = 0]) {} + +[#4 Insertion delimiter] = " " + + +[#5 Content] = 1:30-1:33 + >---< +1| var foo = (aaa, [int bbb, ccc = 0]) {} + +[#5 Removal] = 1:30-1:34 + >----< +1| var foo = (aaa, [int bbb, ccc = 0]) {} + +[#5 Leading delimiter] = 1:29-1:30 + >-< +1| var foo = (aaa, [int bbb, ccc = 0]) {} + +[#5 Trailing delimiter] = 1:33-1:34 + >-< +1| var foo = (aaa, [int bbb, ccc = 0]) {} + +[#5 Domain] = 1:30-1:37 + >-------< +1| var foo = (aaa, [int bbb, ccc = 0]) {} + +[#5 Insertion delimiter] = " " diff --git a/data/fixtures/scopes/dart/name/name.argument.formal.method.iteration.scope b/data/fixtures/scopes/dart/name/name.argument.formal.method.iteration.scope new file mode 100644 index 0000000000..9b8fd27597 --- /dev/null +++ b/data/fixtures/scopes/dart/name/name.argument.formal.method.iteration.scope @@ -0,0 +1,27 @@ +class Foo { + void bar(aaa, [int bbb, ccc = 0]) {} +} +--- + +[#1 Content] = +[#1 Domain] = 0:0-2:1 + >----------- +0| class Foo { +1| void bar(aaa, [int bbb, ccc = 0]) {} +2| } + -< + + +[#2 Content] = +[#2 Domain] = 0:11-2:0 + > +0| class Foo { +1| void bar(aaa, [int bbb, ccc = 0]) {} +2| } + < + + +[#3 Content] = +[#3 Domain] = 1:13-1:36 + >-----------------------< +1| void bar(aaa, [int bbb, ccc = 0]) {} diff --git a/data/fixtures/scopes/dart/name/name.argument.formal.method.scope b/data/fixtures/scopes/dart/name/name.argument.formal.method.scope new file mode 100644 index 0000000000..455d4b0a17 --- /dev/null +++ b/data/fixtures/scopes/dart/name/name.argument.formal.method.scope @@ -0,0 +1,96 @@ +class Foo { + void foo(aaa, [int bbb, ccc = 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-2:1 + >----------- +0| class Foo { +1| void foo(aaa, [int bbb, ccc = 0]) {} +2| } + -< + +[#1 Insertion delimiter] = " " + + +[#2 Content] = +[#2 Removal] = 1:9-1:12 + >---< +1| void foo(aaa, [int bbb, ccc = 0]) {} + +[#2 Leading delimiter] = 1:8-1:9 + >-< +1| void foo(aaa, [int bbb, ccc = 0]) {} + +[#2 Domain] = 1:4-1:40 + >------------------------------------< +1| void foo(aaa, [int bbb, ccc = 0]) {} + +[#2 Insertion delimiter] = " " + + +[#3 Content] = +[#3 Removal] = +[#3 Domain] = 1:13-1:16 + >---< +1| void foo(aaa, [int bbb, ccc = 0]) {} + +[#3 Insertion delimiter] = " " + + +[#4 Content] = 1:23-1:26 + >---< +1| void foo(aaa, [int bbb, ccc = 0]) {} + +[#4 Removal] = 1:22-1:26 + >----< +1| void foo(aaa, [int bbb, ccc = 0]) {} + +[#4 Leading delimiter] = 1:22-1:23 + >-< +1| void foo(aaa, [int bbb, ccc = 0]) {} + +[#4 Domain] = 1:19-1:26 + >-------< +1| void foo(aaa, [int bbb, ccc = 0]) {} + +[#4 Insertion delimiter] = " " + + +[#5 Content] = 1:28-1:31 + >---< +1| void foo(aaa, [int bbb, ccc = 0]) {} + +[#5 Removal] = 1:28-1:32 + >----< +1| void foo(aaa, [int bbb, ccc = 0]) {} + +[#5 Leading delimiter] = 1:27-1:28 + >-< +1| void foo(aaa, [int bbb, ccc = 0]) {} + +[#5 Trailing delimiter] = 1:31-1:32 + >-< +1| void foo(aaa, [int bbb, ccc = 0]) {} + +[#5 Domain] = 1:28-1:35 + >-------< +1| void foo(aaa, [int bbb, ccc = 0]) {} + +[#5 Insertion delimiter] = " " diff --git a/data/fixtures/scopes/dart/name/name.argument.formal.scope b/data/fixtures/scopes/dart/name/name.argument.formal.scope new file mode 100644 index 0000000000..ce2c4bdaf6 --- /dev/null +++ b/data/fixtures/scopes/dart/name/name.argument.formal.scope @@ -0,0 +1,68 @@ +void foo(aaa, [int bbb, ccc = 0]) {} +--- + +[#1 Content] = +[#1 Removal] = 0:5-0:8 + >---< +0| void foo(aaa, [int bbb, ccc = 0]) {} + +[#1 Leading delimiter] = 0:4-0:5 + >-< +0| void foo(aaa, [int bbb, ccc = 0]) {} + +[#1 Domain] = 0:0-0:36 + >------------------------------------< +0| void foo(aaa, [int bbb, ccc = 0]) {} + +[#1 Insertion delimiter] = " " + + +[#2 Content] = +[#2 Removal] = +[#2 Domain] = 0:9-0:12 + >---< +0| void foo(aaa, [int bbb, ccc = 0]) {} + +[#2 Insertion delimiter] = " " + + +[#3 Content] = 0:19-0:22 + >---< +0| void foo(aaa, [int bbb, ccc = 0]) {} + +[#3 Removal] = 0:18-0:22 + >----< +0| void foo(aaa, [int bbb, ccc = 0]) {} + +[#3 Leading delimiter] = 0:18-0:19 + >-< +0| void foo(aaa, [int bbb, ccc = 0]) {} + +[#3 Domain] = 0:15-0:22 + >-------< +0| void foo(aaa, [int bbb, ccc = 0]) {} + +[#3 Insertion delimiter] = " " + + +[#4 Content] = 0:24-0:27 + >---< +0| void foo(aaa, [int bbb, ccc = 0]) {} + +[#4 Removal] = 0:24-0:28 + >----< +0| void foo(aaa, [int bbb, ccc = 0]) {} + +[#4 Leading delimiter] = 0:23-0:24 + >-< +0| void foo(aaa, [int bbb, ccc = 0]) {} + +[#4 Trailing delimiter] = 0:27-0:28 + >-< +0| void foo(aaa, [int bbb, ccc = 0]) {} + +[#4 Domain] = 0:24-0:31 + >-------< +0| void foo(aaa, [int bbb, ccc = 0]) {} + +[#4 Insertion delimiter] = " " diff --git a/data/fixtures/scopes/dart/name/name.assignment.compound.scope b/data/fixtures/scopes/dart/name/name.assignment.compound.scope new file mode 100644 index 0000000000..42ac3a07fe --- /dev/null +++ b/data/fixtures/scopes/dart/name/name.assignment.compound.scope @@ -0,0 +1,41 @@ +void main() { + foo += 0; +} +--- + +[#1 Content] = +[#1 Removal] = 0:5-0:9 + >----< +0| void main() { + +[#1 Leading delimiter] = 0:4-0:5 + >-< +0| void main() { + +[#1 Domain] = 0:0-2:1 + >------------- +0| void main() { +1| foo += 0; +2| } + -< + +[#1 Insertion delimiter] = " " + + +[#2 Content] = 1:4-1:7 + >---< +1| foo += 0; + +[#2 Removal] = 1:4-1:11 + >-------< +1| foo += 0; + +[#2 Trailing delimiter] = 1:7-1:11 + >----< +1| foo += 0; + +[#2 Domain] = 1:4-1:13 + >---------< +1| foo += 0; + +[#2 Insertion delimiter] = " " diff --git a/data/fixtures/scopes/dart/name/name.assignment.scope b/data/fixtures/scopes/dart/name/name.assignment.scope new file mode 100644 index 0000000000..8c9fe94e1a --- /dev/null +++ b/data/fixtures/scopes/dart/name/name.assignment.scope @@ -0,0 +1,41 @@ +void main() { + foo = 0; +} +--- + +[#1 Content] = +[#1 Removal] = 0:5-0:9 + >----< +0| void main() { + +[#1 Leading delimiter] = 0:4-0:5 + >-< +0| void main() { + +[#1 Domain] = 0:0-2:1 + >------------- +0| void main() { +1| foo = 0; +2| } + -< + +[#1 Insertion delimiter] = " " + + +[#2 Content] = 1:4-1:7 + >---< +1| foo = 0; + +[#2 Removal] = 1:4-1:10 + >------< +1| foo = 0; + +[#2 Trailing delimiter] = 1:7-1:10 + >---< +1| foo = 0; + +[#2 Domain] = 1:4-1:12 + >--------< +1| foo = 0; + +[#2 Insertion delimiter] = " " diff --git a/data/fixtures/scopes/dart/name/name.constant.scope b/data/fixtures/scopes/dart/name/name.constant.scope new file mode 100644 index 0000000000..cd15b48a5a --- /dev/null +++ b/data/fixtures/scopes/dart/name/name.constant.scope @@ -0,0 +1,24 @@ +const foo = 0; +--- + +[Content] = 0:6-0:9 + >---< +0| const foo = 0; + +[Removal] = 0:0-0:12 + >------------< +0| const foo = 0; + +[Leading delimiter] = 0:5-0:6 + >-< +0| const foo = 0; + +[Trailing delimiter] = 0:9-0:10 + >-< +0| const foo = 0; + +[Domain] = 0:0-0:14 + >--------------< +0| const foo = 0; + +[Insertion delimiter] = " " diff --git a/data/fixtures/scopes/dart/name/name.constructor.scope b/data/fixtures/scopes/dart/name/name.constructor.scope new file mode 100644 index 0000000000..c067b52eed --- /dev/null +++ b/data/fixtures/scopes/dart/name/name.constructor.scope @@ -0,0 +1,45 @@ +class Foo { + Foo() {} +} +--- + +[#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-2:1 + >----------- +0| class Foo { +1| Foo() {} +2| } + -< + +[#1 Insertion delimiter] = " " + + +[#2 Content] = +[#2 Removal] = 1:4-1:7 + >---< +1| Foo() {} + +[#2 Leading delimiter] = 1:0-1:4 + >----< +1| Foo() {} + +[#2 Domain] = 1:4-1:12 + >--------< +1| Foo() {} + +[#2 Insertion delimiter] = " " diff --git a/data/fixtures/scopes/dart/name/name.enum.scope b/data/fixtures/scopes/dart/name/name.enum.scope new file mode 100644 index 0000000000..09d2849071 --- /dev/null +++ b/data/fixtures/scopes/dart/name/name.enum.scope @@ -0,0 +1,24 @@ +enum Foo {} +--- + +[Content] = 0:5-0:8 + >---< +0| enum Foo {} + +[Removal] = 0:5-0:9 + >----< +0| enum Foo {} + +[Leading delimiter] = 0:4-0:5 + >-< +0| enum Foo {} + +[Trailing delimiter] = 0:8-0:9 + >-< +0| enum Foo {} + +[Domain] = 0:0-0:11 + >-----------< +0| enum Foo {} + +[Insertion delimiter] = " " diff --git a/data/fixtures/scopes/dart/name/name.field.class.scope b/data/fixtures/scopes/dart/name/name.field.class.scope new file mode 100644 index 0000000000..7ccecb1c47 --- /dev/null +++ b/data/fixtures/scopes/dart/name/name.field.class.scope @@ -0,0 +1,70 @@ +class Foo { + var bar; + var baz = 1; +} +--- + +[#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| var bar; +2| var baz = 1; +3| } + -< + +[#1 Insertion delimiter] = " " + + +[#2 Content] = 1:8-1:11 + >---< +1| var bar; + +[#2 Removal] = +[#2 Domain] = 1:4-1:12 + >--------< +1| var bar; + +[#2 Leading delimiter] = 1:7-1:8 + >-< +1| var bar; + +[#2 Insertion delimiter] = " " + + +[#3 Content] = 2:8-2:11 + >---< +2| var baz = 1; + +[#3 Removal] = 2:4-2:14 + >----------< +2| var baz = 1; + +[#3 Leading delimiter] = 2:7-2:8 + >-< +2| var baz = 1; + +[#3 Trailing delimiter] = 2:11-2:12 + >-< +2| var baz = 1; + +[#3 Domain] = 2:4-2:16 + >------------< +2| var baz = 1; + +[#3 Insertion delimiter] = " " diff --git a/data/fixtures/scopes/dart/name/name.field.enum.scope b/data/fixtures/scopes/dart/name/name.field.enum.scope new file mode 100644 index 0000000000..d0a0d3b2ff --- /dev/null +++ b/data/fixtures/scopes/dart/name/name.field.enum.scope @@ -0,0 +1,63 @@ +enum Foo { + bar, + baz(); +} +--- + +[#1 Content] = 0:5-0:8 + >---< +0| enum Foo { + +[#1 Removal] = 0:5-0:9 + >----< +0| enum Foo { + +[#1 Leading delimiter] = 0:4-0:5 + >-< +0| enum Foo { + +[#1 Trailing delimiter] = 0:8-0:9 + >-< +0| enum Foo { + +[#1 Domain] = 0:0-3:1 + >---------- +0| enum Foo { +1| bar, +2| baz(); +3| } + -< + +[#1 Insertion delimiter] = " " + + +[#2 Content] = +[#2 Domain] = 1:4-1:7 + >---< +1| bar, + +[#2 Removal] = 1:0-1:7 + >-------< +1| bar, + +[#2 Leading delimiter] = 1:0-1:4 + >----< +1| bar, + +[#2 Insertion delimiter] = " " + + +[#3 Content] = +[#3 Removal] = 2:4-2:7 + >---< +2| baz(); + +[#3 Leading delimiter] = 2:0-2:4 + >----< +2| baz(); + +[#3 Domain] = 2:4-2:9 + >-----< +2| baz(); + +[#3 Insertion delimiter] = " " diff --git a/data/fixtures/scopes/dart/name/name.foreach.scope b/data/fixtures/scopes/dart/name/name.foreach.scope new file mode 100644 index 0000000000..8476d15987 --- /dev/null +++ b/data/fixtures/scopes/dart/name/name.foreach.scope @@ -0,0 +1,45 @@ +void main() { + for (final v in values) {} +} +--- + +[#1 Content] = +[#1 Removal] = 0:5-0:9 + >----< +0| void main() { + +[#1 Leading delimiter] = 0:4-0:5 + >-< +0| void main() { + +[#1 Domain] = 0:0-2:1 + >------------- +0| void main() { +1| for (final v in values) {} +2| } + -< + +[#1 Insertion delimiter] = " " + + +[#2 Content] = 1:15-1:16 + >-< +1| for (final v in values) {} + +[#2 Removal] = 1:15-1:17 + >--< +1| for (final v in values) {} + +[#2 Leading delimiter] = 1:14-1:15 + >-< +1| for (final v in values) {} + +[#2 Trailing delimiter] = 1:16-1:17 + >-< +1| for (final v in values) {} + +[#2 Domain] = 1:4-1:30 + >--------------------------< +1| for (final v in values) {} + +[#2 Insertion delimiter] = " " diff --git a/data/fixtures/scopes/dart/name/name.function.scope b/data/fixtures/scopes/dart/name/name.function.scope new file mode 100644 index 0000000000..80cde86ee4 --- /dev/null +++ b/data/fixtures/scopes/dart/name/name.function.scope @@ -0,0 +1,17 @@ +void foo() {} +--- + +[Content] = +[Removal] = 0:5-0:8 + >---< +0| void foo() {} + +[Leading delimiter] = 0:4-0:5 + >-< +0| void foo() {} + +[Domain] = 0:0-0:13 + >-------------< +0| void foo() {} + +[Insertion delimiter] = " " diff --git a/data/fixtures/scopes/dart/name/name.iteration.block.scope b/data/fixtures/scopes/dart/name/name.iteration.block.scope new file mode 100644 index 0000000000..5768db5310 --- /dev/null +++ b/data/fixtures/scopes/dart/name/name.iteration.block.scope @@ -0,0 +1,27 @@ +class Foo { + void bar() { } +} +--- + +[#1 Content] = +[#1 Domain] = 0:0-2:1 + >----------- +0| class Foo { +1| void bar() { } +2| } + -< + + +[#2 Content] = +[#2 Domain] = 0:11-2:0 + > +0| class Foo { +1| void bar() { } +2| } + < + + +[#3 Content] = +[#3 Domain] = 1:16-1:17 + >-< +1| void bar() { } diff --git a/data/fixtures/scopes/dart/name/name.iteration.block2.scope b/data/fixtures/scopes/dart/name/name.iteration.block2.scope new file mode 100644 index 0000000000..ea20927c6d --- /dev/null +++ b/data/fixtures/scopes/dart/name/name.iteration.block2.scope @@ -0,0 +1,13 @@ +void foo() { } +--- + +[#1 Content] = +[#1 Domain] = 0:0-0:14 + >--------------< +0| void foo() { } + + +[#2 Content] = +[#2 Domain] = 0:12-0:13 + >-< +0| void foo() { } diff --git a/data/fixtures/scopes/dart/name/name.iteration.block3.scope b/data/fixtures/scopes/dart/name/name.iteration.block3.scope new file mode 100644 index 0000000000..c1543e41aa --- /dev/null +++ b/data/fixtures/scopes/dart/name/name.iteration.block3.scope @@ -0,0 +1,45 @@ +void main() { + if (true) { } + else if (false) { } + else { } +} +--- + +[#1 Content] = +[#1 Domain] = 0:0-4:1 + >------------- +0| void main() { +1| if (true) { } +2| else if (false) { } +3| else { } +4| } + -< + + +[#2 Content] = +[#2 Domain] = 0:13-4:0 + > +0| void main() { +1| if (true) { } +2| else if (false) { } +3| else { } +4| } + < + + +[#3 Content] = +[#3 Domain] = 1:15-1:16 + >-< +1| if (true) { } + + +[#4 Content] = +[#4 Domain] = 2:21-2:22 + >-< +2| else if (false) { } + + +[#5 Content] = +[#5 Domain] = 3:10-3:11 + >-< +3| else { } diff --git a/data/fixtures/scopes/dart/name/name.iteration.block4.scope b/data/fixtures/scopes/dart/name/name.iteration.block4.scope new file mode 100644 index 0000000000..6dc77fd461 --- /dev/null +++ b/data/fixtures/scopes/dart/name/name.iteration.block4.scope @@ -0,0 +1,27 @@ +void main() { + while (true) { } +} +--- + +[#1 Content] = +[#1 Domain] = 0:0-2:1 + >------------- +0| void main() { +1| while (true) { } +2| } + -< + + +[#2 Content] = +[#2 Domain] = 0:13-2:0 + > +0| void main() { +1| while (true) { } +2| } + < + + +[#3 Content] = +[#3 Domain] = 1:18-1:19 + >-< +1| while (true) { } diff --git a/data/fixtures/scopes/dart/name/name.iteration.class.scope b/data/fixtures/scopes/dart/name/name.iteration.class.scope new file mode 100644 index 0000000000..a3ec5f3456 --- /dev/null +++ b/data/fixtures/scopes/dart/name/name.iteration.class.scope @@ -0,0 +1,13 @@ +class Foo { } +--- + +[#1 Content] = +[#1 Domain] = 0:0-0:13 + >-------------< +0| class Foo { } + + +[#2 Content] = +[#2 Domain] = 0:11-0:12 + >-< +0| class Foo { } diff --git a/data/fixtures/scopes/dart/name/name.iteration.document.scope b/data/fixtures/scopes/dart/name/name.iteration.document.scope new file mode 100644 index 0000000000..8441b73e49 --- /dev/null +++ b/data/fixtures/scopes/dart/name/name.iteration.document.scope @@ -0,0 +1,12 @@ + +var foo = 0; + +--- + +[Content] = +[Domain] = 0:0-2:0 + > +0| +1| var foo = 0; +2| + < diff --git a/data/fixtures/scopes/dart/name/name.iteration.enum.scope b/data/fixtures/scopes/dart/name/name.iteration.enum.scope new file mode 100644 index 0000000000..9034c4ee11 --- /dev/null +++ b/data/fixtures/scopes/dart/name/name.iteration.enum.scope @@ -0,0 +1,13 @@ +enum Foo { } +--- + +[#1 Content] = +[#1 Domain] = 0:0-0:12 + >------------< +0| enum Foo { } + + +[#2 Content] = +[#2 Domain] = 0:10-0:11 + >-< +0| enum Foo { } diff --git a/data/fixtures/scopes/dart/name/name.method.scope b/data/fixtures/scopes/dart/name/name.method.scope new file mode 100644 index 0000000000..04159d17da --- /dev/null +++ b/data/fixtures/scopes/dart/name/name.method.scope @@ -0,0 +1,45 @@ +class Foo { + void bar() {} +} +--- + +[#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-2:1 + >----------- +0| class Foo { +1| void bar() {} +2| } + -< + +[#1 Insertion delimiter] = " " + + +[#2 Content] = +[#2 Removal] = 1:13-1:16 + >---< +1| void bar() {} + +[#2 Leading delimiter] = 1:12-1:13 + >-< +1| void bar() {} + +[#2 Domain] = 1:8-1:21 + >-------------< +1| void bar() {} + +[#2 Insertion delimiter] = " " diff --git a/data/fixtures/scopes/dart/name/name.typeAlias.scope b/data/fixtures/scopes/dart/name/name.typeAlias.scope new file mode 100644 index 0000000000..a91d453657 --- /dev/null +++ b/data/fixtures/scopes/dart/name/name.typeAlias.scope @@ -0,0 +1,24 @@ +typedef Foo = int; +--- + +[Content] = 0:8-0:11 + >---< +0| typedef Foo = int; + +[Removal] = 0:0-0:14 + >--------------< +0| typedef Foo = int; + +[Leading delimiter] = 0:7-0:8 + >-< +0| typedef Foo = int; + +[Trailing delimiter] = 0:11-0:12 + >-< +0| typedef Foo = int; + +[Domain] = 0:0-0:18 + >------------------< +0| typedef Foo = int; + +[Insertion delimiter] = " " diff --git a/data/fixtures/scopes/dart/name/name.variable.initialized.scope b/data/fixtures/scopes/dart/name/name.variable.initialized.scope new file mode 100644 index 0000000000..5c026bff2c --- /dev/null +++ b/data/fixtures/scopes/dart/name/name.variable.initialized.scope @@ -0,0 +1,45 @@ +void main() { + var foo = 0; +} +--- + +[#1 Content] = +[#1 Removal] = 0:5-0:9 + >----< +0| void main() { + +[#1 Leading delimiter] = 0:4-0:5 + >-< +0| void main() { + +[#1 Domain] = 0:0-2:1 + >------------- +0| void main() { +1| var foo = 0; +2| } + -< + +[#1 Insertion delimiter] = " " + + +[#2 Content] = 1:8-1:11 + >---< +1| var foo = 0; + +[#2 Removal] = 1:4-1:14 + >----------< +1| var foo = 0; + +[#2 Leading delimiter] = 1:7-1:8 + >-< +1| var foo = 0; + +[#2 Trailing delimiter] = 1:11-1:12 + >-< +1| var foo = 0; + +[#2 Domain] = 1:4-1:16 + >------------< +1| var foo = 0; + +[#2 Insertion delimiter] = " " diff --git a/data/fixtures/scopes/dart/name/name.variable.uninitialized.scope b/data/fixtures/scopes/dart/name/name.variable.uninitialized.scope new file mode 100644 index 0000000000..4a6042d3e2 --- /dev/null +++ b/data/fixtures/scopes/dart/name/name.variable.uninitialized.scope @@ -0,0 +1,41 @@ +void main() { + var foo; +} +--- + +[#1 Content] = +[#1 Removal] = 0:5-0:9 + >----< +0| void main() { + +[#1 Leading delimiter] = 0:4-0:5 + >-< +0| void main() { + +[#1 Domain] = 0:0-2:1 + >------------- +0| void main() { +1| var foo; +2| } + -< + +[#1 Insertion delimiter] = " " + + +[#2 Content] = 1:8-1:11 + >---< +1| var foo; + +[#2 Removal] = 1:4-1:11 + >-------< +1| var foo; + +[#2 Leading delimiter] = 1:7-1:8 + >-< +1| var foo; + +[#2 Domain] = 1:4-1:12 + >--------< +1| var foo; + +[#2 Insertion delimiter] = " " diff --git a/data/fixtures/scopes/dart/namedFunction.constructor.scope b/data/fixtures/scopes/dart/namedFunction.constructor.scope new file mode 100644 index 0000000000..9564fe79ea --- /dev/null +++ b/data/fixtures/scopes/dart/namedFunction.constructor.scope @@ -0,0 +1,21 @@ +class Foo { + Foo() {} +} +--- + +[Content] = +[Domain] = 1:4-1:12 + >--------< +1| Foo() {} + +[Removal] = 1:0-2:0 + >------------ +1| Foo() {} +2| } + < + +[Leading delimiter] = 1:0-1:4 + >----< +1| Foo() {} + +[Insertion delimiter] = "\n\n" diff --git a/data/fixtures/scopes/dart/namedFunction.iteration.class.scope b/data/fixtures/scopes/dart/namedFunction.iteration.class.scope new file mode 100644 index 0000000000..a3ec5f3456 --- /dev/null +++ b/data/fixtures/scopes/dart/namedFunction.iteration.class.scope @@ -0,0 +1,13 @@ +class Foo { } +--- + +[#1 Content] = +[#1 Domain] = 0:0-0:13 + >-------------< +0| class Foo { } + + +[#2 Content] = +[#2 Domain] = 0:11-0:12 + >-< +0| class Foo { } diff --git a/data/fixtures/scopes/dart/namedFunction.iteration.document.scope b/data/fixtures/scopes/dart/namedFunction.iteration.document.scope new file mode 100644 index 0000000000..3196afd2bb --- /dev/null +++ b/data/fixtures/scopes/dart/namedFunction.iteration.document.scope @@ -0,0 +1,12 @@ + +void foo() {} + +--- + +[Content] = +[Domain] = 0:0-2:0 + > +0| +1| void foo() {} +2| + < diff --git a/data/fixtures/scopes/dart/namedFunction.method.scope b/data/fixtures/scopes/dart/namedFunction.method.scope new file mode 100644 index 0000000000..12d3e4a8d2 --- /dev/null +++ b/data/fixtures/scopes/dart/namedFunction.method.scope @@ -0,0 +1,21 @@ +class Foo { + void bar() {} +} +--- + +[Content] = +[Domain] = 1:4-1:17 + >-------------< +1| void bar() {} + +[Removal] = 1:0-2:0 + >----------------- +1| void bar() {} +2| } + < + +[Leading delimiter] = 1:0-1:4 + >----< +1| void bar() {} + +[Insertion delimiter] = "\n\n" diff --git a/data/fixtures/scopes/dart/namedFunction.scope b/data/fixtures/scopes/dart/namedFunction.scope new file mode 100644 index 0000000000..49b1c64940 --- /dev/null +++ b/data/fixtures/scopes/dart/namedFunction.scope @@ -0,0 +1,10 @@ +void foo() {} +--- + +[Content] = +[Removal] = +[Domain] = 0:0-0:13 + >-------------< +0| void foo() {} + +[Insertion delimiter] = "\n\n" diff --git a/data/fixtures/scopes/dart/statement/statement.assignment.compound.scope b/data/fixtures/scopes/dart/statement/statement.assignment.compound.scope new file mode 100644 index 0000000000..5116ead019 --- /dev/null +++ b/data/fixtures/scopes/dart/statement/statement.assignment.compound.scope @@ -0,0 +1,33 @@ +void main() { + foo += 0; +} +--- + +[#1 Content] = +[#1 Removal] = +[#1 Domain] = 0:0-2:1 + >------------- +0| void main() { +1| foo += 0; +2| } + -< + +[#1 Insertion delimiter] = "\n" + + +[#2 Content] = +[#2 Domain] = 1:4-1:13 + >---------< +1| foo += 0; + +[#2 Removal] = 1:0-2:0 + >------------- +1| foo += 0; +2| } + < + +[#2 Leading delimiter] = 1:0-1:4 + >----< +1| foo += 0; + +[#2 Insertion delimiter] = "\n" diff --git a/data/fixtures/scopes/dart/statement/statement.assignment.scope b/data/fixtures/scopes/dart/statement/statement.assignment.scope new file mode 100644 index 0000000000..d7b1217b39 --- /dev/null +++ b/data/fixtures/scopes/dart/statement/statement.assignment.scope @@ -0,0 +1,33 @@ +void main() { + foo = 0; +} +--- + +[#1 Content] = +[#1 Removal] = +[#1 Domain] = 0:0-2:1 + >------------- +0| void main() { +1| foo = 0; +2| } + -< + +[#1 Insertion delimiter] = "\n" + + +[#2 Content] = +[#2 Domain] = 1:4-1:12 + >--------< +1| foo = 0; + +[#2 Removal] = 1:0-2:0 + >------------ +1| foo = 0; +2| } + < + +[#2 Leading delimiter] = 1:0-1:4 + >----< +1| foo = 0; + +[#2 Insertion delimiter] = "\n" diff --git a/data/fixtures/scopes/dart/statement/statement.break.scope b/data/fixtures/scopes/dart/statement/statement.break.scope new file mode 100644 index 0000000000..c09d642464 --- /dev/null +++ b/data/fixtures/scopes/dart/statement/statement.break.scope @@ -0,0 +1,60 @@ +void main() { + while (true) { + break; + } +} +--- + +[#1 Content] = +[#1 Removal] = +[#1 Domain] = 0:0-4:1 + >------------- +0| void main() { +1| while (true) { +2| break; +3| } +4| } + -< + +[#1 Insertion delimiter] = "\n" + + +[#2 Content] = +[#2 Domain] = 1:4-3:5 + >-------------- +1| while (true) { +2| break; +3| } + -----< + +[#2 Removal] = 1:0-4:0 + >------------------ +1| while (true) { +2| break; +3| } +4| } + < + +[#2 Leading delimiter] = 1:0-1:4 + >----< +1| while (true) { + +[#2 Insertion delimiter] = "\n" + + +[#3 Content] = +[#3 Domain] = 2:8-2:14 + >------< +2| break; + +[#3 Removal] = 2:0-3:0 + >-------------- +2| break; +3| } + < + +[#3 Leading delimiter] = 2:0-2:8 + >--------< +2| break; + +[#3 Insertion delimiter] = "\n" diff --git a/data/fixtures/scopes/dart/statement/statement.class.scope b/data/fixtures/scopes/dart/statement/statement.class.scope new file mode 100644 index 0000000000..a6008d311f --- /dev/null +++ b/data/fixtures/scopes/dart/statement/statement.class.scope @@ -0,0 +1,10 @@ +class Foo {} +--- + +[Content] = +[Removal] = +[Domain] = 0:0-0:12 + >------------< +0| class Foo {} + +[Insertion delimiter] = "\n" diff --git a/data/fixtures/scopes/dart/statement/statement.constant.scope b/data/fixtures/scopes/dart/statement/statement.constant.scope new file mode 100644 index 0000000000..9ec6744100 --- /dev/null +++ b/data/fixtures/scopes/dart/statement/statement.constant.scope @@ -0,0 +1,10 @@ +const foo = 0; +--- + +[Content] = +[Removal] = +[Domain] = 0:0-0:14 + >--------------< +0| const foo = 0; + +[Insertion delimiter] = "\n" diff --git a/data/fixtures/scopes/dart/statement/statement.constructor.scope b/data/fixtures/scopes/dart/statement/statement.constructor.scope new file mode 100644 index 0000000000..00eb2f573a --- /dev/null +++ b/data/fixtures/scopes/dart/statement/statement.constructor.scope @@ -0,0 +1,33 @@ +class Foo { + Foo() {} +} +--- + +[#1 Content] = +[#1 Removal] = +[#1 Domain] = 0:0-2:1 + >----------- +0| class Foo { +1| Foo() {} +2| } + -< + +[#1 Insertion delimiter] = "\n" + + +[#2 Content] = +[#2 Domain] = 1:8-1:16 + >--------< +1| Foo() {} + +[#2 Removal] = 1:0-2:0 + >---------------- +1| Foo() {} +2| } + < + +[#2 Leading delimiter] = 1:0-1:8 + >--------< +1| Foo() {} + +[#2 Insertion delimiter] = "\n" diff --git a/data/fixtures/scopes/dart/statement/statement.continue.scope b/data/fixtures/scopes/dart/statement/statement.continue.scope new file mode 100644 index 0000000000..325abbc91e --- /dev/null +++ b/data/fixtures/scopes/dart/statement/statement.continue.scope @@ -0,0 +1,60 @@ +void main() { + while (true) { + continue; + } +} +--- + +[#1 Content] = +[#1 Removal] = +[#1 Domain] = 0:0-4:1 + >------------- +0| void main() { +1| while (true) { +2| continue; +3| } +4| } + -< + +[#1 Insertion delimiter] = "\n" + + +[#2 Content] = +[#2 Domain] = 1:4-3:5 + >-------------- +1| while (true) { +2| continue; +3| } + -----< + +[#2 Removal] = 1:0-4:0 + >------------------ +1| while (true) { +2| continue; +3| } +4| } + < + +[#2 Leading delimiter] = 1:0-1:4 + >----< +1| while (true) { + +[#2 Insertion delimiter] = "\n" + + +[#3 Content] = +[#3 Domain] = 2:8-2:17 + >---------< +2| continue; + +[#3 Removal] = 2:0-3:0 + >----------------- +2| continue; +3| } + < + +[#3 Leading delimiter] = 2:0-2:8 + >--------< +2| continue; + +[#3 Insertion delimiter] = "\n" diff --git a/data/fixtures/scopes/dart/statement/statement.doWhile.scope b/data/fixtures/scopes/dart/statement/statement.doWhile.scope new file mode 100644 index 0000000000..19a64d7645 --- /dev/null +++ b/data/fixtures/scopes/dart/statement/statement.doWhile.scope @@ -0,0 +1,33 @@ +void main() { + do {} while (true); +} +--- + +[#1 Content] = +[#1 Removal] = +[#1 Domain] = 0:0-2:1 + >------------- +0| void main() { +1| do {} while (true); +2| } + -< + +[#1 Insertion delimiter] = "\n" + + +[#2 Content] = +[#2 Domain] = 1:4-1:23 + >-------------------< +1| do {} while (true); + +[#2 Removal] = 1:0-2:0 + >----------------------- +1| do {} while (true); +2| } + < + +[#2 Leading delimiter] = 1:0-1:4 + >----< +1| do {} while (true); + +[#2 Insertion delimiter] = "\n" diff --git a/data/fixtures/scopes/dart/statement/statement.enum.scope b/data/fixtures/scopes/dart/statement/statement.enum.scope new file mode 100644 index 0000000000..88dd9cd028 --- /dev/null +++ b/data/fixtures/scopes/dart/statement/statement.enum.scope @@ -0,0 +1,10 @@ +enum Foo {} +--- + +[Content] = +[Removal] = +[Domain] = 0:0-0:11 + >-----------< +0| enum Foo {} + +[Insertion delimiter] = "\n" diff --git a/data/fixtures/scopes/dart/statement/statement.field.class.scope b/data/fixtures/scopes/dart/statement/statement.field.class.scope new file mode 100644 index 0000000000..d64dff1a16 --- /dev/null +++ b/data/fixtures/scopes/dart/statement/statement.field.class.scope @@ -0,0 +1,53 @@ +class Foo { + var bar; + var baz = 0; +} +--- + +[#1 Content] = +[#1 Removal] = +[#1 Domain] = 0:0-3:1 + >----------- +0| class Foo { +1| var bar; +2| var baz = 0; +3| } + -< + +[#1 Insertion delimiter] = "\n" + + +[#2 Content] = +[#2 Domain] = 1:4-1:12 + >--------< +1| var bar; + +[#2 Removal] = 1:0-2:0 + >------------ +1| var bar; +2| var baz = 0; + < + +[#2 Leading delimiter] = 1:0-1:4 + >----< +1| var bar; + +[#2 Insertion delimiter] = "\n" + + +[#3 Content] = +[#3 Domain] = 2:4-2:16 + >------------< +2| var baz = 0; + +[#3 Removal] = 2:0-3:0 + >---------------- +2| var baz = 0; +3| } + < + +[#3 Leading delimiter] = 2:0-2:4 + >----< +2| var baz = 0; + +[#3 Insertion delimiter] = "\n" diff --git a/data/fixtures/scopes/dart/statement/statement.for.scope b/data/fixtures/scopes/dart/statement/statement.for.scope new file mode 100644 index 0000000000..e4b7c80097 --- /dev/null +++ b/data/fixtures/scopes/dart/statement/statement.for.scope @@ -0,0 +1,33 @@ +void main() { + for (var i = 0; i < size; i++) {} +} +--- + +[#1 Content] = +[#1 Removal] = +[#1 Domain] = 0:0-2:1 + >------------- +0| void main() { +1| for (var i = 0; i < size; i++) {} +2| } + -< + +[#1 Insertion delimiter] = "\n" + + +[#2 Content] = +[#2 Domain] = 1:4-1:37 + >---------------------------------< +1| for (var i = 0; i < size; i++) {} + +[#2 Removal] = 1:0-2:0 + >------------------------------------- +1| for (var i = 0; i < size; i++) {} +2| } + < + +[#2 Leading delimiter] = 1:0-1:4 + >----< +1| for (var i = 0; i < size; i++) {} + +[#2 Insertion delimiter] = "\n" diff --git a/data/fixtures/scopes/dart/statement/statement.foreach.scope b/data/fixtures/scopes/dart/statement/statement.foreach.scope new file mode 100644 index 0000000000..9faabe280b --- /dev/null +++ b/data/fixtures/scopes/dart/statement/statement.foreach.scope @@ -0,0 +1,33 @@ +void main() { + for (final v in values) {} +} +--- + +[#1 Content] = +[#1 Removal] = +[#1 Domain] = 0:0-2:1 + >------------- +0| void main() { +1| for (final v in values) {} +2| } + -< + +[#1 Insertion delimiter] = "\n" + + +[#2 Content] = +[#2 Domain] = 1:4-1:30 + >--------------------------< +1| for (final v in values) {} + +[#2 Removal] = 1:0-2:0 + >------------------------------ +1| for (final v in values) {} +2| } + < + +[#2 Leading delimiter] = 1:0-1:4 + >----< +1| for (final v in values) {} + +[#2 Insertion delimiter] = "\n" diff --git a/data/fixtures/scopes/dart/statement/statement.function.scope b/data/fixtures/scopes/dart/statement/statement.function.scope new file mode 100644 index 0000000000..1eb8467630 --- /dev/null +++ b/data/fixtures/scopes/dart/statement/statement.function.scope @@ -0,0 +1,10 @@ +void foo() {} +--- + +[Content] = +[Removal] = +[Domain] = 0:0-0:13 + >-------------< +0| void foo() {} + +[Insertion delimiter] = "\n" diff --git a/data/fixtures/scopes/dart/statement/statement.functionCall.scope b/data/fixtures/scopes/dart/statement/statement.functionCall.scope new file mode 100644 index 0000000000..067de83895 --- /dev/null +++ b/data/fixtures/scopes/dart/statement/statement.functionCall.scope @@ -0,0 +1,33 @@ +void main() { + bar(); +} +--- + +[#1 Content] = +[#1 Removal] = +[#1 Domain] = 0:0-2:1 + >------------- +0| void main() { +1| bar(); +2| } + -< + +[#1 Insertion delimiter] = "\n" + + +[#2 Content] = +[#2 Domain] = 1:4-1:10 + >------< +1| bar(); + +[#2 Removal] = 1:0-2:0 + >---------- +1| bar(); +2| } + < + +[#2 Leading delimiter] = 1:0-1:4 + >----< +1| bar(); + +[#2 Insertion delimiter] = "\n" diff --git a/data/fixtures/scopes/dart/statement/statement.if.scope b/data/fixtures/scopes/dart/statement/statement.if.scope new file mode 100644 index 0000000000..e0e344f9e2 --- /dev/null +++ b/data/fixtures/scopes/dart/statement/statement.if.scope @@ -0,0 +1,42 @@ +void main() { + if (true) {} + else if (false) {} + else {} +} +--- + +[#1 Content] = +[#1 Removal] = +[#1 Domain] = 0:0-4:1 + >------------- +0| void main() { +1| if (true) {} +2| else if (false) {} +3| else {} +4| } + -< + +[#1 Insertion delimiter] = "\n" + + +[#2 Content] = +[#2 Domain] = 1:4-3:11 + >------------ +1| if (true) {} +2| else if (false) {} +3| else {} + -----------< + +[#2 Removal] = 1:0-4:0 + >---------------- +1| if (true) {} +2| else if (false) {} +3| else {} +4| } + < + +[#2 Leading delimiter] = 1:0-1:4 + >----< +1| if (true) {} + +[#2 Insertion delimiter] = "\n" diff --git a/data/fixtures/scopes/dart/statement/statement.import.scope b/data/fixtures/scopes/dart/statement/statement.import.scope new file mode 100644 index 0000000000..1a0431ca60 --- /dev/null +++ b/data/fixtures/scopes/dart/statement/statement.import.scope @@ -0,0 +1,10 @@ +import "foo.dart"; +--- + +[Content] = +[Removal] = +[Domain] = 0:0-0:18 + >------------------< +0| import "foo.dart"; + +[Insertion delimiter] = "\n" diff --git a/data/fixtures/scopes/dart/statement/statement.iteration.block.scope b/data/fixtures/scopes/dart/statement/statement.iteration.block.scope new file mode 100644 index 0000000000..5768db5310 --- /dev/null +++ b/data/fixtures/scopes/dart/statement/statement.iteration.block.scope @@ -0,0 +1,27 @@ +class Foo { + void bar() { } +} +--- + +[#1 Content] = +[#1 Domain] = 0:0-2:1 + >----------- +0| class Foo { +1| void bar() { } +2| } + -< + + +[#2 Content] = +[#2 Domain] = 0:11-2:0 + > +0| class Foo { +1| void bar() { } +2| } + < + + +[#3 Content] = +[#3 Domain] = 1:16-1:17 + >-< +1| void bar() { } diff --git a/data/fixtures/scopes/dart/statement/statement.iteration.block2.scope b/data/fixtures/scopes/dart/statement/statement.iteration.block2.scope new file mode 100644 index 0000000000..ea20927c6d --- /dev/null +++ b/data/fixtures/scopes/dart/statement/statement.iteration.block2.scope @@ -0,0 +1,13 @@ +void foo() { } +--- + +[#1 Content] = +[#1 Domain] = 0:0-0:14 + >--------------< +0| void foo() { } + + +[#2 Content] = +[#2 Domain] = 0:12-0:13 + >-< +0| void foo() { } diff --git a/data/fixtures/scopes/dart/statement/statement.iteration.block3.scope b/data/fixtures/scopes/dart/statement/statement.iteration.block3.scope new file mode 100644 index 0000000000..c1543e41aa --- /dev/null +++ b/data/fixtures/scopes/dart/statement/statement.iteration.block3.scope @@ -0,0 +1,45 @@ +void main() { + if (true) { } + else if (false) { } + else { } +} +--- + +[#1 Content] = +[#1 Domain] = 0:0-4:1 + >------------- +0| void main() { +1| if (true) { } +2| else if (false) { } +3| else { } +4| } + -< + + +[#2 Content] = +[#2 Domain] = 0:13-4:0 + > +0| void main() { +1| if (true) { } +2| else if (false) { } +3| else { } +4| } + < + + +[#3 Content] = +[#3 Domain] = 1:15-1:16 + >-< +1| if (true) { } + + +[#4 Content] = +[#4 Domain] = 2:21-2:22 + >-< +2| else if (false) { } + + +[#5 Content] = +[#5 Domain] = 3:10-3:11 + >-< +3| else { } diff --git a/data/fixtures/scopes/dart/statement/statement.iteration.block4.scope b/data/fixtures/scopes/dart/statement/statement.iteration.block4.scope new file mode 100644 index 0000000000..6dc77fd461 --- /dev/null +++ b/data/fixtures/scopes/dart/statement/statement.iteration.block4.scope @@ -0,0 +1,27 @@ +void main() { + while (true) { } +} +--- + +[#1 Content] = +[#1 Domain] = 0:0-2:1 + >------------- +0| void main() { +1| while (true) { } +2| } + -< + + +[#2 Content] = +[#2 Domain] = 0:13-2:0 + > +0| void main() { +1| while (true) { } +2| } + < + + +[#3 Content] = +[#3 Domain] = 1:18-1:19 + >-< +1| while (true) { } diff --git a/data/fixtures/scopes/dart/statement/statement.iteration.class.scope b/data/fixtures/scopes/dart/statement/statement.iteration.class.scope new file mode 100644 index 0000000000..a3ec5f3456 --- /dev/null +++ b/data/fixtures/scopes/dart/statement/statement.iteration.class.scope @@ -0,0 +1,13 @@ +class Foo { } +--- + +[#1 Content] = +[#1 Domain] = 0:0-0:13 + >-------------< +0| class Foo { } + + +[#2 Content] = +[#2 Domain] = 0:11-0:12 + >-< +0| class Foo { } diff --git a/data/fixtures/scopes/dart/statement/statement.iteration.document.scope b/data/fixtures/scopes/dart/statement/statement.iteration.document.scope new file mode 100644 index 0000000000..8441b73e49 --- /dev/null +++ b/data/fixtures/scopes/dart/statement/statement.iteration.document.scope @@ -0,0 +1,12 @@ + +var foo = 0; + +--- + +[Content] = +[Domain] = 0:0-2:0 + > +0| +1| var foo = 0; +2| + < diff --git a/data/fixtures/scopes/dart/statement/statement.method.scope b/data/fixtures/scopes/dart/statement/statement.method.scope new file mode 100644 index 0000000000..16d0cf1c55 --- /dev/null +++ b/data/fixtures/scopes/dart/statement/statement.method.scope @@ -0,0 +1,33 @@ +class Foo { + void bar() {} +} +--- + +[#1 Content] = +[#1 Removal] = +[#1 Domain] = 0:0-2:1 + >----------- +0| class Foo { +1| void bar() {} +2| } + -< + +[#1 Insertion delimiter] = "\n" + + +[#2 Content] = +[#2 Domain] = 1:4-1:17 + >-------------< +1| void bar() {} + +[#2 Removal] = 1:0-2:0 + >----------------- +1| void bar() {} +2| } + < + +[#2 Leading delimiter] = 1:0-1:4 + >----< +1| void bar() {} + +[#2 Insertion delimiter] = "\n" diff --git a/data/fixtures/scopes/dart/statement/statement.return.scope b/data/fixtures/scopes/dart/statement/statement.return.scope new file mode 100644 index 0000000000..c112156b09 --- /dev/null +++ b/data/fixtures/scopes/dart/statement/statement.return.scope @@ -0,0 +1,33 @@ +void foo() { + return 0; +} +--- + +[#1 Content] = +[#1 Removal] = +[#1 Domain] = 0:0-2:1 + >------------ +0| void foo() { +1| return 0; +2| } + -< + +[#1 Insertion delimiter] = "\n" + + +[#2 Content] = +[#2 Domain] = 1:8-1:17 + >---------< +1| return 0; + +[#2 Removal] = 1:0-2:0 + >----------------- +1| return 0; +2| } + < + +[#2 Leading delimiter] = 1:0-1:8 + >--------< +1| return 0; + +[#2 Insertion delimiter] = "\n" diff --git a/data/fixtures/scopes/dart/statement/statement.switch.scope b/data/fixtures/scopes/dart/statement/statement.switch.scope new file mode 100644 index 0000000000..64f49d00cb --- /dev/null +++ b/data/fixtures/scopes/dart/statement/statement.switch.scope @@ -0,0 +1,33 @@ +void main() { + switch (foo) {} +} +--- + +[#1 Content] = +[#1 Removal] = +[#1 Domain] = 0:0-2:1 + >------------- +0| void main() { +1| switch (foo) {} +2| } + -< + +[#1 Insertion delimiter] = "\n" + + +[#2 Content] = +[#2 Domain] = 1:4-1:19 + >---------------< +1| switch (foo) {} + +[#2 Removal] = 1:0-2:0 + >------------------- +1| switch (foo) {} +2| } + < + +[#2 Leading delimiter] = 1:0-1:4 + >----< +1| switch (foo) {} + +[#2 Insertion delimiter] = "\n" diff --git a/data/fixtures/scopes/dart/statement/statement.throw.scope b/data/fixtures/scopes/dart/statement/statement.throw.scope new file mode 100644 index 0000000000..b9316d96ac --- /dev/null +++ b/data/fixtures/scopes/dart/statement/statement.throw.scope @@ -0,0 +1,33 @@ +void main() { + throw foo; +} +--- + +[#1 Content] = +[#1 Removal] = +[#1 Domain] = 0:0-2:1 + >------------- +0| void main() { +1| throw foo; +2| } + -< + +[#1 Insertion delimiter] = "\n" + + +[#2 Content] = +[#2 Domain] = 1:4-1:14 + >----------< +1| throw foo; + +[#2 Removal] = 1:0-2:0 + >-------------- +1| throw foo; +2| } + < + +[#2 Leading delimiter] = 1:0-1:4 + >----< +1| throw foo; + +[#2 Insertion delimiter] = "\n" diff --git a/data/fixtures/scopes/dart/statement/statement.try.scope b/data/fixtures/scopes/dart/statement/statement.try.scope new file mode 100644 index 0000000000..44e61b7f73 --- /dev/null +++ b/data/fixtures/scopes/dart/statement/statement.try.scope @@ -0,0 +1,42 @@ +void main() { + try {} + catch (e) {} + finally {} +} +--- + +[#1 Content] = +[#1 Removal] = +[#1 Domain] = 0:0-4:1 + >------------- +0| void main() { +1| try {} +2| catch (e) {} +3| finally {} +4| } + -< + +[#1 Insertion delimiter] = "\n" + + +[#2 Content] = +[#2 Domain] = 1:4-3:14 + >------ +1| try {} +2| catch (e) {} +3| finally {} + --------------< + +[#2 Removal] = 1:0-4:0 + >---------- +1| try {} +2| catch (e) {} +3| finally {} +4| } + < + +[#2 Leading delimiter] = 1:0-1:4 + >----< +1| try {} + +[#2 Insertion delimiter] = "\n" diff --git a/data/fixtures/scopes/dart/statement/statement.typeAlias.scope b/data/fixtures/scopes/dart/statement/statement.typeAlias.scope new file mode 100644 index 0000000000..fb726c3afa --- /dev/null +++ b/data/fixtures/scopes/dart/statement/statement.typeAlias.scope @@ -0,0 +1,10 @@ +typedef Foo = int; +--- + +[Content] = +[Removal] = +[Domain] = 0:0-0:18 + >------------------< +0| typedef Foo = int; + +[Insertion delimiter] = "\n" diff --git a/data/fixtures/scopes/dart/statement/statement.update.scope b/data/fixtures/scopes/dart/statement/statement.update.scope new file mode 100644 index 0000000000..6013c7dcd9 --- /dev/null +++ b/data/fixtures/scopes/dart/statement/statement.update.scope @@ -0,0 +1,33 @@ +void main() { + foo++; +} +--- + +[#1 Content] = +[#1 Removal] = +[#1 Domain] = 0:0-2:1 + >------------- +0| void main() { +1| foo++; +2| } + -< + +[#1 Insertion delimiter] = "\n" + + +[#2 Content] = +[#2 Domain] = 1:4-1:10 + >------< +1| foo++; + +[#2 Removal] = 1:0-2:0 + >---------- +1| foo++; +2| } + < + +[#2 Leading delimiter] = 1:0-1:4 + >----< +1| foo++; + +[#2 Insertion delimiter] = "\n" diff --git a/data/fixtures/scopes/dart/statement/statement.variable.initialized.scope b/data/fixtures/scopes/dart/statement/statement.variable.initialized.scope new file mode 100644 index 0000000000..32ef60bdee --- /dev/null +++ b/data/fixtures/scopes/dart/statement/statement.variable.initialized.scope @@ -0,0 +1,33 @@ +void main() { + var foo = 0; +} +--- + +[#1 Content] = +[#1 Removal] = +[#1 Domain] = 0:0-2:1 + >------------- +0| void main() { +1| var foo = 0; +2| } + -< + +[#1 Insertion delimiter] = "\n" + + +[#2 Content] = +[#2 Domain] = 1:4-1:16 + >------------< +1| var foo = 0; + +[#2 Removal] = 1:0-2:0 + >---------------- +1| var foo = 0; +2| } + < + +[#2 Leading delimiter] = 1:0-1:4 + >----< +1| var foo = 0; + +[#2 Insertion delimiter] = "\n" diff --git a/data/fixtures/scopes/dart/statement/statement.variable.uninitialized.scope b/data/fixtures/scopes/dart/statement/statement.variable.uninitialized.scope new file mode 100644 index 0000000000..8e3b2a81fa --- /dev/null +++ b/data/fixtures/scopes/dart/statement/statement.variable.uninitialized.scope @@ -0,0 +1,33 @@ +void main() { + var foo; +} +--- + +[#1 Content] = +[#1 Removal] = +[#1 Domain] = 0:0-2:1 + >------------- +0| void main() { +1| var foo; +2| } + -< + +[#1 Insertion delimiter] = "\n" + + +[#2 Content] = +[#2 Domain] = 1:4-1:12 + >--------< +1| var foo; + +[#2 Removal] = 1:0-2:0 + >------------ +1| var foo; +2| } + < + +[#2 Leading delimiter] = 1:0-1:4 + >----< +1| var foo; + +[#2 Insertion delimiter] = "\n" diff --git a/data/fixtures/scopes/dart/statement/statement.while.scope b/data/fixtures/scopes/dart/statement/statement.while.scope new file mode 100644 index 0000000000..4f509bb925 --- /dev/null +++ b/data/fixtures/scopes/dart/statement/statement.while.scope @@ -0,0 +1,33 @@ +void main() { + while (true) {} +} +--- + +[#1 Content] = +[#1 Removal] = +[#1 Domain] = 0:0-2:1 + >------------- +0| void main() { +1| while (true) {} +2| } + -< + +[#1 Insertion delimiter] = "\n" + + +[#2 Content] = +[#2 Domain] = 1:4-1:19 + >---------------< +1| while (true) {} + +[#2 Removal] = 1:0-2:0 + >------------------- +1| while (true) {} +2| } + < + +[#2 Leading delimiter] = 1:0-1:4 + >----< +1| while (true) {} + +[#2 Insertion delimiter] = "\n" diff --git a/data/fixtures/scopes/dart/statement/statement.yield.scope b/data/fixtures/scopes/dart/statement/statement.yield.scope new file mode 100644 index 0000000000..7aa11d778e --- /dev/null +++ b/data/fixtures/scopes/dart/statement/statement.yield.scope @@ -0,0 +1,33 @@ +void main() { + yield 0; +} +--- + +[#1 Content] = +[#1 Removal] = +[#1 Domain] = 0:0-2:1 + >------------- +0| void main() { +1| yield 0; +2| } + -< + +[#1 Insertion delimiter] = "\n" + + +[#2 Content] = +[#2 Domain] = 1:4-1:12 + >--------< +1| yield 0; + +[#2 Removal] = 1:0-2:0 + >------------ +1| yield 0; +2| } + < + +[#2 Leading delimiter] = 1:0-1:4 + >----< +1| yield 0; + +[#2 Insertion delimiter] = "\n" diff --git a/data/fixtures/scopes/dart/string.multiLine.scope b/data/fixtures/scopes/dart/string.multiLine.scope new file mode 100644 index 0000000000..b8802dda48 --- /dev/null +++ b/data/fixtures/scopes/dart/string.multiLine.scope @@ -0,0 +1,22 @@ +var foo = """Hello +world"""; +--- + +[Content] = +[Domain] = 0:10-1:8 + >-------- +0| var foo = """Hello +1| world"""; + --------< + +[Removal] = 0:9-1:8 + >--------- +0| var foo = """Hello +1| world"""; + --------< + +[Leading delimiter] = 0:9-0:10 + >-< +0| var foo = """Hello + +[Insertion delimiter] = " " diff --git a/data/fixtures/scopes/dart/string.singleLine.scope b/data/fixtures/scopes/dart/string.singleLine.scope new file mode 100644 index 0000000000..f164d6069c --- /dev/null +++ b/data/fixtures/scopes/dart/string.singleLine.scope @@ -0,0 +1,17 @@ +var foo = "Hello world"; +--- + +[Content] = +[Domain] = 0:10-0:23 + >-------------< +0| var foo = "Hello world"; + +[Removal] = 0:9-0:23 + >--------------< +0| var foo = "Hello world"; + +[Leading delimiter] = 0:9-0:10 + >-< +0| var foo = "Hello world"; + +[Insertion delimiter] = " " diff --git a/data/fixtures/scopes/dart/textFragment.comment.block.scope b/data/fixtures/scopes/dart/textFragment.comment.block.scope new file mode 100644 index 0000000000..af33f95d00 --- /dev/null +++ b/data/fixtures/scopes/dart/textFragment.comment.block.scope @@ -0,0 +1,10 @@ +/* Hello world */ +--- + +[Content] = +[Removal] = +[Domain] = 0:0-0:17 + >-----------------< +0| /* Hello world */ + +[Insertion delimiter] = " " diff --git a/data/fixtures/scopes/dart/textFragment.comment.line.scope b/data/fixtures/scopes/dart/textFragment.comment.line.scope new file mode 100644 index 0000000000..6758f81490 --- /dev/null +++ b/data/fixtures/scopes/dart/textFragment.comment.line.scope @@ -0,0 +1,10 @@ +// Hello world +--- + +[Content] = +[Removal] = +[Domain] = 0:0-0:14 + >--------------< +0| // Hello world + +[Insertion delimiter] = " " diff --git a/data/fixtures/scopes/dart/textFragment.string.multiLine.scope b/data/fixtures/scopes/dart/textFragment.string.multiLine.scope new file mode 100644 index 0000000000..d37fb937d1 --- /dev/null +++ b/data/fixtures/scopes/dart/textFragment.string.multiLine.scope @@ -0,0 +1,13 @@ +var foo = """Hello +world"""; +--- + +[Content] = +[Removal] = +[Domain] = 0:13-1:5 + >----- +0| var foo = """Hello +1| world"""; + -----< + +[Insertion delimiter] = " " diff --git a/data/fixtures/scopes/dart/textFragment.string.singleLine.scope b/data/fixtures/scopes/dart/textFragment.string.singleLine.scope new file mode 100644 index 0000000000..5763e26b3a --- /dev/null +++ b/data/fixtures/scopes/dart/textFragment.string.singleLine.scope @@ -0,0 +1,10 @@ +var foo = "Hello world"; +--- + +[Content] = +[Removal] = +[Domain] = 0:11-0:22 + >-----------< +0| var foo = "Hello world"; + +[Insertion delimiter] = " " diff --git a/data/fixtures/scopes/dart/type/type.alias.scope b/data/fixtures/scopes/dart/type/type.alias.scope new file mode 100644 index 0000000000..5176c25ab9 --- /dev/null +++ b/data/fixtures/scopes/dart/type/type.alias.scope @@ -0,0 +1,10 @@ +typedef Foo = int; +--- + +[Content] = +[Removal] = +[Domain] = 0:0-0:18 + >------------------< +0| typedef Foo = int; + +[Insertion delimiter] = " " diff --git a/data/fixtures/scopes/dart/type/type.argument.catch.scope b/data/fixtures/scopes/dart/type/type.argument.catch.scope new file mode 100644 index 0000000000..96c85e1e02 --- /dev/null +++ b/data/fixtures/scopes/dart/type/type.argument.catch.scope @@ -0,0 +1,47 @@ +void main() { + try {} + on Exception catch (e) {} +} +--- + +[#1 Content] = 0:0-0:4 + >----< +0| void main() { + +[#1 Removal] = 0:0-0:5 + >-----< +0| void main() { + +[#1 Trailing delimiter] = 0:4-0:5 + >-< +0| void main() { + +[#1 Domain] = 0:0-3:1 + >------------- +0| void main() { +1| try {} +2| on Exception catch (e) {} +3| } + -< + +[#1 Insertion delimiter] = " " + + +[#2 Content] = +[#2 Domain] = 2:7-2:16 + >---------< +2| on Exception catch (e) {} + +[#2 Removal] = 2:7-2:17 + >----------< +2| on Exception catch (e) {} + +[#2 Leading delimiter] = 2:6-2:7 + >-< +2| on Exception catch (e) {} + +[#2 Trailing delimiter] = 2:16-2:17 + >-< +2| on Exception catch (e) {} + +[#2 Insertion delimiter] = " " diff --git a/data/fixtures/scopes/dart/type/type.argument.formal.constructor.iteration.scope b/data/fixtures/scopes/dart/type/type.argument.formal.constructor.iteration.scope new file mode 100644 index 0000000000..3d0157d69a --- /dev/null +++ b/data/fixtures/scopes/dart/type/type.argument.formal.constructor.iteration.scope @@ -0,0 +1,27 @@ +class Foo { + Foo(int aaa, [int bbb = 0]) {} +} +--- + +[#1 Content] = +[#1 Domain] = 0:0-2:1 + >----------- +0| class Foo { +1| Foo(int aaa, [int bbb = 0]) {} +2| } + -< + + +[#2 Content] = +[#2 Domain] = 0:11-2:0 + > +0| class Foo { +1| Foo(int aaa, [int bbb = 0]) {} +2| } + < + + +[#3 Content] = +[#3 Domain] = 1:8-1:30 + >----------------------< +1| Foo(int aaa, [int bbb = 0]) {} diff --git a/data/fixtures/scopes/dart/type/type.argument.formal.constructor.scope b/data/fixtures/scopes/dart/type/type.argument.formal.constructor.scope new file mode 100644 index 0000000000..dc735e99bd --- /dev/null +++ b/data/fixtures/scopes/dart/type/type.argument.formal.constructor.scope @@ -0,0 +1,53 @@ +class Foo { + Foo(int aaa, [int bbb = 0]) {} +} +--- + +[#1 Content] = +[#1 Removal] = +[#1 Domain] = 0:0-2:1 + >----------- +0| class Foo { +1| Foo(int aaa, [int bbb = 0]) {} +2| } + -< + +[#1 Insertion delimiter] = " " + + +[#2 Content] = 1:8-1:11 + >---< +1| Foo(int aaa, [int bbb = 0]) {} + +[#2 Removal] = 1:8-1:12 + >----< +1| Foo(int aaa, [int bbb = 0]) {} + +[#2 Trailing delimiter] = 1:11-1:12 + >-< +1| Foo(int aaa, [int bbb = 0]) {} + +[#2 Domain] = 1:8-1:15 + >-------< +1| Foo(int aaa, [int bbb = 0]) {} + +[#2 Insertion delimiter] = " " + + +[#3 Content] = 1:18-1:21 + >---< +1| Foo(int aaa, [int bbb = 0]) {} + +[#3 Removal] = 1:18-1:22 + >----< +1| Foo(int aaa, [int bbb = 0]) {} + +[#3 Trailing delimiter] = 1:21-1:22 + >-< +1| Foo(int aaa, [int bbb = 0]) {} + +[#3 Domain] = 1:18-1:29 + >-----------< +1| Foo(int aaa, [int bbb = 0]) {} + +[#3 Insertion delimiter] = " " diff --git a/data/fixtures/scopes/dart/type/type.argument.formal.iteration.scope b/data/fixtures/scopes/dart/type/type.argument.formal.iteration.scope new file mode 100644 index 0000000000..0264bc59ac --- /dev/null +++ b/data/fixtures/scopes/dart/type/type.argument.formal.iteration.scope @@ -0,0 +1,13 @@ +void foo(int aaa, [int bbb = 0]) {} +--- + +[#1 Content] = +[#1 Domain] = 0:0-0:35 + >-----------------------------------< +0| void foo(int aaa, [int bbb = 0]) {} + + +[#2 Content] = +[#2 Domain] = 0:9-0:31 + >----------------------< +0| void foo(int aaa, [int bbb = 0]) {} diff --git a/data/fixtures/scopes/dart/type/type.argument.formal.lambda.iteration.scope b/data/fixtures/scopes/dart/type/type.argument.formal.lambda.iteration.scope new file mode 100644 index 0000000000..38e9e05e78 --- /dev/null +++ b/data/fixtures/scopes/dart/type/type.argument.formal.lambda.iteration.scope @@ -0,0 +1,27 @@ +void main() { + var foo = (int aaa, [int bbb = 0]) {}; +} +--- + +[#1 Content] = +[#1 Domain] = 0:0-2:1 + >------------- +0| void main() { +1| var foo = (int aaa, [int bbb = 0]) {}; +2| } + -< + + +[#2 Content] = +[#2 Domain] = 0:13-2:0 + > +0| void main() { +1| var foo = (int aaa, [int bbb = 0]) {}; +2| } + < + + +[#3 Content] = +[#3 Domain] = 1:15-1:37 + >----------------------< +1| var foo = (int aaa, [int bbb = 0]) {}; diff --git a/data/fixtures/scopes/dart/type/type.argument.formal.lambda.scope b/data/fixtures/scopes/dart/type/type.argument.formal.lambda.scope new file mode 100644 index 0000000000..7269c75723 --- /dev/null +++ b/data/fixtures/scopes/dart/type/type.argument.formal.lambda.scope @@ -0,0 +1,63 @@ +void main() { + var foo = (int aaa, [int bbb = 0]) {}; +} +--- + +[#1 Content] = 0:0-0:4 + >----< +0| void main() { + +[#1 Removal] = 0:0-0:5 + >-----< +0| void main() { + +[#1 Trailing delimiter] = 0:4-0:5 + >-< +0| void main() { + +[#1 Domain] = 0:0-2:1 + >------------- +0| void main() { +1| var foo = (int aaa, [int bbb = 0]) {}; +2| } + -< + +[#1 Insertion delimiter] = " " + + +[#2 Content] = 1:15-1:18 + >---< +1| var foo = (int aaa, [int bbb = 0]) {}; + +[#2 Removal] = 1:15-1:19 + >----< +1| var foo = (int aaa, [int bbb = 0]) {}; + +[#2 Trailing delimiter] = 1:18-1:19 + >-< +1| var foo = (int aaa, [int bbb = 0]) {}; + +[#2 Domain] = 1:15-1:22 + >-------< +1| var foo = (int aaa, [int bbb = 0]) {}; + +[#2 Insertion delimiter] = " " + + +[#3 Content] = 1:25-1:28 + >---< +1| var foo = (int aaa, [int bbb = 0]) {}; + +[#3 Removal] = 1:25-1:29 + >----< +1| var foo = (int aaa, [int bbb = 0]) {}; + +[#3 Trailing delimiter] = 1:28-1:29 + >-< +1| var foo = (int aaa, [int bbb = 0]) {}; + +[#3 Domain] = 1:25-1:36 + >-----------< +1| var foo = (int aaa, [int bbb = 0]) {}; + +[#3 Insertion delimiter] = " " diff --git a/data/fixtures/scopes/dart/type/type.argument.formal.method.iteration.scope b/data/fixtures/scopes/dart/type/type.argument.formal.method.iteration.scope new file mode 100644 index 0000000000..e5cc789538 --- /dev/null +++ b/data/fixtures/scopes/dart/type/type.argument.formal.method.iteration.scope @@ -0,0 +1,27 @@ +class Foo { + void bar(int aaa, [int bbb = 0]) {} +} +--- + +[#1 Content] = +[#1 Domain] = 0:0-2:1 + >----------- +0| class Foo { +1| void bar(int aaa, [int bbb = 0]) {} +2| } + -< + + +[#2 Content] = +[#2 Domain] = 0:11-2:0 + > +0| class Foo { +1| void bar(int aaa, [int bbb = 0]) {} +2| } + < + + +[#3 Content] = +[#3 Domain] = 1:13-1:35 + >----------------------< +1| void bar(int aaa, [int bbb = 0]) {} diff --git a/data/fixtures/scopes/dart/type/type.argument.formal.method.scope b/data/fixtures/scopes/dart/type/type.argument.formal.method.scope new file mode 100644 index 0000000000..277eb15546 --- /dev/null +++ b/data/fixtures/scopes/dart/type/type.argument.formal.method.scope @@ -0,0 +1,76 @@ +class Foo { + void bar(int aaa, [int bbb = 0]) {} +} +--- + +[#1 Content] = +[#1 Removal] = +[#1 Domain] = 0:0-2:1 + >----------- +0| class Foo { +1| void bar(int aaa, [int bbb = 0]) {} +2| } + -< + +[#1 Insertion delimiter] = " " + + +[#2 Content] = 1:4-1:8 + >----< +1| void bar(int aaa, [int bbb = 0]) {} + +[#2 Removal] = 1:4-1:9 + >-----< +1| void bar(int aaa, [int bbb = 0]) {} + +[#2 Leading delimiter] = 1:0-1:4 + >----< +1| void bar(int aaa, [int bbb = 0]) {} + +[#2 Trailing delimiter] = 1:8-1:9 + >-< +1| void bar(int aaa, [int bbb = 0]) {} + +[#2 Domain] = 1:4-1:39 + >-----------------------------------< +1| void bar(int aaa, [int bbb = 0]) {} + +[#2 Insertion delimiter] = " " + + +[#3 Content] = 1:13-1:16 + >---< +1| void bar(int aaa, [int bbb = 0]) {} + +[#3 Removal] = 1:13-1:17 + >----< +1| void bar(int aaa, [int bbb = 0]) {} + +[#3 Trailing delimiter] = 1:16-1:17 + >-< +1| void bar(int aaa, [int bbb = 0]) {} + +[#3 Domain] = 1:13-1:20 + >-------< +1| void bar(int aaa, [int bbb = 0]) {} + +[#3 Insertion delimiter] = " " + + +[#4 Content] = 1:23-1:26 + >---< +1| void bar(int aaa, [int bbb = 0]) {} + +[#4 Removal] = 1:23-1:27 + >----< +1| void bar(int aaa, [int bbb = 0]) {} + +[#4 Trailing delimiter] = 1:26-1:27 + >-< +1| void bar(int aaa, [int bbb = 0]) {} + +[#4 Domain] = 1:23-1:34 + >-----------< +1| void bar(int aaa, [int bbb = 0]) {} + +[#4 Insertion delimiter] = " " diff --git a/data/fixtures/scopes/dart/type/type.argument.formal.scope b/data/fixtures/scopes/dart/type/type.argument.formal.scope new file mode 100644 index 0000000000..9ca8184212 --- /dev/null +++ b/data/fixtures/scopes/dart/type/type.argument.formal.scope @@ -0,0 +1,58 @@ +void foo(int aaa, [int bbb = 0]) {} +--- + +[#1 Content] = 0:0-0:4 + >----< +0| void foo(int aaa, [int bbb = 0]) {} + +[#1 Removal] = 0:0-0:5 + >-----< +0| void foo(int aaa, [int bbb = 0]) {} + +[#1 Trailing delimiter] = 0:4-0:5 + >-< +0| void foo(int aaa, [int bbb = 0]) {} + +[#1 Domain] = 0:0-0:35 + >-----------------------------------< +0| void foo(int aaa, [int bbb = 0]) {} + +[#1 Insertion delimiter] = " " + + +[#2 Content] = 0:9-0:12 + >---< +0| void foo(int aaa, [int bbb = 0]) {} + +[#2 Removal] = 0:9-0:13 + >----< +0| void foo(int aaa, [int bbb = 0]) {} + +[#2 Trailing delimiter] = 0:12-0:13 + >-< +0| void foo(int aaa, [int bbb = 0]) {} + +[#2 Domain] = 0:9-0:16 + >-------< +0| void foo(int aaa, [int bbb = 0]) {} + +[#2 Insertion delimiter] = " " + + +[#3 Content] = 0:19-0:22 + >---< +0| void foo(int aaa, [int bbb = 0]) {} + +[#3 Removal] = 0:19-0:23 + >----< +0| void foo(int aaa, [int bbb = 0]) {} + +[#3 Trailing delimiter] = 0:22-0:23 + >-< +0| void foo(int aaa, [int bbb = 0]) {} + +[#3 Domain] = 0:19-0:30 + >-----------< +0| void foo(int aaa, [int bbb = 0]) {} + +[#3 Insertion delimiter] = " " diff --git a/data/fixtures/scopes/dart/type/type.cast.scope b/data/fixtures/scopes/dart/type/type.cast.scope new file mode 100644 index 0000000000..71cec9dbdb --- /dev/null +++ b/data/fixtures/scopes/dart/type/type.cast.scope @@ -0,0 +1,44 @@ +void main() { + foo as int; +} +--- + +[#1 Content] = 0:0-0:4 + >----< +0| void main() { + +[#1 Removal] = 0:0-0:5 + >-----< +0| void main() { + +[#1 Trailing delimiter] = 0:4-0:5 + >-< +0| void main() { + +[#1 Domain] = 0:0-2:1 + >------------- +0| void main() { +1| foo as int; +2| } + -< + +[#1 Insertion delimiter] = " " + + +[#2 Content] = 1:11-1:14 + >---< +1| foo as int; + +[#2 Removal] = 1:10-1:14 + >----< +1| foo as int; + +[#2 Leading delimiter] = 1:10-1:11 + >-< +1| foo as int; + +[#2 Domain] = 1:4-1:14 + >----------< +1| foo as int; + +[#2 Insertion delimiter] = " " diff --git a/data/fixtures/scopes/dart/type/type.class.scope b/data/fixtures/scopes/dart/type/type.class.scope new file mode 100644 index 0000000000..79c274ccc6 --- /dev/null +++ b/data/fixtures/scopes/dart/type/type.class.scope @@ -0,0 +1,10 @@ +class Foo {} +--- + +[Content] = +[Removal] = +[Domain] = 0:0-0:12 + >------------< +0| class Foo {} + +[Insertion delimiter] = " " diff --git a/data/fixtures/scopes/dart/type/type.constant.scope b/data/fixtures/scopes/dart/type/type.constant.scope new file mode 100644 index 0000000000..a36046e407 --- /dev/null +++ b/data/fixtures/scopes/dart/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/dart/type/type.enum.scope b/data/fixtures/scopes/dart/type/type.enum.scope new file mode 100644 index 0000000000..70c26e7b58 --- /dev/null +++ b/data/fixtures/scopes/dart/type/type.enum.scope @@ -0,0 +1,10 @@ +enum Foo {} +--- + +[Content] = +[Removal] = +[Domain] = 0:0-0:11 + >-----------< +0| enum Foo {} + +[Insertion delimiter] = " " diff --git a/data/fixtures/scopes/dart/type/type.field.class.scope b/data/fixtures/scopes/dart/type/type.field.class.scope new file mode 100644 index 0000000000..528fd810c8 --- /dev/null +++ b/data/fixtures/scopes/dart/type/type.field.class.scope @@ -0,0 +1,63 @@ +class Foo { + int bar; + int baz = 0; +} +--- + +[#1 Content] = +[#1 Removal] = +[#1 Domain] = 0:0-3:1 + >----------- +0| class Foo { +1| int bar; +2| int baz = 0; +3| } + -< + +[#1 Insertion delimiter] = " " + + +[#2 Content] = 1:4-1:7 + >---< +1| int bar; + +[#2 Removal] = 1:4-1:8 + >----< +1| int bar; + +[#2 Leading delimiter] = 1:0-1:4 + >----< +1| int bar; + +[#2 Trailing delimiter] = 1:7-1:8 + >-< +1| int bar; + +[#2 Domain] = 1:4-1:12 + >--------< +1| int bar; + +[#2 Insertion delimiter] = " " + + +[#3 Content] = 2:4-2:7 + >---< +2| int baz = 0; + +[#3 Removal] = 2:4-2:8 + >----< +2| int baz = 0; + +[#3 Leading delimiter] = 2:0-2:4 + >----< +2| int baz = 0; + +[#3 Trailing delimiter] = 2:7-2:8 + >-< +2| int baz = 0; + +[#3 Domain] = 2:4-2:16 + >------------< +2| int baz = 0; + +[#3 Insertion delimiter] = " " diff --git a/data/fixtures/scopes/dart/type/type.foreach.scope b/data/fixtures/scopes/dart/type/type.foreach.scope new file mode 100644 index 0000000000..d9184595a6 --- /dev/null +++ b/data/fixtures/scopes/dart/type/type.foreach.scope @@ -0,0 +1,48 @@ +void main() { + for (final int v in values) {} +} +--- + +[#1 Content] = 0:0-0:4 + >----< +0| void main() { + +[#1 Removal] = 0:0-0:5 + >-----< +0| void main() { + +[#1 Trailing delimiter] = 0:4-0:5 + >-< +0| void main() { + +[#1 Domain] = 0:0-2:1 + >------------- +0| void main() { +1| for (final int v in values) {} +2| } + -< + +[#1 Insertion delimiter] = " " + + +[#2 Content] = 1:15-1:18 + >---< +1| for (final int v in values) {} + +[#2 Removal] = 1:15-1:19 + >----< +1| for (final int v in values) {} + +[#2 Leading delimiter] = 1:14-1:15 + >-< +1| for (final int v in values) {} + +[#2 Trailing delimiter] = 1:18-1:19 + >-< +1| for (final int v in values) {} + +[#2 Domain] = 1:4-1:34 + >------------------------------< +1| for (final int v in values) {} + +[#2 Insertion delimiter] = " " diff --git a/data/fixtures/scopes/dart/type/type.iteration.block.scope b/data/fixtures/scopes/dart/type/type.iteration.block.scope new file mode 100644 index 0000000000..5768db5310 --- /dev/null +++ b/data/fixtures/scopes/dart/type/type.iteration.block.scope @@ -0,0 +1,27 @@ +class Foo { + void bar() { } +} +--- + +[#1 Content] = +[#1 Domain] = 0:0-2:1 + >----------- +0| class Foo { +1| void bar() { } +2| } + -< + + +[#2 Content] = +[#2 Domain] = 0:11-2:0 + > +0| class Foo { +1| void bar() { } +2| } + < + + +[#3 Content] = +[#3 Domain] = 1:16-1:17 + >-< +1| void bar() { } diff --git a/data/fixtures/scopes/dart/type/type.iteration.block2.scope b/data/fixtures/scopes/dart/type/type.iteration.block2.scope new file mode 100644 index 0000000000..ea20927c6d --- /dev/null +++ b/data/fixtures/scopes/dart/type/type.iteration.block2.scope @@ -0,0 +1,13 @@ +void foo() { } +--- + +[#1 Content] = +[#1 Domain] = 0:0-0:14 + >--------------< +0| void foo() { } + + +[#2 Content] = +[#2 Domain] = 0:12-0:13 + >-< +0| void foo() { } diff --git a/data/fixtures/scopes/dart/type/type.iteration.block3.scope b/data/fixtures/scopes/dart/type/type.iteration.block3.scope new file mode 100644 index 0000000000..c1543e41aa --- /dev/null +++ b/data/fixtures/scopes/dart/type/type.iteration.block3.scope @@ -0,0 +1,45 @@ +void main() { + if (true) { } + else if (false) { } + else { } +} +--- + +[#1 Content] = +[#1 Domain] = 0:0-4:1 + >------------- +0| void main() { +1| if (true) { } +2| else if (false) { } +3| else { } +4| } + -< + + +[#2 Content] = +[#2 Domain] = 0:13-4:0 + > +0| void main() { +1| if (true) { } +2| else if (false) { } +3| else { } +4| } + < + + +[#3 Content] = +[#3 Domain] = 1:15-1:16 + >-< +1| if (true) { } + + +[#4 Content] = +[#4 Domain] = 2:21-2:22 + >-< +2| else if (false) { } + + +[#5 Content] = +[#5 Domain] = 3:10-3:11 + >-< +3| else { } diff --git a/data/fixtures/scopes/dart/type/type.iteration.block4.scope b/data/fixtures/scopes/dart/type/type.iteration.block4.scope new file mode 100644 index 0000000000..6dc77fd461 --- /dev/null +++ b/data/fixtures/scopes/dart/type/type.iteration.block4.scope @@ -0,0 +1,27 @@ +void main() { + while (true) { } +} +--- + +[#1 Content] = +[#1 Domain] = 0:0-2:1 + >------------- +0| void main() { +1| while (true) { } +2| } + -< + + +[#2 Content] = +[#2 Domain] = 0:13-2:0 + > +0| void main() { +1| while (true) { } +2| } + < + + +[#3 Content] = +[#3 Domain] = 1:18-1:19 + >-< +1| while (true) { } diff --git a/data/fixtures/scopes/dart/type/type.iteration.class.scope b/data/fixtures/scopes/dart/type/type.iteration.class.scope new file mode 100644 index 0000000000..a3ec5f3456 --- /dev/null +++ b/data/fixtures/scopes/dart/type/type.iteration.class.scope @@ -0,0 +1,13 @@ +class Foo { } +--- + +[#1 Content] = +[#1 Domain] = 0:0-0:13 + >-------------< +0| class Foo { } + + +[#2 Content] = +[#2 Domain] = 0:11-0:12 + >-< +0| class Foo { } diff --git a/data/fixtures/scopes/dart/type/type.iteration.document.scope b/data/fixtures/scopes/dart/type/type.iteration.document.scope new file mode 100644 index 0000000000..f7552fe2fe --- /dev/null +++ b/data/fixtures/scopes/dart/type/type.iteration.document.scope @@ -0,0 +1,12 @@ + +int foo = 0; + +--- + +[Content] = +[Domain] = 0:0-2:0 + > +0| +1| int foo = 0; +2| + < diff --git a/data/fixtures/scopes/dart/type/type.return.method.scope b/data/fixtures/scopes/dart/type/type.return.method.scope new file mode 100644 index 0000000000..6e555c6589 --- /dev/null +++ b/data/fixtures/scopes/dart/type/type.return.method.scope @@ -0,0 +1,38 @@ +class Foo { + int bar() {} +} +--- + +[#1 Content] = +[#1 Removal] = +[#1 Domain] = 0:0-2:1 + >----------- +0| class Foo { +1| int bar() {} +2| } + -< + +[#1 Insertion delimiter] = " " + + +[#2 Content] = 1:4-1:7 + >---< +1| int bar() {} + +[#2 Removal] = 1:4-1:8 + >----< +1| int bar() {} + +[#2 Leading delimiter] = 1:0-1:4 + >----< +1| int bar() {} + +[#2 Trailing delimiter] = 1:7-1:8 + >-< +1| int bar() {} + +[#2 Domain] = 1:4-1:16 + >------------< +1| int bar() {} + +[#2 Insertion delimiter] = " " diff --git a/data/fixtures/scopes/dart/type/type.return.scope b/data/fixtures/scopes/dart/type/type.return.scope new file mode 100644 index 0000000000..153e08a800 --- /dev/null +++ b/data/fixtures/scopes/dart/type/type.return.scope @@ -0,0 +1,20 @@ +int foo() {} +--- + +[Content] = 0:0-0:3 + >---< +0| int foo() {} + +[Removal] = 0:0-0:4 + >----< +0| int foo() {} + +[Trailing delimiter] = 0:3-0:4 + >-< +0| int foo() {} + +[Domain] = 0:0-0:12 + >------------< +0| int foo() {} + +[Insertion delimiter] = " " diff --git a/data/fixtures/scopes/dart/type/type.typeArgument.iteration.scope b/data/fixtures/scopes/dart/type/type.typeArgument.iteration.scope new file mode 100644 index 0000000000..2c55c5158e --- /dev/null +++ b/data/fixtures/scopes/dart/type/type.typeArgument.iteration.scope @@ -0,0 +1,27 @@ +void main() { + Map foo; +} +--- + +[#1 Content] = +[#1 Domain] = 0:0-2:1 + >------------- +0| void main() { +1| Map foo; +2| } + -< + + +[#2 Content] = +[#2 Domain] = 0:13-2:0 + > +0| void main() { +1| Map foo; +2| } + < + + +[#3 Content] = +[#3 Domain] = 1:8-1:16 + >--------< +1| Map foo; diff --git a/data/fixtures/scopes/dart/type/type.typeArgument.scope b/data/fixtures/scopes/dart/type/type.typeArgument.scope new file mode 100644 index 0000000000..8434f1f45c --- /dev/null +++ b/data/fixtures/scopes/dart/type/type.typeArgument.scope @@ -0,0 +1,73 @@ +void main() { + Map foo; +} +--- + +[#1 Content] = 0:0-0:4 + >----< +0| void main() { + +[#1 Removal] = 0:0-0:5 + >-----< +0| void main() { + +[#1 Trailing delimiter] = 0:4-0:5 + >-< +0| void main() { + +[#1 Domain] = 0:0-2:1 + >------------- +0| void main() { +1| Map foo; +2| } + -< + +[#1 Insertion delimiter] = " " + + +[#2 Content] = 1:4-1:17 + >-------------< +1| Map foo; + +[#2 Removal] = 1:4-1:18 + >--------------< +1| Map foo; + +[#2 Leading delimiter] = 1:0-1:4 + >----< +1| Map foo; + +[#2 Trailing delimiter] = 1:17-1:18 + >-< +1| Map foo; + +[#2 Domain] = 1:4-1:22 + >------------------< +1| Map foo; + +[#2 Insertion delimiter] = " " + + +[#3 Content] = +[#3 Removal] = +[#3 Domain] = 1:8-1:11 + >---< +1| Map foo; + +[#3 Insertion delimiter] = " " + + +[#4 Content] = +[#4 Domain] = 1:13-1:16 + >---< +1| Map foo; + +[#4 Removal] = 1:12-1:16 + >----< +1| Map foo; + +[#4 Leading delimiter] = 1:12-1:13 + >-< +1| Map foo; + +[#4 Insertion delimiter] = " " diff --git a/data/fixtures/scopes/dart/type/type.variable.initialized.scope b/data/fixtures/scopes/dart/type/type.variable.initialized.scope new file mode 100644 index 0000000000..a6800402d7 --- /dev/null +++ b/data/fixtures/scopes/dart/type/type.variable.initialized.scope @@ -0,0 +1,48 @@ +void main() { + int foo = 0; +} +--- + +[#1 Content] = 0:0-0:4 + >----< +0| void main() { + +[#1 Removal] = 0:0-0:5 + >-----< +0| void main() { + +[#1 Trailing delimiter] = 0:4-0:5 + >-< +0| void main() { + +[#1 Domain] = 0:0-2:1 + >------------- +0| void main() { +1| int foo = 0; +2| } + -< + +[#1 Insertion delimiter] = " " + + +[#2 Content] = 1:4-1:7 + >---< +1| int foo = 0; + +[#2 Removal] = 1:4-1:8 + >----< +1| int foo = 0; + +[#2 Leading delimiter] = 1:0-1:4 + >----< +1| int foo = 0; + +[#2 Trailing delimiter] = 1:7-1:8 + >-< +1| int foo = 0; + +[#2 Domain] = 1:4-1:16 + >------------< +1| int foo = 0; + +[#2 Insertion delimiter] = " " diff --git a/data/fixtures/scopes/dart/type/type.variable.uninitialized.scope b/data/fixtures/scopes/dart/type/type.variable.uninitialized.scope new file mode 100644 index 0000000000..483f0f3947 --- /dev/null +++ b/data/fixtures/scopes/dart/type/type.variable.uninitialized.scope @@ -0,0 +1,48 @@ +void main() { + int foo; +} +--- + +[#1 Content] = 0:0-0:4 + >----< +0| void main() { + +[#1 Removal] = 0:0-0:5 + >-----< +0| void main() { + +[#1 Trailing delimiter] = 0:4-0:5 + >-< +0| void main() { + +[#1 Domain] = 0:0-2:1 + >------------- +0| void main() { +1| int foo; +2| } + -< + +[#1 Insertion delimiter] = " " + + +[#2 Content] = 1:4-1:7 + >---< +1| int foo; + +[#2 Removal] = 1:4-1:8 + >----< +1| int foo; + +[#2 Leading delimiter] = 1:0-1:4 + >----< +1| int foo; + +[#2 Trailing delimiter] = 1:7-1:8 + >-< +1| int foo; + +[#2 Domain] = 1:4-1:12 + >--------< +1| int foo; + +[#2 Insertion delimiter] = " " diff --git a/data/fixtures/scopes/dart/value/value.argument.actual.iteration.scope b/data/fixtures/scopes/dart/value/value.argument.actual.iteration.scope new file mode 100644 index 0000000000..f43dbc7a00 --- /dev/null +++ b/data/fixtures/scopes/dart/value/value.argument.actual.iteration.scope @@ -0,0 +1,27 @@ +void main() { + foo(aaa: 0, bbb: 1); +} +--- + +[#1 Content] = +[#1 Domain] = 0:0-2:1 + >------------- +0| void main() { +1| foo(aaa: 0, bbb: 1); +2| } + -< + + +[#2 Content] = +[#2 Domain] = 0:13-2:0 + > +0| void main() { +1| foo(aaa: 0, bbb: 1); +2| } + < + + +[#3 Content] = +[#3 Domain] = 1:8-1:22 + >--------------< +1| foo(aaa: 0, bbb: 1); diff --git a/data/fixtures/scopes/dart/value/value.argument.actual.scope b/data/fixtures/scopes/dart/value/value.argument.actual.scope new file mode 100644 index 0000000000..ed528b56a6 --- /dev/null +++ b/data/fixtures/scopes/dart/value/value.argument.actual.scope @@ -0,0 +1,41 @@ +void main() { + foo(aaa: 0, bbb: 1); +} +--- + +[#1 Content] = 1:13-1:14 + >-< +1| foo(aaa: 0, bbb: 1); + +[#1 Removal] = 1:11-1:14 + >---< +1| foo(aaa: 0, bbb: 1); + +[#1 Leading delimiter] = 1:11-1:13 + >--< +1| foo(aaa: 0, bbb: 1); + +[#1 Domain] = 1:8-1:14 + >------< +1| foo(aaa: 0, bbb: 1); + +[#1 Insertion delimiter] = " " + + +[#2 Content] = 1:21-1:22 + >-< +1| foo(aaa: 0, bbb: 1); + +[#2 Removal] = 1:19-1:22 + >---< +1| foo(aaa: 0, bbb: 1); + +[#2 Leading delimiter] = 1:19-1:21 + >--< +1| foo(aaa: 0, bbb: 1); + +[#2 Domain] = 1:16-1:22 + >------< +1| foo(aaa: 0, bbb: 1); + +[#2 Insertion delimiter] = " " diff --git a/data/fixtures/scopes/dart/value/value.argument.formal.constructor.iteration.scope b/data/fixtures/scopes/dart/value/value.argument.formal.constructor.iteration.scope new file mode 100644 index 0000000000..dd8ea225af --- /dev/null +++ b/data/fixtures/scopes/dart/value/value.argument.formal.constructor.iteration.scope @@ -0,0 +1,27 @@ +class Foo { + Foo([aaa = 0, int bbb = 1]) {} +} +--- + +[#1 Content] = +[#1 Domain] = 0:0-2:1 + >----------- +0| class Foo { +1| Foo([aaa = 0, int bbb = 1]) {} +2| } + -< + + +[#2 Content] = +[#2 Domain] = 0:11-2:0 + > +0| class Foo { +1| Foo([aaa = 0, int bbb = 1]) {} +2| } + < + + +[#3 Content] = +[#3 Domain] = 1:8-1:30 + >----------------------< +1| Foo([aaa = 0, int bbb = 1]) {} diff --git a/data/fixtures/scopes/dart/value/value.argument.formal.constructor.scope b/data/fixtures/scopes/dart/value/value.argument.formal.constructor.scope new file mode 100644 index 0000000000..17931ea98d --- /dev/null +++ b/data/fixtures/scopes/dart/value/value.argument.formal.constructor.scope @@ -0,0 +1,41 @@ +class Foo { + Foo([aaa = 0, int bbb = 1]) {} +} +--- + +[#1 Content] = 1:15-1:16 + >-< +1| Foo([aaa = 0, int bbb = 1]) {} + +[#1 Removal] = 1:12-1:16 + >----< +1| Foo([aaa = 0, int bbb = 1]) {} + +[#1 Leading delimiter] = 1:12-1:15 + >---< +1| Foo([aaa = 0, int bbb = 1]) {} + +[#1 Domain] = 1:9-1:16 + >-------< +1| Foo([aaa = 0, int bbb = 1]) {} + +[#1 Insertion delimiter] = " " + + +[#2 Content] = 1:28-1:29 + >-< +1| Foo([aaa = 0, int bbb = 1]) {} + +[#2 Removal] = 1:25-1:29 + >----< +1| Foo([aaa = 0, int bbb = 1]) {} + +[#2 Leading delimiter] = 1:25-1:28 + >---< +1| Foo([aaa = 0, int bbb = 1]) {} + +[#2 Domain] = 1:18-1:29 + >-----------< +1| Foo([aaa = 0, int bbb = 1]) {} + +[#2 Insertion delimiter] = " " diff --git a/data/fixtures/scopes/dart/value/value.argument.formal.iteration.scope b/data/fixtures/scopes/dart/value/value.argument.formal.iteration.scope new file mode 100644 index 0000000000..b9e811840b --- /dev/null +++ b/data/fixtures/scopes/dart/value/value.argument.formal.iteration.scope @@ -0,0 +1,13 @@ +void foo([aaa = 0, int bbb = 1]) {} +--- + +[#1 Content] = +[#1 Domain] = 0:0-0:35 + >-----------------------------------< +0| void foo([aaa = 0, int bbb = 1]) {} + + +[#2 Content] = +[#2 Domain] = 0:9-0:31 + >----------------------< +0| void foo([aaa = 0, int bbb = 1]) {} diff --git a/data/fixtures/scopes/dart/value/value.argument.formal.lambda.iteration.scope b/data/fixtures/scopes/dart/value/value.argument.formal.lambda.iteration.scope new file mode 100644 index 0000000000..24d8dc3e22 --- /dev/null +++ b/data/fixtures/scopes/dart/value/value.argument.formal.lambda.iteration.scope @@ -0,0 +1,27 @@ +void main() { + var foo = ([aaa = 0, int bbb = 1]) {}; +} +--- + +[#1 Content] = +[#1 Domain] = 0:0-2:1 + >------------- +0| void main() { +1| var foo = ([aaa = 0, int bbb = 1]) {}; +2| } + -< + + +[#2 Content] = +[#2 Domain] = 0:13-2:0 + > +0| void main() { +1| var foo = ([aaa = 0, int bbb = 1]) {}; +2| } + < + + +[#3 Content] = +[#3 Domain] = 1:15-1:37 + >----------------------< +1| var foo = ([aaa = 0, int bbb = 1]) {}; diff --git a/data/fixtures/scopes/dart/value/value.argument.formal.lambda.scope b/data/fixtures/scopes/dart/value/value.argument.formal.lambda.scope new file mode 100644 index 0000000000..0e88de3681 --- /dev/null +++ b/data/fixtures/scopes/dart/value/value.argument.formal.lambda.scope @@ -0,0 +1,60 @@ +void main() { + var foo = ([aaa = 0, int bbb = 1]) {}; +} +--- + +[#1 Content] = 1:14-1:41 + >---------------------------< +1| var foo = ([aaa = 0, int bbb = 1]) {}; + +[#1 Removal] = 1:11-1:41 + >------------------------------< +1| var foo = ([aaa = 0, int bbb = 1]) {}; + +[#1 Leading delimiter] = 1:11-1:14 + >---< +1| var foo = ([aaa = 0, int bbb = 1]) {}; + +[#1 Domain] = 1:4-1:42 + >--------------------------------------< +1| var foo = ([aaa = 0, int bbb = 1]) {}; + +[#1 Insertion delimiter] = " " + + +[#2 Content] = 1:22-1:23 + >-< +1| var foo = ([aaa = 0, int bbb = 1]) {}; + +[#2 Removal] = 1:19-1:23 + >----< +1| var foo = ([aaa = 0, int bbb = 1]) {}; + +[#2 Leading delimiter] = 1:19-1:22 + >---< +1| var foo = ([aaa = 0, int bbb = 1]) {}; + +[#2 Domain] = 1:16-1:23 + >-------< +1| var foo = ([aaa = 0, int bbb = 1]) {}; + +[#2 Insertion delimiter] = " " + + +[#3 Content] = 1:35-1:36 + >-< +1| var foo = ([aaa = 0, int bbb = 1]) {}; + +[#3 Removal] = 1:32-1:36 + >----< +1| var foo = ([aaa = 0, int bbb = 1]) {}; + +[#3 Leading delimiter] = 1:32-1:35 + >---< +1| var foo = ([aaa = 0, int bbb = 1]) {}; + +[#3 Domain] = 1:25-1:36 + >-----------< +1| var foo = ([aaa = 0, int bbb = 1]) {}; + +[#3 Insertion delimiter] = " " diff --git a/data/fixtures/scopes/dart/value/value.argument.formal.method.iteration.scope b/data/fixtures/scopes/dart/value/value.argument.formal.method.iteration.scope new file mode 100644 index 0000000000..a9e86b2329 --- /dev/null +++ b/data/fixtures/scopes/dart/value/value.argument.formal.method.iteration.scope @@ -0,0 +1,27 @@ +class Foo { + void bar([aaa = 0, int bbb = 1]) {} +} +--- + +[#1 Content] = +[#1 Domain] = 0:0-2:1 + >----------- +0| class Foo { +1| void bar([aaa = 0, int bbb = 1]) {} +2| } + -< + + +[#2 Content] = +[#2 Domain] = 0:11-2:0 + > +0| class Foo { +1| void bar([aaa = 0, int bbb = 1]) {} +2| } + < + + +[#3 Content] = +[#3 Domain] = 1:13-1:35 + >----------------------< +1| void bar([aaa = 0, int bbb = 1]) {} diff --git a/data/fixtures/scopes/dart/value/value.argument.formal.method.scope b/data/fixtures/scopes/dart/value/value.argument.formal.method.scope new file mode 100644 index 0000000000..7cbc4193b9 --- /dev/null +++ b/data/fixtures/scopes/dart/value/value.argument.formal.method.scope @@ -0,0 +1,41 @@ +class Foo { + void bar([aaa = 0, int bbb = 1]) {} +} +--- + +[#1 Content] = 1:20-1:21 + >-< +1| void bar([aaa = 0, int bbb = 1]) {} + +[#1 Removal] = 1:17-1:21 + >----< +1| void bar([aaa = 0, int bbb = 1]) {} + +[#1 Leading delimiter] = 1:17-1:20 + >---< +1| void bar([aaa = 0, int bbb = 1]) {} + +[#1 Domain] = 1:14-1:21 + >-------< +1| void bar([aaa = 0, int bbb = 1]) {} + +[#1 Insertion delimiter] = " " + + +[#2 Content] = 1:33-1:34 + >-< +1| void bar([aaa = 0, int bbb = 1]) {} + +[#2 Removal] = 1:30-1:34 + >----< +1| void bar([aaa = 0, int bbb = 1]) {} + +[#2 Leading delimiter] = 1:30-1:33 + >---< +1| void bar([aaa = 0, int bbb = 1]) {} + +[#2 Domain] = 1:23-1:34 + >-----------< +1| void bar([aaa = 0, int bbb = 1]) {} + +[#2 Insertion delimiter] = " " diff --git a/data/fixtures/scopes/dart/value/value.argument.formal.scope b/data/fixtures/scopes/dart/value/value.argument.formal.scope new file mode 100644 index 0000000000..d58c2d84e4 --- /dev/null +++ b/data/fixtures/scopes/dart/value/value.argument.formal.scope @@ -0,0 +1,39 @@ +void foo([aaa = 0, int bbb = 1]) {} +--- + +[#1 Content] = 0:16-0:17 + >-< +0| void foo([aaa = 0, int bbb = 1]) {} + +[#1 Removal] = 0:13-0:17 + >----< +0| void foo([aaa = 0, int bbb = 1]) {} + +[#1 Leading delimiter] = 0:13-0:16 + >---< +0| void foo([aaa = 0, int bbb = 1]) {} + +[#1 Domain] = 0:10-0:17 + >-------< +0| void foo([aaa = 0, int bbb = 1]) {} + +[#1 Insertion delimiter] = " " + + +[#2 Content] = 0:29-0:30 + >-< +0| void foo([aaa = 0, int bbb = 1]) {} + +[#2 Removal] = 0:26-0:30 + >----< +0| void foo([aaa = 0, int bbb = 1]) {} + +[#2 Leading delimiter] = 0:26-0:29 + >---< +0| void foo([aaa = 0, int bbb = 1]) {} + +[#2 Domain] = 0:19-0:30 + >-----------< +0| void foo([aaa = 0, int bbb = 1]) {} + +[#2 Insertion delimiter] = " " diff --git a/data/fixtures/scopes/dart/value/value.assignment.compound.scope b/data/fixtures/scopes/dart/value/value.assignment.compound.scope new file mode 100644 index 0000000000..c48e167ae9 --- /dev/null +++ b/data/fixtures/scopes/dart/value/value.assignment.compound.scope @@ -0,0 +1,22 @@ +void main() { + foo += 0; +} +--- + +[Content] = 1:11-1:12 + >-< +1| foo += 0; + +[Removal] = 1:7-1:12 + >-----< +1| foo += 0; + +[Leading delimiter] = 1:7-1:11 + >----< +1| foo += 0; + +[Domain] = 1:4-1:13 + >---------< +1| foo += 0; + +[Insertion delimiter] = " " diff --git a/data/fixtures/scopes/dart/value/value.assignment.scope b/data/fixtures/scopes/dart/value/value.assignment.scope new file mode 100644 index 0000000000..a3edce54cd --- /dev/null +++ b/data/fixtures/scopes/dart/value/value.assignment.scope @@ -0,0 +1,22 @@ +void main() { + foo = 0; +} +--- + +[Content] = 1:10-1:11 + >-< +1| foo = 0; + +[Removal] = 1:7-1:11 + >----< +1| foo = 0; + +[Leading delimiter] = 1:7-1:10 + >---< +1| foo = 0; + +[Domain] = 1:4-1:12 + >--------< +1| foo = 0; + +[Insertion delimiter] = " " diff --git a/data/fixtures/scopes/dart/value/value.constant.scope b/data/fixtures/scopes/dart/value/value.constant.scope new file mode 100644 index 0000000000..b52ad1e5c6 --- /dev/null +++ b/data/fixtures/scopes/dart/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/dart/value/value.field.class.scope b/data/fixtures/scopes/dart/value/value.field.class.scope new file mode 100644 index 0000000000..64b60fed90 --- /dev/null +++ b/data/fixtures/scopes/dart/value/value.field.class.scope @@ -0,0 +1,22 @@ +class Foo { + var bar = 0; +} +--- + +[Content] = 1:14-1:15 + >-< +1| var bar = 0; + +[Removal] = 1:11-1:15 + >----< +1| var bar = 0; + +[Leading delimiter] = 1:11-1:14 + >---< +1| var bar = 0; + +[Domain] = 1:4-1:16 + >------------< +1| var bar = 0; + +[Insertion delimiter] = " " diff --git a/data/fixtures/scopes/dart/value/value.foreach.scope b/data/fixtures/scopes/dart/value/value.foreach.scope new file mode 100644 index 0000000000..04f9ed6d28 --- /dev/null +++ b/data/fixtures/scopes/dart/value/value.foreach.scope @@ -0,0 +1,22 @@ +void main() { + for (final v in values) {} +} +--- + +[Content] = 1:20-1:26 + >------< +1| for (final v in values) {} + +[Removal] = 1:19-1:26 + >-------< +1| for (final v in values) {} + +[Leading delimiter] = 1:19-1:20 + >-< +1| for (final v in values) {} + +[Domain] = 1:4-1:30 + >--------------------------< +1| for (final v in values) {} + +[Insertion delimiter] = " " diff --git a/data/fixtures/scopes/dart/value/value.iteration.block.scope b/data/fixtures/scopes/dart/value/value.iteration.block.scope new file mode 100644 index 0000000000..5768db5310 --- /dev/null +++ b/data/fixtures/scopes/dart/value/value.iteration.block.scope @@ -0,0 +1,27 @@ +class Foo { + void bar() { } +} +--- + +[#1 Content] = +[#1 Domain] = 0:0-2:1 + >----------- +0| class Foo { +1| void bar() { } +2| } + -< + + +[#2 Content] = +[#2 Domain] = 0:11-2:0 + > +0| class Foo { +1| void bar() { } +2| } + < + + +[#3 Content] = +[#3 Domain] = 1:16-1:17 + >-< +1| void bar() { } diff --git a/data/fixtures/scopes/dart/value/value.iteration.block2.scope b/data/fixtures/scopes/dart/value/value.iteration.block2.scope new file mode 100644 index 0000000000..ea20927c6d --- /dev/null +++ b/data/fixtures/scopes/dart/value/value.iteration.block2.scope @@ -0,0 +1,13 @@ +void foo() { } +--- + +[#1 Content] = +[#1 Domain] = 0:0-0:14 + >--------------< +0| void foo() { } + + +[#2 Content] = +[#2 Domain] = 0:12-0:13 + >-< +0| void foo() { } diff --git a/data/fixtures/scopes/dart/value/value.iteration.block3.scope b/data/fixtures/scopes/dart/value/value.iteration.block3.scope new file mode 100644 index 0000000000..c1543e41aa --- /dev/null +++ b/data/fixtures/scopes/dart/value/value.iteration.block3.scope @@ -0,0 +1,45 @@ +void main() { + if (true) { } + else if (false) { } + else { } +} +--- + +[#1 Content] = +[#1 Domain] = 0:0-4:1 + >------------- +0| void main() { +1| if (true) { } +2| else if (false) { } +3| else { } +4| } + -< + + +[#2 Content] = +[#2 Domain] = 0:13-4:0 + > +0| void main() { +1| if (true) { } +2| else if (false) { } +3| else { } +4| } + < + + +[#3 Content] = +[#3 Domain] = 1:15-1:16 + >-< +1| if (true) { } + + +[#4 Content] = +[#4 Domain] = 2:21-2:22 + >-< +2| else if (false) { } + + +[#5 Content] = +[#5 Domain] = 3:10-3:11 + >-< +3| else { } diff --git a/data/fixtures/scopes/dart/value/value.iteration.block4.scope b/data/fixtures/scopes/dart/value/value.iteration.block4.scope new file mode 100644 index 0000000000..6dc77fd461 --- /dev/null +++ b/data/fixtures/scopes/dart/value/value.iteration.block4.scope @@ -0,0 +1,27 @@ +void main() { + while (true) { } +} +--- + +[#1 Content] = +[#1 Domain] = 0:0-2:1 + >------------- +0| void main() { +1| while (true) { } +2| } + -< + + +[#2 Content] = +[#2 Domain] = 0:13-2:0 + > +0| void main() { +1| while (true) { } +2| } + < + + +[#3 Content] = +[#3 Domain] = 1:18-1:19 + >-< +1| while (true) { } diff --git a/data/fixtures/scopes/dart/value/value.iteration.class.scope b/data/fixtures/scopes/dart/value/value.iteration.class.scope new file mode 100644 index 0000000000..a3ec5f3456 --- /dev/null +++ b/data/fixtures/scopes/dart/value/value.iteration.class.scope @@ -0,0 +1,13 @@ +class Foo { } +--- + +[#1 Content] = +[#1 Domain] = 0:0-0:13 + >-------------< +0| class Foo { } + + +[#2 Content] = +[#2 Domain] = 0:11-0:12 + >-< +0| class Foo { } diff --git a/data/fixtures/scopes/dart/value/value.iteration.document.scope b/data/fixtures/scopes/dart/value/value.iteration.document.scope new file mode 100644 index 0000000000..8441b73e49 --- /dev/null +++ b/data/fixtures/scopes/dart/value/value.iteration.document.scope @@ -0,0 +1,12 @@ + +var foo = 0; + +--- + +[Content] = +[Domain] = 0:0-2:0 + > +0| +1| var foo = 0; +2| + < diff --git a/data/fixtures/scopes/dart/value/value.mapPair.iteration.scope b/data/fixtures/scopes/dart/value/value.mapPair.iteration.scope new file mode 100644 index 0000000000..cee120a4a0 --- /dev/null +++ b/data/fixtures/scopes/dart/value/value.mapPair.iteration.scope @@ -0,0 +1,27 @@ +void main() { + {"aaa": 0, "bbb": 1}; +} +--- + +[#1 Content] = +[#1 Domain] = 0:0-2:1 + >------------- +0| void main() { +1| {"aaa": 0, "bbb": 1}; +2| } + -< + + +[#2 Content] = +[#2 Domain] = 0:13-2:0 + > +0| void main() { +1| {"aaa": 0, "bbb": 1}; +2| } + < + + +[#3 Content] = +[#3 Domain] = 1:5-1:23 + >------------------< +1| {"aaa": 0, "bbb": 1}; diff --git a/data/fixtures/scopes/dart/value/value.mapPair.scope b/data/fixtures/scopes/dart/value/value.mapPair.scope new file mode 100644 index 0000000000..b5aad62a34 --- /dev/null +++ b/data/fixtures/scopes/dart/value/value.mapPair.scope @@ -0,0 +1,41 @@ +void main() { + {"aaa": 0, "bbb": 1}; +} +--- + +[#1 Content] = 1:12-1:13 + >-< +1| {"aaa": 0, "bbb": 1}; + +[#1 Removal] = 1:10-1:13 + >---< +1| {"aaa": 0, "bbb": 1}; + +[#1 Leading delimiter] = 1:10-1:12 + >--< +1| {"aaa": 0, "bbb": 1}; + +[#1 Domain] = 1:5-1:13 + >--------< +1| {"aaa": 0, "bbb": 1}; + +[#1 Insertion delimiter] = " " + + +[#2 Content] = 1:22-1:23 + >-< +1| {"aaa": 0, "bbb": 1}; + +[#2 Removal] = 1:20-1:23 + >---< +1| {"aaa": 0, "bbb": 1}; + +[#2 Leading delimiter] = 1:20-1:22 + >--< +1| {"aaa": 0, "bbb": 1}; + +[#2 Domain] = 1:15-1:23 + >--------< +1| {"aaa": 0, "bbb": 1}; + +[#2 Insertion delimiter] = " " diff --git a/data/fixtures/scopes/dart/value/value.return.lambda.scope b/data/fixtures/scopes/dart/value/value.return.lambda.scope new file mode 100644 index 0000000000..df6375f879 --- /dev/null +++ b/data/fixtures/scopes/dart/value/value.return.lambda.scope @@ -0,0 +1,22 @@ +void main() { + foo(() => 0); +} +--- + +[Content] = 1:14-1:15 + >-< +1| foo(() => 0); + +[Removal] = 1:13-1:15 + >--< +1| foo(() => 0); + +[Leading delimiter] = 1:13-1:14 + >-< +1| foo(() => 0); + +[Domain] = 1:8-1:15 + >-------< +1| foo(() => 0); + +[Insertion delimiter] = " " diff --git a/data/fixtures/scopes/dart/value/value.return.scope b/data/fixtures/scopes/dart/value/value.return.scope new file mode 100644 index 0000000000..2b9370f11e --- /dev/null +++ b/data/fixtures/scopes/dart/value/value.return.scope @@ -0,0 +1,22 @@ +void foo() { + return 0; +} +--- + +[Content] = 1:15-1:16 + >-< +1| return 0; + +[Removal] = 1:14-1:16 + >--< +1| return 0; + +[Leading delimiter] = 1:14-1:15 + >-< +1| return 0; + +[Domain] = 1:8-1:17 + >---------< +1| return 0; + +[Insertion delimiter] = " " diff --git a/data/fixtures/scopes/dart/value/value.switch.scope b/data/fixtures/scopes/dart/value/value.switch.scope new file mode 100644 index 0000000000..2b25bd43a0 --- /dev/null +++ b/data/fixtures/scopes/dart/value/value.switch.scope @@ -0,0 +1,15 @@ +void main() { + switch (foo) {} +} +--- + +[Content] = +[Removal] = 1:12-1:15 + >---< +1| switch (foo) {} + +[Domain] = 1:4-1:19 + >---------------< +1| switch (foo) {} + +[Insertion delimiter] = " " diff --git a/data/fixtures/scopes/dart/value/value.throw.scope b/data/fixtures/scopes/dart/value/value.throw.scope new file mode 100644 index 0000000000..307804dd65 --- /dev/null +++ b/data/fixtures/scopes/dart/value/value.throw.scope @@ -0,0 +1,22 @@ +void main() { + throw foo; +} +--- + +[Content] = 1:10-1:13 + >---< +1| throw foo; + +[Removal] = 1:9-1:13 + >----< +1| throw foo; + +[Leading delimiter] = 1:9-1:10 + >-< +1| throw foo; + +[Domain] = 1:4-1:14 + >----------< +1| throw foo; + +[Insertion delimiter] = " " diff --git a/data/fixtures/scopes/dart/value/value.typeAlias.scope b/data/fixtures/scopes/dart/value/value.typeAlias.scope new file mode 100644 index 0000000000..33fd00595a --- /dev/null +++ b/data/fixtures/scopes/dart/value/value.typeAlias.scope @@ -0,0 +1,20 @@ +typedef Foo = int; +--- + +[Content] = 0:14-0:17 + >---< +0| typedef Foo = int; + +[Removal] = 0:11-0:17 + >------< +0| typedef Foo = int; + +[Leading delimiter] = 0:11-0:14 + >---< +0| typedef Foo = int; + +[Domain] = 0:0-0:18 + >------------------< +0| typedef Foo = int; + +[Insertion delimiter] = " " diff --git a/data/fixtures/scopes/dart/value/value.variable.scope b/data/fixtures/scopes/dart/value/value.variable.scope new file mode 100644 index 0000000000..f3c6a1415a --- /dev/null +++ b/data/fixtures/scopes/dart/value/value.variable.scope @@ -0,0 +1,22 @@ +void main() { + var foo = 0; +} +--- + +[Content] = 1:14-1:15 + >-< +1| var foo = 0; + +[Removal] = 1:11-1:15 + >----< +1| var foo = 0; + +[Leading delimiter] = 1:11-1:14 + >---< +1| var foo = 0; + +[Domain] = 1:4-1:16 + >------------< +1| var foo = 0; + +[Insertion delimiter] = " " diff --git a/data/fixtures/scopes/dart/value/value.yield.scope b/data/fixtures/scopes/dart/value/value.yield.scope new file mode 100644 index 0000000000..4646c52836 --- /dev/null +++ b/data/fixtures/scopes/dart/value/value.yield.scope @@ -0,0 +1,22 @@ +void main() { + yield 0; +} +--- + +[Content] = 1:10-1:11 + >-< +1| yield 0; + +[Removal] = 1:9-1:11 + >--< +1| yield 0; + +[Leading delimiter] = 1:9-1:10 + >-< +1| yield 0; + +[Domain] = 1:4-1:12 + >--------< +1| yield 0; + +[Insertion delimiter] = " " diff --git a/packages/common/src/scopeSupportFacets/dart.ts b/packages/common/src/scopeSupportFacets/dart.ts index 9a6d3b1760..4d7179e1f3 100644 --- a/packages/common/src/scopeSupportFacets/dart.ts +++ b/packages/common/src/scopeSupportFacets/dart.ts @@ -1,13 +1,326 @@ 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; export const dartScopeSupport: LanguageScopeSupportFacetMap = { - ifStatement: supported, + disqualifyDelimiter: supported, list: supported, map: supported, + ifStatement: supported, + anonymousFunction: supported, + class: supported, + "class.iteration.document": supported, + + namedFunction: supported, + "namedFunction.constructor": supported, + "namedFunction.method": supported, + "namedFunction.iteration.document": supported, + "namedFunction.iteration.class": supported, + + functionCall: supported, + "functionCall.constructor": supported, + "functionCall.method": supported, + "functionCall.chain": supported, + "functionCall.generic": supported, + "functionCall.enum": supported, + functionCallee: supported, + "functionCallee.constructor": supported, + "functionCallee.method": supported, + "functionCallee.chain": supported, + "functionCallee.generic": supported, + "functionCallee.enum": supported, + + "argument.actual.singleLine": supported, + "argument.actual.multiLine": supported, + "argument.actual.iteration": supported, + "argument.actual.constructor.singleLine": supported, + "argument.actual.constructor.multiLine": supported, + "argument.actual.constructor.iteration": supported, + "argument.actual.method.singleLine": supported, + "argument.actual.method.multiLine": supported, + "argument.actual.method.iteration": supported, + "argument.formal.singleLine": supported, + "argument.formal.multiLine": supported, + "argument.formal.iteration": supported, + "argument.formal.constructor.singleLine": supported, + "argument.formal.constructor.multiLine": supported, + "argument.formal.constructor.iteration": supported, + "argument.formal.method.singleLine": supported, + "argument.formal.method.multiLine": supported, + "argument.formal.method.iteration": supported, + "argument.formal.lambda.singleLine": supported, + "argument.formal.lambda.multiLine": supported, + "argument.formal.lambda.iteration": supported, + "argument.catch": supported, + + "argumentList.actual.empty": supported, + "argumentList.actual.singleLine": supported, + "argumentList.actual.multiLine": supported, + "argumentList.actual.constructor.empty": supported, + "argumentList.actual.constructor.singleLine": supported, + "argumentList.actual.constructor.multiLine": supported, + "argumentList.actual.method.empty": supported, + "argumentList.actual.method.singleLine": supported, + "argumentList.actual.method.multiLine": supported, + "argumentList.formal.empty": supported, + "argumentList.formal.singleLine": supported, + "argumentList.formal.multiLine": supported, + "argumentList.formal.constructor.empty": supported, + "argumentList.formal.constructor.singleLine": supported, + "argumentList.formal.constructor.multiLine": supported, + "argumentList.formal.method.empty": supported, + "argumentList.formal.method.singleLine": supported, + "argumentList.formal.method.multiLine": supported, + "argumentList.formal.lambda.empty": supported, + "argumentList.formal.lambda.singleLine": supported, + "argumentList.formal.lambda.multiLine": supported, + + "collectionItem.unenclosed.singleLine": supported, + "collectionItem.unenclosed.multiLine": supported, + "collectionItem.unenclosed.iteration": supported, + + "branch.if": supported, + "branch.if.elif.else": supported, + "branch.if.else": supported, + "branch.if.iteration": supported, + "branch.try": supported, + "branch.try.iteration": supported, + "branch.switchCase": supported, + "branch.switchCase.iteration": supported, + "branch.ternary": supported, + "branch.ternary.iteration": supported, + + "comment.block": supported, + "comment.line": supported, + + "condition.if": supported, + "condition.while": supported, + "condition.doWhile": supported, + "condition.for": supported, + "condition.switchCase": supported, + "condition.switchCase.iteration": supported, + "condition.ternary": supported, + + "statement.class": supported, + "statement.enum": supported, + "statement.field.class": supported, + "statement.function": supported, + "statement.constructor": supported, + "statement.method": supported, + "statement.functionCall": supported, + "statement.if": supported, + "statement.try": supported, + "statement.switch": supported, + "statement.for": supported, + "statement.foreach": supported, + "statement.while": supported, + "statement.doWhile": supported, + "statement.assignment": supported, + "statement.assignment.compound": supported, + "statement.constant": supported, + "statement.variable.uninitialized": supported, + "statement.variable.initialized": supported, + "statement.typeAlias": supported, + "statement.update": supported, + "statement.return": supported, + "statement.yield": supported, + "statement.throw": supported, + "statement.break": supported, + "statement.continue": supported, + "statement.import": supported, + "statement.iteration.document": supported, + "statement.iteration.class": supported, + "statement.iteration.block": supported, + + "string.singleLine": supported, + "string.multiLine": supported, + + "textFragment.comment.block": supported, + "textFragment.comment.line": supported, + "textFragment.string.singleLine": supported, + "textFragment.string.multiLine": supported, + + "name.argument.actual": supported, + "name.argument.actual.iteration": supported, + "name.argument.formal": supported, + "name.argument.formal.iteration": supported, + "name.argument.formal.constructor": supported, + "name.argument.formal.constructor.iteration": supported, + "name.argument.formal.method": supported, + "name.argument.formal.method.iteration": supported, + "name.argument.formal.lambda": supported, + "name.argument.formal.lambda.iteration": supported, + "name.argument.catch": supported, + "name.assignment": supported, + "name.assignment.compound": supported, + "name.constant": supported, + "name.variable.uninitialized": supported, + "name.variable.initialized": supported, + "name.foreach": supported, + "name.function": supported, + "name.constructor": supported, + "name.method": supported, "name.class": supported, + "name.enum": supported, + "name.field.class": supported, + "name.field.enum": supported, + "name.typeAlias": supported, + "name.iteration.document": supported, + "name.iteration.class": supported, + "name.iteration.enum": supported, + "name.iteration.block": supported, + + "key.mapPair": supported, + "key.mapPair.iteration": supported, + + "value.argument.actual": supported, + "value.argument.actual.iteration": supported, + "value.argument.formal": supported, + "value.argument.formal.iteration": supported, + "value.argument.formal.lambda": supported, + "value.argument.formal.lambda.iteration": supported, + "value.argument.formal.constructor": supported, + "value.argument.formal.constructor.iteration": supported, + "value.argument.formal.method": supported, + "value.argument.formal.method.iteration": supported, + "value.mapPair": supported, + "value.mapPair.iteration": supported, + "value.assignment": supported, + "value.assignment.compound": supported, + "value.constant": supported, + "value.variable": supported, + "value.foreach": supported, + "value.return": supported, + "value.return.lambda": supported, + "value.switch": supported, + "value.field.class": supported, + "value.yield": supported, + "value.throw": supported, + "value.typeAlias": supported, + "value.iteration.document": supported, + "value.iteration.class": supported, + "value.iteration.block": supported, + + "type.argument.formal": supported, + "type.argument.formal.iteration": supported, + "type.argument.formal.constructor": supported, + "type.argument.formal.constructor.iteration": supported, + "type.argument.formal.method": supported, + "type.argument.formal.method.iteration": supported, + "type.argument.formal.lambda": supported, + "type.argument.formal.lambda.iteration": supported, + "type.argument.catch": supported, + "type.return": supported, + "type.return.method": supported, + "type.foreach": supported, + "type.field.class": supported, + "type.constant": supported, + "type.variable.uninitialized": supported, + "type.variable.initialized": supported, + "type.typeArgument": supported, + "type.typeArgument.iteration": supported, + "type.class": supported, + "type.enum": supported, + "type.alias": supported, + "type.cast": supported, + "type.iteration.document": supported, + "type.iteration.class": supported, + "type.iteration.block": supported, + + "interior.class": supported, + "interior.enum": supported, + "interior.function": supported, + "interior.constructor": supported, + "interior.method": supported, + "interior.lambda": supported, + "interior.if": supported, + "interior.try": supported, + "interior.switch": supported, + "interior.switchCase": supported, + "interior.for": supported, + "interior.foreach": supported, + "interior.while": supported, + "interior.doWhile": supported, + + /* UNSUPPORTED */ + + fieldAccess: unsupported, + + /* NOT APPLICABLE */ + + // Interface (Dart has abstract classes instead) + "statement.interface": notApplicable, + "statement.field.interface": notApplicable, + "statement.iteration.interface": notApplicable, + "name.interface": notApplicable, + "name.field.interface": notApplicable, + "name.iteration.interface": notApplicable, + "type.interface": notApplicable, + "type.field.interface": notApplicable, + "type.iteration.interface": notApplicable, + "value.field.interface": notApplicable, + "interior.interface": notApplicable, + + // Namespace / package declaration statements + "statement.package": notApplicable, + "statement.namespace": notApplicable, + "name.namespace": notApplicable, + "interior.namespace": notApplicable, + + // Resource statements + "statement.resource": notApplicable, + "name.resource": notApplicable, + "value.resource": notApplicable, + "type.resource": notApplicable, + "interior.resource": notApplicable, + + // Command / markup / notebook + command: notApplicable, + "statement.command": notApplicable, + "name.command": notApplicable, + "value.command": notApplicable, + "interior.command": notApplicable, + section: notApplicable, + "section.iteration.document": notApplicable, + "section.iteration.parent": notApplicable, + element: notApplicable, + tags: notApplicable, + startTag: notApplicable, + endTag: notApplicable, + "interior.element": notApplicable, + "textFragment.element": notApplicable, + attribute: notApplicable, + "key.attribute": notApplicable, + "value.attribute": notApplicable, + notebookCell: notApplicable, + "interior.cell": notApplicable, + + // Language constructs not modeled in Dart this way + "branch.loop": notApplicable, + "branch.loop.iteration": notApplicable, + "statement.assignment.destructuring": notApplicable, + "statement.variable.destructuring": notApplicable, + "name.assignment.destructuring": notApplicable, + "name.variable.destructuring": notApplicable, + "value.assignment.destructuring": notApplicable, + "value.variable.destructuring": notApplicable, + + // Enum values + "value.field.enum": notApplicable, + "value.iteration.enum": notApplicable, + + // Static statement + "interior.static": notApplicable, + "statement.static": notApplicable, + + // Miscellaneous + "statement.misc": notApplicable, + "class.iteration.class": notApplicable, + regularExpression: notApplicable, + environment: notApplicable, + selector: notApplicable, + unit: notApplicable, + pairDelimiter: notApplicable, }; diff --git a/queries/dart.scm b/queries/dart.scm index 8649c3e550..be4cf0a597 100644 --- a/queries/dart.scm +++ b/queries/dart.scm @@ -1,10 +1,220 @@ -;;!! if () {} +;; https://github.com/UserNobody14/tree-sitter-dart/blob/master/src/grammar.json + +[ + (library_import) + (class_definition) + (expression_statement) + (return_statement) + (yield_statement) + (while_statement) + (try_statement) + (do_statement) + (break_statement) + (continue_statement) + (for_statement) + (switch_statement) + (enum_declaration) + (type_alias) +] @statement + +( + (local_variable_declaration) @statement + (#not-parent-type? @statement for_loop_parts) +) + +( + (program) @class.iteration @statement.iteration @namedFunction.iteration + (#document-range! @class.iteration @statement.iteration @namedFunction.iteration) +) + +( + (program) @name.iteration @value.iteration @type.iteration + (#document-range! @name.iteration @value.iteration @type.iteration) +) + +;;!! { } +;;! ^ +(_ + . + "{" @interior.start.endOf + "}" @interior.end.startOf + . +) + +;;!! { } +;;! ^ +(block + "{" @name.iteration.start.endOf @value.iteration.start.endOf @type.iteration.start.endOf + "}" @name.iteration.end.startOf @value.iteration.end.startOf @type.iteration.end.startOf +) + +(block + "{" @statement.iteration.start.endOf + "}" @statement.iteration.end.startOf +) + +;;!! int foo = 0; +;;! ^^^ +;;! ^^^ +;;! ^ +(local_variable_declaration + (initialized_variable_definition + (type_identifier)? @type.start + (type_arguments)? @type.end + name: (_) @name @value.leading.endOf @name.removal.end.endOf + value: (_)? @value @name.removal.end.startOf @name.removal.end.startOf + ) +) @_.domain @name.removal.start.startOf + +;;!! Map foo; +;;! ^^^^^^^^^ +(type_arguments + "<" @type.iteration.start.endOf + ">" @type.iteration.end.startOf +) + +;;!! Map foo; +;;! ^^^ ^^^ +(type_arguments + (type_identifier) @type +) + +;;!! var foo, bar; +;;! ^^^^^^^^ +(_ + [ + (inferred_type) + (type_identifier) + ] @collectionItem.iteration.domain.start + . + (initialized_identifier_list) @collectionItem.iteration + . + ";" @collectionItem.iteration.domain.end +) + +;;!! var foo, bar; +;;! ^^^ ^^^ +( + (initialized_identifier_list + (_)? @_.leading.endOf + . + (_) @collectionItem + . + (_)? @_.trailing.startOf + ) @_dummy + (#not-type? @collectionItem comment) + (#single-or-multi-line-delimiter! @collectionItem @_dummy ", " ",\n") +) + +;;!! const foo = 0; +;;! ^^^^^^^^^^^^^^ +;;! ^^^ +;;! ^ +(_ + (const_builtin) @statement.start @_.domain.start @name.removal.start.startOf + . + (type_identifier)? @type + . + (static_final_declaration_list + (static_final_declaration + (_) @name @value.leading.endOf + (_) @value @name.removal.end.startOf + ) + ) + . + ";" @statement.end @_.domain.end +) + +;;!! foo = 0; +;;! ^^^ +;;! ^ +(expression_statement + (assignment_expression + left: (_) @name @value.leading.endOf + right: (_) @value @name.trailing.startOf + ) +) @_.domain + +;;!! if () {} else {} +;;! ^^^^^^^^^^^^^^^^ ;;! ^^^^^^^^ ( - (if_statement) @ifStatement @statement + (if_statement + "if" @branch.start @branch.removal.start + . + (_) @condition + consequence: (_) @branch.end @branch.removal.end + "else"? @branch.removal.end.startOf + alternative: (if_statement)? @branch.removal.end.startOf + ) @ifStatement @statement @condition.domain (#not-parent-type? @ifStatement if_statement) ) +( + (if_statement) @branch.iteration + (#not-parent-type? @branch.iteration if_statement) +) + +;;!! else if () {} +;;! ^^^^^^^^^^^^^ +(if_statement + "else" @condition.domain.start @branch.start @branch.removal.start + (if_statement + . + (_) @condition + consequence: (_) @condition.domain.end @branch.end @branch.removal.end + "else"? @branch.removal.end.startOf + ) +) + +;;!! else {} +;;! ^^^^^^^ +(if_statement + "else" @branch.start + alternative: (block) @branch.end +) + +;;!! try {} catch () {} finally {} +;;! ^^^^^^ +(try_statement + "try" @branch.start + body: (_) @branch.end +) @branch.iteration + +;;!! catch (e, s) {} +;;! ^^^^^^^^^^^^^^^ +;;! ^^^^ +(try_statement + (type_identifier)? @type + (catch_clause + "catch" @branch.start @argumentList.domain.start @argumentOrParameter.iteration.domain.start + (catch_parameters + "(" @argumentList.start.endOf @argumentOrParameter.iteration.start.endOf + ")" @argumentList.end.startOf @argumentOrParameter.iteration.end.startOf + ) + ) + . + (block) @branch.end @argumentList.domain.end @argumentOrParameter.iteration.domain.end +) + +;;!! catch (e, s) {} +;;! ^ ^ +( + (catch_parameters + (_)? @argumentOrParameter.leading.endOf + . + (_) @argumentOrParameter @name + . + (_)? @argumentOrParameter.trailing.startOf + ) @_dummy + (#not-type? @argumentOrParameter comment) + (#single-or-multi-line-delimiter! @argumentOrParameter @_dummy ", " ",\n") +) + +;;!! finally () +;;! ^^^^^^^^^^ +(finally_clause) @branch + ;;!! [ 0 ] ;;! ^^^^^ [ @@ -12,15 +222,492 @@ (list_pattern) ] @list -;;!! { value: 0 } -;;! ^^^^^^^^^^^^ -[ - (set_or_map_literal) - (map_pattern) -] @map +;;!! {"aaa": 0, "bbb": 1} +;;! ^^^^^^^^^^^^^^^^^^^^ +;;! ^^^^^^^^^^^^^^^^^^ +(set_or_map_literal + "{" @collectionKey.iteration.start.endOf @value.iteration.start.endOf + "}" @collectionKey.iteration.end.startOf @value.iteration.end.startOf +) @map + +;;!! final {"aaa": 0, "bbb": 1} = foo; +;;! ^^^^^^^^^^^^^^^^^^^^ +;;! ^^^^^^^^^^^^^^^^^^ +(map_pattern + "{" @collectionKey.iteration.start.endOf @value.iteration.start.endOf + "}" @collectionKey.iteration.end.startOf @value.iteration.end.startOf +) @map + +;;!! {"aaa": 0, "bbb": 1} +;;! ^^^^^ ^^^^^ +;;! ^ ^ +(pair + key: (_) @collectionKey @value.leading.endOf + value: (_) @value @collectionKey.trailing.startOf +) @_.domain + +;;!! final {"aaa": bar, "bbb": baz} = foo; +;;! ^^^^^ ^^^^^ +;;! ^^^ ^^^ +(map_pattern + (_) @collectionKey @value.leading.endOf @_.domain.start + . + ":" + . + (_) @value @collectionKey.trailing.startOf @_.domain.end +) ;;!! class Foo {} ;;! ^^^^^^^^^^^^ (class_definition name: (_) @name -) @class @name.domain +) @class @type @name.domain + +;;!! class Foo { } +;;! ^ +(class_body + "{" @namedFunction.iteration.start.endOf @statement.iteration.start.endOf + "}" @namedFunction.iteration.end.startOf @statement.iteration.end.startOf +) + +(class_body + "{" @name.iteration.start.endOf @value.iteration.start.endOf @type.iteration.start.endOf + "}" @name.iteration.end.startOf @value.iteration.end.startOf @type.iteration.end.startOf +) + +;;!! var foo = 0; +;;! ^^^^^^^^^^^^ +;;! ^^^ +;;! ^ +(class_body + (declaration + (type_identifier)? @type + (initialized_identifier_list + (initialized_identifier + (_) @name @value.leading.endOf + (_) @value @name.removal.end.startOf + ) + ) + ) @statement.start @name.removal.start.startOf @_.domain.start + . + ";" @statement.end @_.domain.end +) + +;;!! var foo; +;;! ^^^^^^^^ +;;! ^^^ +(class_body + (declaration + (type_identifier)? @type + (initialized_identifier_list + (initialized_identifier + . + (_) @name + . + ) + ) + ) @statement.start @name.removal.start @_.domain.start + . + ";" @statement.end @name.removal.end @_.domain.end +) + +;;!! enum Foo {} +;;! ^^^ +(enum_declaration + name: (_) @name +) @type @name.domain + +;;!! enum Foo { } +;;! ^ +(enum_body + "{" @name.iteration.start.endOf + "}" @name.iteration.end.startOf +) + +;;!! bar, +;;! ^^^ +( + (enum_constant + name: (_) @name + ) @name.domain + (#not-eq? @name.domain "") +) + +;;!! bar(), +;;! ^^^^^ +;;! ^^^ +(enum_constant + name: (_) @functionCallee + (argument_part) +) @functionCall @functionCallee.domain + +;;!! foo as int +;;! ^^^ +(type_cast_expression + (type_cast + (as_operator) + (_) @type + ) +) @type.domain + +;;!! "hello world" +;;! ^^^^^^^^^^^^^ +;;! ^^^^^^^^^^^ +(string_literal + _ @textFragment.start.endOf + _ @textFragment.end.startOf +) @string + +;;!! // Hello world +;;! ^^^^^^^^^^^^^^ +(comment) @comment @textFragment + +;;!! void foo() {} +;;! ^^^^^^^^^^^^^ +;;! ^^^^ +;;! ^^^ +(_ + (function_signature + . + (_) @type + name: (_) @name + ) @namedFunction.start @statement.start @_.domain.start + . + (function_body) @namedFunction.end @statement.end @_.domain.end +) + +;;!! void foo() {} +;;! ^^^^^^^^^^^^^ +;;! ^^^^ +;;! ^^^ +(_ + (method_signature + (_ + . + (_)? @type + name: (_) @name + ) + ) @namedFunction.start @statement.start @_.domain.start + . + (function_body) @namedFunction.end @statement.end @_.domain.end +) + +;;!! void foo(aaa, bbb) {} +;;! ^^^^^^^^ +(_ + (function_signature + (formal_parameter_list + "(" @argumentList.removal.start.endOf @argumentOrParameter.iteration.start.endOf + ")" @argumentList.removal.end.startOf @argumentOrParameter.iteration.end.startOf + ) @argumentList + (#empty-single-multi-delimiter! @argumentList @argumentList "" ", " ",\n") + (#child-range! @argumentList 1 -2) + ) @argumentList.domain.start @argumentOrParameter.iteration.domain.start + . + (function_body) @argumentList.domain.end @argumentOrParameter.iteration.domain.end +) + +;;!! void foo(aaa, bbb) {} +;;! ^^^^^^^^ +(_ + (method_signature + (_ + (formal_parameter_list + "(" @argumentList.removal.start.endOf @argumentOrParameter.iteration.start.endOf + ")" @argumentList.removal.end.startOf @argumentOrParameter.iteration.end.startOf + ) @argumentList + (#empty-single-multi-delimiter! @argumentList @argumentList "" ", " ",\n") + (#child-range! @argumentList 1 -2) + ) @argumentList.domain.start @argumentOrParameter.iteration.domain.start + ) + . + (function_body) @argumentList.domain.end @argumentOrParameter.iteration.domain.end +) + +;;!! void foo(aaa, bbb) {} +;;! ^^^ ^^^ +( + (formal_parameter_list + (_)? @_.leading.endOf + . + (_) @argumentOrParameter + . + (_)? @_.trailing.startOf + ) @_dummy + (#not-type? @argumentOrParameter comment) + (#single-or-multi-line-delimiter! @argumentOrParameter @_dummy ", " ",\n") +) + +;;!! void foo(aaa, bbb) {} +;;! ^^^^^^^^ +(formal_parameter_list + "(" @name.iteration.start.endOf @value.iteration.start.endOf @type.iteration.start.endOf + ")" @name.iteration.end.startOf @value.iteration.end.startOf @type.iteration.end.startOf +) + +;;!! int aaa = 0 +;;! ^^^ +;;! ^^^ +;;! ^ +(_ + (formal_parameter + (type_identifier)? @type + (identifier) @name @value.leading.endOf + ) @_.domain.start + . + ( + "=" + . + (_) @value @_.domain.end + )? +) + +;;!! foo(); +;;! ^^^^^ +;;! ^^^ +(_ + (identifier) @functionCallee.start @functionCall.start @functionCallee.domain.start + . + (selector)* @functionCallee.end + . + (selector + (argument_part + (type_arguments)? @functionCallee.end + (arguments) + ) + ) @functionCall.end @functionCallee.domain.end +) + +;;!! foo(aaa, bbb) +;;! ^^^^^^^^ +(_ + (identifier) @argumentList.domain.start @argumentOrParameter.iteration.domain.start + . + (selector)* + . + (selector + (argument_part + (arguments + "(" @argumentList.removal.start.endOf @argumentOrParameter.iteration.start.endOf + ")" @argumentList.removal.end.startOf @argumentOrParameter.iteration.end.startOf + ) @argumentList + ) + ) @argumentList.domain.end @argumentOrParameter.iteration.domain.end + (#empty-single-multi-delimiter! @argumentList @argumentList "" ", " ",\n") + (#child-range! @argumentList 1 -2) +) + +;;!! foo(aaa, bbb); +;;! ^^^ ^^^ +( + (arguments + (_)? @_.leading.endOf + . + (_) @argumentOrParameter + . + (_)? @_.trailing.startOf + ) @_dummy + (#not-type? @argumentOrParameter comment) + (#single-or-multi-line-delimiter! @argumentOrParameter @_dummy ", " ",\n") +) + +;;!! foo(aaa, bbb); +;;! ^^^^^^^^ +(arguments + "(" @name.iteration.start.endOf @value.iteration.start.endOf + ")" @name.iteration.end.startOf @value.iteration.end.startOf +) + +;;!! foo(aaa: 0, bbb: 1); +;;! ^^^ ^^^ +;;! ^ ^ +(named_argument + (label + (_) @name @value.leading.endOf + ) + (_) @value @name.trailing.startOf +) @_.domain + +;;!! () {} +;;!! () => 0 +(function_expression + (function_expression_body + [ + (block) + ( + "=>" + (_) @value + ) + ] + ) +) @anonymousFunction @value.domain + +;;!! (aaa, bbb) => {} +;;! ^^^^^^^^ +(function_expression + (formal_parameter_list + "(" @argumentList.removal.start.endOf @argumentOrParameter.iteration.start.endOf + ")" @argumentList.removal.end.startOf @argumentOrParameter.iteration.end.startOf + ) @argumentList + (#empty-single-multi-delimiter! @argumentList @argumentList "" ", " ",\n") + (#child-range! @argumentList 1 -2) +) @argumentList.domain @argumentOrParameter.iteration.domain + +;;!! return 0; +;;! ^ +(return_statement + (_) @value +) @value.domain + +;;!! yield 0; +;;! ^ +(yield_statement + (_) @value +) @value.domain + +;;!! throw foo; +;;! ^^^ +(expression_statement + (throw_expression + (_) @value + ) +) @value.domain + +;;!! for (var i = 0; i < size; i++) {} +;;! ^^^^^^^^ +(for_statement + (for_loop_parts + condition: (_) @condition + ) +) @condition.domain + +;;!! for (final v in values) {} +;;! ^ +;;! ^^^^^^ +(for_statement + (for_loop_parts + (type_identifier)? @type + name: (_) @name + value: (_) @value + ) +) @_.domain + +;;!! while (true) {} +;;! ^^^^ +(while_statement + (parenthesized_expression + (_) @condition + ) +) @condition.domain + +;;!! do {} while (true); +;;! ^^^^ +(do_statement + (parenthesized_expression + (_) @condition + ) +) @condition.domain + +;;!! switch (foo) {} +;;! ^^^ +(switch_statement + (parenthesized_expression + (_) @value + ) +) @value.domain + +;;!! case 0: break; +;;! ^^^^^^^^^^^^^^ +;;! ^ +(switch_statement_case + (case_builtin) + . + (_) @condition +) @branch @condition.domain + +;;!! case 0: break; +;;! ^^^^^^^ +(switch_statement_case + ":" @interior.start.endOf + . + (_) @interior.end.endOf @_dummy + (_)? @interior.end.endOf + . + (#not-type? @_dummy block) +) + +;;!! default: break; +;;! ^^^^^^^^^^^^^^^ +(switch_statement_default) @branch + +;;!! default: break; +;;! ^^^^^^^ +(switch_statement_default + ":" @interior.start.endOf + . + (_) @interior.end.endOf @_dummy + (_)? @interior.end.endOf + . + (#not-type? @_dummy block) +) + +;;!! switch () { } +;;! ^ +(switch_block + "{" @branch.iteration.start.endOf @condition.iteration.start.endOf + "}" @branch.iteration.end.startOf @condition.iteration.end.startOf +) + +;;!! true ? 0 : 1; +;;! ^^^^ +;;! ^ ^ +(conditional_expression + . + (_) @condition + consequence: (_) @branch +) @condition.domain + +(conditional_expression + alternative: (_) @branch +) + +;;!! true ? 0 : 1; +(conditional_expression) @branch.iteration + +;;!! typedef Foo = int; +;;! ^^^ +;;! ^^^ +(type_alias + "typedef" @name.removal.start.startOf + (_) @name @value.leading.endOf + (_) @value @name.removal.end.startOf +) @type @_.domain + +(relational_operator + [ + "<" + ">" + "<=" + ">=" + ] +) @disqualifyDelimiter +(shift_operator + [ + "<<" + ">>" + ">>>" + ] +) @disqualifyDelimiter +(assignment_expression + operator: [ + "<<=" + ">>=" + ">>>=" + ] @disqualifyDelimiter +) +(function_expression_body + "=>" @disqualifyDelimiter +) +(function_body + "=>" @disqualifyDelimiter +) diff --git a/queries/java.scm b/queries/java.scm index 5eacffd201..29d829abc3 100644 --- a/queries/java.scm +++ b/queries/java.scm @@ -590,7 +590,7 @@ . (_)? @_.trailing.startOf ) @_dummy - (#not-type? @argumentOrParameter "block_comment") + (#not-type? @argumentOrParameter block_comment) (#single-or-multi-line-delimiter! @argumentOrParameter @_dummy ", " ",\n") ) @@ -604,7 +604,7 @@ . (_)? @_.trailing.startOf ) @_dummy - (#not-type? @argumentOrParameter "block_comment") + (#not-type? @argumentOrParameter block_comment) (#single-or-multi-line-delimiter! @argumentOrParameter @_dummy ", " ",\n") ) diff --git a/queries/javascript.core.scm b/queries/javascript.core.scm index 03eca48113..4447116649 100644 --- a/queries/javascript.core.scm +++ b/queries/javascript.core.scm @@ -812,7 +812,7 @@ . (_)? @_.trailing.startOf ) @_dummy - (#not-type? @argumentOrParameter "comment") + (#not-type? @argumentOrParameter comment) (#single-or-multi-line-delimiter! @argumentOrParameter @_dummy ", " ",\n") ) @@ -826,7 +826,7 @@ . (_)? @_.trailing.startOf ) @_dummy - (#not-type? @argumentOrParameter "comment") + (#not-type? @argumentOrParameter comment) (#single-or-multi-line-delimiter! @argumentOrParameter @_dummy ", " ",\n") )