diff --git a/data/fixtures/recorded/languages/kotlin/changeEveryName2.yml b/data/fixtures/recorded/languages/kotlin/changeEveryName2.yml index 9737b26b9a..16078ea09e 100644 --- a/data/fixtures/recorded/languages/kotlin/changeEveryName2.yml +++ b/data/fixtures/recorded/languages/kotlin/changeEveryName2.yml @@ -28,12 +28,10 @@ finalState: fun main() { val pairs = listOf(Pair(1, "one"), Pair(2, "two"), Pair(3, "three")) - for ((, ) in pairs) { + for ( in pairs) { println("Number: $number, Name: $name") } } selections: - - anchor: {line: 3, character: 10} - active: {line: 3, character: 10} - - anchor: {line: 3, character: 12} - active: {line: 3, character: 12} + - anchor: {line: 3, character: 9} + active: {line: 3, character: 9} diff --git a/data/fixtures/recorded/languages/kotlin/changeName11.yml b/data/fixtures/recorded/languages/kotlin/changeName11.yml deleted file mode 100644 index 04984d9979..0000000000 --- a/data/fixtures/recorded/languages/kotlin/changeName11.yml +++ /dev/null @@ -1,37 +0,0 @@ -languageId: kotlin -command: - version: 7 - spokenForm: change name - action: - name: clearAndSetSelection - target: - type: primitive - modifiers: - - type: containingScope - scopeType: {type: name} - usePrePhraseSnapshot: true -initialState: - documentContents: |- - fun main() { - try { - val result = 10 / 0 - } catch (e: ArithmeticException) { - println("Division by zero!") - } - } - selections: - - anchor: {line: 4, character: 36} - active: {line: 4, character: 36} - marks: {} -finalState: - documentContents: |- - fun main() { - try { - val result = 10 / 0 - } catch (: ArithmeticException) { - println("Division by zero!") - } - } - selections: - - anchor: {line: 3, character: 13} - active: {line: 3, character: 13} diff --git a/data/fixtures/recorded/languages/kotlin/changeState8.yml b/data/fixtures/recorded/languages/kotlin/changeState8.yml index d90327aa5c..77e2703a8f 100644 --- a/data/fixtures/recorded/languages/kotlin/changeState8.yml +++ b/data/fixtures/recorded/languages/kotlin/changeState8.yml @@ -36,8 +36,6 @@ finalState: documentContents: |- package test - - @Annotation class Test { fun add(x: Int, y: Int) = x + y diff --git a/data/fixtures/recorded/languages/kotlin/changeType25.yml b/data/fixtures/recorded/languages/kotlin/changeType25.yml deleted file mode 100644 index 3acb47bc70..0000000000 --- a/data/fixtures/recorded/languages/kotlin/changeType25.yml +++ /dev/null @@ -1,37 +0,0 @@ -languageId: kotlin -command: - version: 7 - spokenForm: change type - action: - name: clearAndSetSelection - target: - type: primitive - modifiers: - - type: containingScope - scopeType: {type: type} - usePrePhraseSnapshot: true -initialState: - documentContents: |- - fun main() { - try { - val result = 10 / 0 - } catch (e: ArithmeticException) { - println("Division by zero!") - } - } - selections: - - anchor: {line: 4, character: 36} - active: {line: 4, character: 36} - marks: {} -finalState: - documentContents: |- - fun main() { - try { - val result = 10 / 0 - } catch (e: ) { - println("Division by zero!") - } - } - selections: - - anchor: {line: 3, character: 16} - active: {line: 3, character: 16} diff --git a/data/fixtures/recorded/languages/kotlin/changeType8.yml b/data/fixtures/recorded/languages/kotlin/changeType8.yml index a5b3c52fb8..f57ac3bd6f 100644 --- a/data/fixtures/recorded/languages/kotlin/changeType8.yml +++ b/data/fixtures/recorded/languages/kotlin/changeType8.yml @@ -17,7 +17,7 @@ initialState: active: {line: 0, character: 10} marks: {} finalState: - documentContents: "typealias Predicate = " + documentContents: "" selections: - - anchor: {line: 0, character: 25} - active: {line: 0, character: 25} + - anchor: {line: 0, character: 0} + active: {line: 0, character: 0} diff --git a/data/fixtures/recorded/languages/kotlin/changeType9.yml b/data/fixtures/recorded/languages/kotlin/changeType9.yml index 0b57d676b2..9ed082d5a6 100644 --- a/data/fixtures/recorded/languages/kotlin/changeType9.yml +++ b/data/fixtures/recorded/languages/kotlin/changeType9.yml @@ -17,7 +17,7 @@ initialState: active: {line: 0, character: 25} marks: {} finalState: - documentContents: "typealias Predicate = " + documentContents: "" selections: - - anchor: {line: 0, character: 25} - active: {line: 0, character: 25} + - anchor: {line: 0, character: 0} + active: {line: 0, character: 0} diff --git a/data/fixtures/recorded/languages/kotlin/chuckBranch.yml b/data/fixtures/recorded/languages/kotlin/chuckBranch.yml index 2fc3ceb9cd..235df08827 100644 --- a/data/fixtures/recorded/languages/kotlin/chuckBranch.yml +++ b/data/fixtures/recorded/languages/kotlin/chuckBranch.yml @@ -26,7 +26,7 @@ finalState: fun main() { if (true) 0 - 1 + else 1 } selections: - anchor: {line: 3, character: 4} diff --git a/data/fixtures/scopes/kotlin/anonymousFunction.scope b/data/fixtures/scopes/kotlin/anonymousFunction.scope new file mode 100644 index 0000000000..5ebd5f1eec --- /dev/null +++ b/data/fixtures/scopes/kotlin/anonymousFunction.scope @@ -0,0 +1,10 @@ +fun() {} +--- + +[Content] = +[Removal] = +[Domain] = 0:0-0:8 + >--------< +0| fun() {} + +[Insertion delimiter] = "\n" diff --git a/data/fixtures/scopes/kotlin/anonymousFunction2.scope b/data/fixtures/scopes/kotlin/anonymousFunction2.scope new file mode 100644 index 0000000000..0665d08d1a --- /dev/null +++ b/data/fixtures/scopes/kotlin/anonymousFunction2.scope @@ -0,0 +1,10 @@ +{x -> 0} +--- + +[Content] = +[Removal] = +[Domain] = 0:0-0:8 + >--------< +0| {x -> 0} + +[Insertion delimiter] = "\n" diff --git a/data/fixtures/scopes/kotlin/argument/argument.actual.constructor.iteration.scope b/data/fixtures/scopes/kotlin/argument/argument.actual.constructor.iteration.scope new file mode 100644 index 0000000000..69ff7aa216 --- /dev/null +++ b/data/fixtures/scopes/kotlin/argument/argument.actual.constructor.iteration.scope @@ -0,0 +1,10 @@ +Foo(aaa, bbb) +--- + +[Content] = 0:4-0:12 + >--------< +0| Foo(aaa, bbb) + +[Domain] = 0:0-0:13 + >-------------< +0| Foo(aaa, bbb) diff --git a/data/fixtures/scopes/kotlin/argument/argument.actual.constructor.iteration2.scope b/data/fixtures/scopes/kotlin/argument/argument.actual.constructor.iteration2.scope new file mode 100644 index 0000000000..5a4d5f34b7 --- /dev/null +++ b/data/fixtures/scopes/kotlin/argument/argument.actual.constructor.iteration2.scope @@ -0,0 +1,10 @@ +class Foo: Bar(aaa, bbb) +--- + +[Content] = 0:15-0:23 + >--------< +0| class Foo: Bar(aaa, bbb) + +[Domain] = 0:11-0:24 + >-------------< +0| class Foo: Bar(aaa, bbb) diff --git a/data/fixtures/scopes/kotlin/argument/argument.actual.constructor.multiLine.scope b/data/fixtures/scopes/kotlin/argument/argument.actual.constructor.multiLine.scope new file mode 100644 index 0000000000..cc80c0d324 --- /dev/null +++ b/data/fixtures/scopes/kotlin/argument/argument.actual.constructor.multiLine.scope @@ -0,0 +1,44 @@ +Foo( + aaa, + bbb +) +--- + +[#1 Content] = +[#1 Domain] = 1:4-1:7 + >---< +1| aaa, + +[#1 Removal] = 1:4-2:4 + >---- +1| aaa, +2| bbb + ----< + +[#1 Trailing delimiter] = 1:7-2:4 + >- +1| aaa, +2| bbb + ----< + +[#1 Insertion delimiter] = ",\n" + + +[#2 Content] = +[#2 Domain] = 2:4-2:7 + >---< +2| bbb + +[#2 Removal] = 1:7-2:7 + >- +1| aaa, +2| bbb + -------< + +[#2 Leading delimiter] = 1:7-2:4 + >- +1| aaa, +2| bbb + ----< + +[#2 Insertion delimiter] = ",\n" diff --git a/data/fixtures/scopes/kotlin/argument/argument.actual.constructor.multiLine2.scope b/data/fixtures/scopes/kotlin/argument/argument.actual.constructor.multiLine2.scope new file mode 100644 index 0000000000..182030c9af --- /dev/null +++ b/data/fixtures/scopes/kotlin/argument/argument.actual.constructor.multiLine2.scope @@ -0,0 +1,44 @@ +class Foo: Bar( + aaa, + bbb +) +--- + +[#1 Content] = +[#1 Domain] = 1:4-1:7 + >---< +1| aaa, + +[#1 Removal] = 1:4-2:4 + >---- +1| aaa, +2| bbb + ----< + +[#1 Trailing delimiter] = 1:7-2:4 + >- +1| aaa, +2| bbb + ----< + +[#1 Insertion delimiter] = ",\n" + + +[#2 Content] = +[#2 Domain] = 2:4-2:7 + >---< +2| bbb + +[#2 Removal] = 1:7-2:7 + >- +1| aaa, +2| bbb + -------< + +[#2 Leading delimiter] = 1:7-2:4 + >- +1| aaa, +2| bbb + ----< + +[#2 Insertion delimiter] = ",\n" diff --git a/data/fixtures/scopes/kotlin/argument/argument.actual.constructor.singleLine.scope b/data/fixtures/scopes/kotlin/argument/argument.actual.constructor.singleLine.scope new file mode 100644 index 0000000000..6adf6fe178 --- /dev/null +++ b/data/fixtures/scopes/kotlin/argument/argument.actual.constructor.singleLine.scope @@ -0,0 +1,33 @@ +Foo(aaa, bbb) +--- + +[#1 Content] = +[#1 Domain] = 0:4-0:7 + >---< +0| Foo(aaa, bbb) + +[#1 Removal] = 0:4-0:9 + >-----< +0| Foo(aaa, bbb) + +[#1 Trailing delimiter] = 0:7-0:9 + >--< +0| Foo(aaa, bbb) + +[#1 Insertion delimiter] = ", " + + +[#2 Content] = +[#2 Domain] = 0:9-0:12 + >---< +0| Foo(aaa, bbb) + +[#2 Removal] = 0:7-0:12 + >-----< +0| Foo(aaa, bbb) + +[#2 Leading delimiter] = 0:7-0:9 + >--< +0| Foo(aaa, bbb) + +[#2 Insertion delimiter] = ", " diff --git a/data/fixtures/scopes/kotlin/argument/argument.actual.constructor.singleLine2.scope b/data/fixtures/scopes/kotlin/argument/argument.actual.constructor.singleLine2.scope new file mode 100644 index 0000000000..dcab830225 --- /dev/null +++ b/data/fixtures/scopes/kotlin/argument/argument.actual.constructor.singleLine2.scope @@ -0,0 +1,33 @@ +class Foo: Bar(aaa, bbb) +--- + +[#1 Content] = +[#1 Domain] = 0:15-0:18 + >---< +0| class Foo: Bar(aaa, bbb) + +[#1 Removal] = 0:15-0:20 + >-----< +0| class Foo: Bar(aaa, bbb) + +[#1 Trailing delimiter] = 0:18-0:20 + >--< +0| class Foo: Bar(aaa, bbb) + +[#1 Insertion delimiter] = ", " + + +[#2 Content] = +[#2 Domain] = 0:20-0:23 + >---< +0| class Foo: Bar(aaa, bbb) + +[#2 Removal] = 0:18-0:23 + >-----< +0| class Foo: Bar(aaa, bbb) + +[#2 Leading delimiter] = 0:18-0:20 + >--< +0| class Foo: Bar(aaa, bbb) + +[#2 Insertion delimiter] = ", " diff --git a/data/fixtures/scopes/kotlin/argument/argument.actual.iteration.scope b/data/fixtures/scopes/kotlin/argument/argument.actual.iteration.scope new file mode 100644 index 0000000000..1b28526f67 --- /dev/null +++ b/data/fixtures/scopes/kotlin/argument/argument.actual.iteration.scope @@ -0,0 +1,10 @@ +foo(aaa, bbb) +--- + +[Content] = 0:4-0:12 + >--------< +0| foo(aaa, bbb) + +[Domain] = 0:0-0:13 + >-------------< +0| foo(aaa, bbb) diff --git a/data/fixtures/scopes/kotlin/argument/argument.actual.method.iteration.scope b/data/fixtures/scopes/kotlin/argument/argument.actual.method.iteration.scope new file mode 100644 index 0000000000..8b3899b4a1 --- /dev/null +++ b/data/fixtures/scopes/kotlin/argument/argument.actual.method.iteration.scope @@ -0,0 +1,10 @@ +foo.bar(aaa, bbb) +--- + +[Content] = 0:8-0:16 + >--------< +0| foo.bar(aaa, bbb) + +[Domain] = 0:0-0:17 + >-----------------< +0| foo.bar(aaa, bbb) diff --git a/data/fixtures/scopes/kotlin/argument/argument.actual.method.multiLine.scope b/data/fixtures/scopes/kotlin/argument/argument.actual.method.multiLine.scope new file mode 100644 index 0000000000..7dace79cea --- /dev/null +++ b/data/fixtures/scopes/kotlin/argument/argument.actual.method.multiLine.scope @@ -0,0 +1,44 @@ +foo.bar( + aaa, + bbb +) +--- + +[#1 Content] = +[#1 Domain] = 1:4-1:7 + >---< +1| aaa, + +[#1 Removal] = 1:4-2:4 + >---- +1| aaa, +2| bbb + ----< + +[#1 Trailing delimiter] = 1:7-2:4 + >- +1| aaa, +2| bbb + ----< + +[#1 Insertion delimiter] = ",\n" + + +[#2 Content] = +[#2 Domain] = 2:4-2:7 + >---< +2| bbb + +[#2 Removal] = 1:7-2:7 + >- +1| aaa, +2| bbb + -------< + +[#2 Leading delimiter] = 1:7-2:4 + >- +1| aaa, +2| bbb + ----< + +[#2 Insertion delimiter] = ",\n" diff --git a/data/fixtures/scopes/kotlin/argument/argument.actual.method.singleLine.scope b/data/fixtures/scopes/kotlin/argument/argument.actual.method.singleLine.scope new file mode 100644 index 0000000000..d22bd33706 --- /dev/null +++ b/data/fixtures/scopes/kotlin/argument/argument.actual.method.singleLine.scope @@ -0,0 +1,33 @@ +foo.bar(aaa, bbb) +--- + +[#1 Content] = +[#1 Domain] = 0:8-0:11 + >---< +0| foo.bar(aaa, bbb) + +[#1 Removal] = 0:8-0:13 + >-----< +0| foo.bar(aaa, bbb) + +[#1 Trailing delimiter] = 0:11-0:13 + >--< +0| foo.bar(aaa, bbb) + +[#1 Insertion delimiter] = ", " + + +[#2 Content] = +[#2 Domain] = 0:13-0:16 + >---< +0| foo.bar(aaa, bbb) + +[#2 Removal] = 0:11-0:16 + >-----< +0| foo.bar(aaa, bbb) + +[#2 Leading delimiter] = 0:11-0:13 + >--< +0| foo.bar(aaa, bbb) + +[#2 Insertion delimiter] = ", " diff --git a/data/fixtures/scopes/kotlin/argument/argument.actual.multiLine.scope b/data/fixtures/scopes/kotlin/argument/argument.actual.multiLine.scope new file mode 100644 index 0000000000..5ad321caa7 --- /dev/null +++ b/data/fixtures/scopes/kotlin/argument/argument.actual.multiLine.scope @@ -0,0 +1,44 @@ +foo( + aaa, + bbb +) +--- + +[#1 Content] = +[#1 Domain] = 1:4-1:7 + >---< +1| aaa, + +[#1 Removal] = 1:4-2:4 + >---- +1| aaa, +2| bbb + ----< + +[#1 Trailing delimiter] = 1:7-2:4 + >- +1| aaa, +2| bbb + ----< + +[#1 Insertion delimiter] = ",\n" + + +[#2 Content] = +[#2 Domain] = 2:4-2:7 + >---< +2| bbb + +[#2 Removal] = 1:7-2:7 + >- +1| aaa, +2| bbb + -------< + +[#2 Leading delimiter] = 1:7-2:4 + >- +1| aaa, +2| bbb + ----< + +[#2 Insertion delimiter] = ",\n" diff --git a/data/fixtures/scopes/kotlin/argument/argument.actual.singleLine.scope b/data/fixtures/scopes/kotlin/argument/argument.actual.singleLine.scope new file mode 100644 index 0000000000..b1a9403ff3 --- /dev/null +++ b/data/fixtures/scopes/kotlin/argument/argument.actual.singleLine.scope @@ -0,0 +1,33 @@ +foo(aaa, bbb) +--- + +[#1 Content] = +[#1 Domain] = 0:4-0:7 + >---< +0| foo(aaa, bbb) + +[#1 Removal] = 0:4-0:9 + >-----< +0| foo(aaa, bbb) + +[#1 Trailing delimiter] = 0:7-0:9 + >--< +0| foo(aaa, bbb) + +[#1 Insertion delimiter] = ", " + + +[#2 Content] = +[#2 Domain] = 0:9-0:12 + >---< +0| foo(aaa, bbb) + +[#2 Removal] = 0:7-0:12 + >-----< +0| foo(aaa, bbb) + +[#2 Leading delimiter] = 0:7-0:9 + >--< +0| foo(aaa, bbb) + +[#2 Insertion delimiter] = ", " diff --git a/data/fixtures/scopes/kotlin/argument/argument.actual.singleLine2.scope b/data/fixtures/scopes/kotlin/argument/argument.actual.singleLine2.scope new file mode 100644 index 0000000000..29b3d1db06 --- /dev/null +++ b/data/fixtures/scopes/kotlin/argument/argument.actual.singleLine2.scope @@ -0,0 +1,33 @@ +foo(aaa = 0, bbb = 1) +--- + +[#1 Content] = +[#1 Domain] = 0:4-0:11 + >-------< +0| foo(aaa = 0, bbb = 1) + +[#1 Removal] = 0:4-0:13 + >---------< +0| foo(aaa = 0, bbb = 1) + +[#1 Trailing delimiter] = 0:11-0:13 + >--< +0| foo(aaa = 0, bbb = 1) + +[#1 Insertion delimiter] = ", " + + +[#2 Content] = +[#2 Domain] = 0:13-0:20 + >-------< +0| foo(aaa = 0, bbb = 1) + +[#2 Removal] = 0:11-0:20 + >---------< +0| foo(aaa = 0, bbb = 1) + +[#2 Leading delimiter] = 0:11-0:13 + >--< +0| foo(aaa = 0, bbb = 1) + +[#2 Insertion delimiter] = ", " diff --git a/data/fixtures/scopes/kotlin/argument/argument.catch.scope b/data/fixtures/scopes/kotlin/argument/argument.catch.scope new file mode 100644 index 0000000000..872f7673d8 --- /dev/null +++ b/data/fixtures/scopes/kotlin/argument/argument.catch.scope @@ -0,0 +1,22 @@ +try { +} catch (e: MyException) { +} catch (e: Exception) { +} +--- + +[#1 Content] = +[#1 Removal] = +[#1 Domain] = 1:9-1:23 + >--------------< +1| } catch (e: MyException) { + +[#1 Insertion delimiter] = " " + + +[#2 Content] = +[#2 Removal] = +[#2 Domain] = 2:9-2:21 + >------------< +2| } catch (e: Exception) { + +[#2 Insertion delimiter] = " " diff --git a/data/fixtures/scopes/kotlin/argument/argument.formal.constructor.iteration.scope b/data/fixtures/scopes/kotlin/argument/argument.formal.constructor.iteration.scope new file mode 100644 index 0000000000..8a0d372d4c --- /dev/null +++ b/data/fixtures/scopes/kotlin/argument/argument.formal.constructor.iteration.scope @@ -0,0 +1,12 @@ +class Foo { + constructor(aaa: Int, bbb: Int) {} +} +--- + +[Content] = 1:16-1:34 + >------------------< +1| constructor(aaa: Int, bbb: Int) {} + +[Domain] = 1:4-1:38 + >----------------------------------< +1| constructor(aaa: Int, bbb: Int) {} diff --git a/data/fixtures/scopes/kotlin/argument/argument.formal.constructor.iteration2.scope b/data/fixtures/scopes/kotlin/argument/argument.formal.constructor.iteration2.scope new file mode 100644 index 0000000000..3b4393dee0 --- /dev/null +++ b/data/fixtures/scopes/kotlin/argument/argument.formal.constructor.iteration2.scope @@ -0,0 +1,10 @@ +class Foo(aaa: Int, bbb: Int) {} +--- + +[Content] = 0:10-0:28 + >------------------< +0| class Foo(aaa: Int, bbb: Int) {} + +[Domain] = 0:0-0:32 + >--------------------------------< +0| class Foo(aaa: Int, bbb: Int) {} diff --git a/data/fixtures/scopes/kotlin/argument/argument.formal.constructor.multiLine.scope b/data/fixtures/scopes/kotlin/argument/argument.formal.constructor.multiLine.scope new file mode 100644 index 0000000000..d1ae0ebaf8 --- /dev/null +++ b/data/fixtures/scopes/kotlin/argument/argument.formal.constructor.multiLine.scope @@ -0,0 +1,100 @@ +class Foo { + constructor( + aaa: Int, + vararg bbb: Int, + ccc: Int = 0, + vararg ddd: Int = 1 + ) {} +} +--- + +[#1 Content] = +[#1 Domain] = 2:8-2:16 + >--------< +2| aaa: Int, + +[#1 Removal] = 2:8-3:8 + >--------- +2| aaa: Int, +3| vararg bbb: Int, + --------< + +[#1 Trailing delimiter] = 2:16-3:8 + >- +2| aaa: Int, +3| vararg bbb: Int, + --------< + +[#1 Insertion delimiter] = ",\n" + + +[#2 Content] = +[#2 Domain] = 3:8-3:23 + >---------------< +3| vararg bbb: Int, + +[#2 Removal] = 3:8-4:8 + >---------------- +3| vararg bbb: Int, +4| ccc: Int = 0, + --------< + +[#2 Leading delimiter] = 2:16-3:8 + >- +2| aaa: Int, +3| vararg bbb: Int, + --------< + +[#2 Trailing delimiter] = 3:23-4:8 + >- +3| vararg bbb: Int, +4| ccc: Int = 0, + --------< + +[#2 Insertion delimiter] = ",\n" + + +[#3 Content] = +[#3 Domain] = 4:8-4:20 + >------------< +4| ccc: Int = 0, + +[#3 Removal] = 4:8-5:8 + >------------- +4| ccc: Int = 0, +5| vararg ddd: Int = 1 + --------< + +[#3 Leading delimiter] = 3:23-4:8 + >- +3| vararg bbb: Int, +4| ccc: Int = 0, + --------< + +[#3 Trailing delimiter] = 4:20-5:8 + >- +4| ccc: Int = 0, +5| vararg ddd: Int = 1 + --------< + +[#3 Insertion delimiter] = ",\n" + + +[#4 Content] = +[#4 Domain] = 5:8-5:27 + >-------------------< +5| vararg ddd: Int = 1 + +[#4 Removal] = 4:20-5:27 + >- +4| ccc: Int = 0, +5| vararg ddd: Int = 1 + ---------------------------< + +[#4 Leading delimiter] = 4:20-5:8 + >- +4| ccc: Int = 0, +5| vararg ddd: Int = 1 + --------< + +[#4 Insertion delimiter] = ",\n" diff --git a/data/fixtures/scopes/kotlin/argument/argument.formal.constructor.multiLine2.scope b/data/fixtures/scopes/kotlin/argument/argument.formal.constructor.multiLine2.scope new file mode 100644 index 0000000000..4ccbb86f5b --- /dev/null +++ b/data/fixtures/scopes/kotlin/argument/argument.formal.constructor.multiLine2.scope @@ -0,0 +1,98 @@ +class Foo( + aaa: Int, + vararg bbb: Int, + ccc: Int = 0, + vararg ddd: Int = 1 + ) {} +--- + +[#1 Content] = +[#1 Domain] = 1:8-1:16 + >--------< +1| aaa: Int, + +[#1 Removal] = 1:8-2:8 + >--------- +1| aaa: Int, +2| vararg bbb: Int, + --------< + +[#1 Trailing delimiter] = 1:16-2:8 + >- +1| aaa: Int, +2| vararg bbb: Int, + --------< + +[#1 Insertion delimiter] = ",\n" + + +[#2 Content] = +[#2 Domain] = 2:8-2:23 + >---------------< +2| vararg bbb: Int, + +[#2 Removal] = 2:8-3:8 + >---------------- +2| vararg bbb: Int, +3| ccc: Int = 0, + --------< + +[#2 Leading delimiter] = 1:16-2:8 + >- +1| aaa: Int, +2| vararg bbb: Int, + --------< + +[#2 Trailing delimiter] = 2:23-3:8 + >- +2| vararg bbb: Int, +3| ccc: Int = 0, + --------< + +[#2 Insertion delimiter] = ",\n" + + +[#3 Content] = +[#3 Domain] = 3:8-3:20 + >------------< +3| ccc: Int = 0, + +[#3 Removal] = 3:8-4:8 + >------------- +3| ccc: Int = 0, +4| vararg ddd: Int = 1 + --------< + +[#3 Leading delimiter] = 2:23-3:8 + >- +2| vararg bbb: Int, +3| ccc: Int = 0, + --------< + +[#3 Trailing delimiter] = 3:20-4:8 + >- +3| ccc: Int = 0, +4| vararg ddd: Int = 1 + --------< + +[#3 Insertion delimiter] = ",\n" + + +[#4 Content] = +[#4 Domain] = 4:8-4:27 + >-------------------< +4| vararg ddd: Int = 1 + +[#4 Removal] = 3:20-4:27 + >- +3| ccc: Int = 0, +4| vararg ddd: Int = 1 + ---------------------------< + +[#4 Leading delimiter] = 3:20-4:8 + >- +3| ccc: Int = 0, +4| vararg ddd: Int = 1 + --------< + +[#4 Insertion delimiter] = ",\n" diff --git a/data/fixtures/scopes/kotlin/argument/argument.formal.constructor.singleLine.scope b/data/fixtures/scopes/kotlin/argument/argument.formal.constructor.singleLine.scope new file mode 100644 index 0000000000..765f174ebd --- /dev/null +++ b/data/fixtures/scopes/kotlin/argument/argument.formal.constructor.singleLine.scope @@ -0,0 +1,75 @@ +class Foo { + constructor(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} +} +--- + +[#1 Content] = +[#1 Domain] = 1:16-1:24 + >--------< +1| constructor(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#1 Removal] = 1:16-1:26 + >----------< +1| constructor(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#1 Trailing delimiter] = 1:24-1:26 + >--< +1| constructor(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#1 Insertion delimiter] = ", " + + +[#2 Content] = +[#2 Domain] = 1:26-1:41 + >---------------< +1| constructor(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#2 Removal] = 1:26-1:43 + >-----------------< +1| constructor(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#2 Leading delimiter] = 1:24-1:26 + >--< +1| constructor(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#2 Trailing delimiter] = 1:41-1:43 + >--< +1| constructor(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#2 Insertion delimiter] = ", " + + +[#3 Content] = +[#3 Domain] = 1:43-1:55 + >------------< +1| constructor(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#3 Removal] = 1:43-1:57 + >--------------< +1| constructor(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#3 Leading delimiter] = 1:41-1:43 + >--< +1| constructor(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#3 Trailing delimiter] = 1:55-1:57 + >--< +1| constructor(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#3 Insertion delimiter] = ", " + + +[#4 Content] = +[#4 Domain] = 1:57-1:76 + >-------------------< +1| constructor(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#4 Removal] = 1:55-1:76 + >---------------------< +1| constructor(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#4 Leading delimiter] = 1:55-1:57 + >--< +1| constructor(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#4 Insertion delimiter] = ", " diff --git a/data/fixtures/scopes/kotlin/argument/argument.formal.constructor.singleLine2.scope b/data/fixtures/scopes/kotlin/argument/argument.formal.constructor.singleLine2.scope new file mode 100644 index 0000000000..7f8441fcd2 --- /dev/null +++ b/data/fixtures/scopes/kotlin/argument/argument.formal.constructor.singleLine2.scope @@ -0,0 +1,73 @@ +class Foo(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} +--- + +[#1 Content] = +[#1 Domain] = 0:10-0:18 + >--------< +0| class Foo(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#1 Removal] = 0:10-0:20 + >----------< +0| class Foo(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#1 Trailing delimiter] = 0:18-0:20 + >--< +0| class Foo(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#1 Insertion delimiter] = ", " + + +[#2 Content] = +[#2 Domain] = 0:20-0:35 + >---------------< +0| class Foo(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#2 Removal] = 0:20-0:37 + >-----------------< +0| class Foo(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#2 Leading delimiter] = 0:18-0:20 + >--< +0| class Foo(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#2 Trailing delimiter] = 0:35-0:37 + >--< +0| class Foo(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#2 Insertion delimiter] = ", " + + +[#3 Content] = +[#3 Domain] = 0:37-0:49 + >------------< +0| class Foo(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#3 Removal] = 0:37-0:51 + >--------------< +0| class Foo(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#3 Leading delimiter] = 0:35-0:37 + >--< +0| class Foo(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#3 Trailing delimiter] = 0:49-0:51 + >--< +0| class Foo(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#3 Insertion delimiter] = ", " + + +[#4 Content] = +[#4 Domain] = 0:51-0:70 + >-------------------< +0| class Foo(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#4 Removal] = 0:49-0:70 + >---------------------< +0| class Foo(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#4 Leading delimiter] = 0:49-0:51 + >--< +0| class Foo(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#4 Insertion delimiter] = ", " diff --git a/data/fixtures/scopes/kotlin/argument/argument.formal.iteration.scope b/data/fixtures/scopes/kotlin/argument/argument.formal.iteration.scope new file mode 100644 index 0000000000..52e03b6d32 --- /dev/null +++ b/data/fixtures/scopes/kotlin/argument/argument.formal.iteration.scope @@ -0,0 +1,10 @@ +fun bar(aaa: Int, bbb: Int) {} +--- + +[Content] = 0:8-0:26 + >------------------< +0| fun bar(aaa: Int, bbb: Int) {} + +[Domain] = 0:0-0:30 + >------------------------------< +0| fun bar(aaa: Int, bbb: Int) {} diff --git a/data/fixtures/scopes/kotlin/argument/argument.formal.lambda.iteration.scope b/data/fixtures/scopes/kotlin/argument/argument.formal.lambda.iteration.scope new file mode 100644 index 0000000000..11a8eddbfb --- /dev/null +++ b/data/fixtures/scopes/kotlin/argument/argument.formal.lambda.iteration.scope @@ -0,0 +1,10 @@ +{ aaa, bbb -> } +--- + +[Content] = 0:2-0:10 + >--------< +0| { aaa, bbb -> } + +[Domain] = 0:0-0:15 + >---------------< +0| { aaa, bbb -> } diff --git a/data/fixtures/scopes/kotlin/argument/argument.formal.lambda.multiLine.scope b/data/fixtures/scopes/kotlin/argument/argument.formal.lambda.multiLine.scope new file mode 100644 index 0000000000..d1a3572fde --- /dev/null +++ b/data/fixtures/scopes/kotlin/argument/argument.formal.lambda.multiLine.scope @@ -0,0 +1,44 @@ +{ + 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/kotlin/argument/argument.formal.lambda.singleLine.scope b/data/fixtures/scopes/kotlin/argument/argument.formal.lambda.singleLine.scope new file mode 100644 index 0000000000..ec0eef877e --- /dev/null +++ b/data/fixtures/scopes/kotlin/argument/argument.formal.lambda.singleLine.scope @@ -0,0 +1,33 @@ +{ aaa, bbb -> } +--- + +[#1 Content] = +[#1 Domain] = 0:2-0:5 + >---< +0| { aaa, bbb -> } + +[#1 Removal] = 0:2-0:7 + >-----< +0| { aaa, bbb -> } + +[#1 Trailing delimiter] = 0:5-0:7 + >--< +0| { aaa, bbb -> } + +[#1 Insertion delimiter] = ", " + + +[#2 Content] = +[#2 Domain] = 0:7-0:10 + >---< +0| { aaa, bbb -> } + +[#2 Removal] = 0:5-0:10 + >-----< +0| { aaa, bbb -> } + +[#2 Leading delimiter] = 0:5-0:7 + >--< +0| { aaa, bbb -> } + +[#2 Insertion delimiter] = ", " diff --git a/data/fixtures/scopes/kotlin/argument/argument.formal.method.iteration.scope b/data/fixtures/scopes/kotlin/argument/argument.formal.method.iteration.scope new file mode 100644 index 0000000000..5776531b87 --- /dev/null +++ b/data/fixtures/scopes/kotlin/argument/argument.formal.method.iteration.scope @@ -0,0 +1,12 @@ +class Foo { + fun bar(aaa: Int, bbb: Int) {} +} +--- + +[Content] = 1:12-1:30 + >------------------< +1| fun bar(aaa: Int, bbb: Int) {} + +[Domain] = 1:4-1:34 + >------------------------------< +1| fun bar(aaa: Int, bbb: Int) {} diff --git a/data/fixtures/scopes/kotlin/argument/argument.formal.method.iteration2.scope b/data/fixtures/scopes/kotlin/argument/argument.formal.method.iteration2.scope new file mode 100644 index 0000000000..3f9d7366e8 --- /dev/null +++ b/data/fixtures/scopes/kotlin/argument/argument.formal.method.iteration2.scope @@ -0,0 +1,12 @@ +class Foo { + set(aaa: Int) {} +} +--- + +[Content] = 1:8-1:16 + >--------< +1| set(aaa: Int) {} + +[Domain] = 1:4-1:20 + >----------------< +1| set(aaa: Int) {} diff --git a/data/fixtures/scopes/kotlin/argument/argument.formal.method.multiLine.scope b/data/fixtures/scopes/kotlin/argument/argument.formal.method.multiLine.scope new file mode 100644 index 0000000000..48a7eeed6c --- /dev/null +++ b/data/fixtures/scopes/kotlin/argument/argument.formal.method.multiLine.scope @@ -0,0 +1,100 @@ +class Foo { + fun bar( + aaa: Int, + vararg bbb: Int, + ccc: Int = 0, + vararg ddd: Int = 1 + ) {} +} +--- + +[#1 Content] = +[#1 Domain] = 2:8-2:16 + >--------< +2| aaa: Int, + +[#1 Removal] = 2:8-3:8 + >--------- +2| aaa: Int, +3| vararg bbb: Int, + --------< + +[#1 Trailing delimiter] = 2:16-3:8 + >- +2| aaa: Int, +3| vararg bbb: Int, + --------< + +[#1 Insertion delimiter] = ",\n" + + +[#2 Content] = +[#2 Domain] = 3:8-3:23 + >---------------< +3| vararg bbb: Int, + +[#2 Removal] = 3:8-4:8 + >---------------- +3| vararg bbb: Int, +4| ccc: Int = 0, + --------< + +[#2 Leading delimiter] = 2:16-3:8 + >- +2| aaa: Int, +3| vararg bbb: Int, + --------< + +[#2 Trailing delimiter] = 3:23-4:8 + >- +3| vararg bbb: Int, +4| ccc: Int = 0, + --------< + +[#2 Insertion delimiter] = ",\n" + + +[#3 Content] = +[#3 Domain] = 4:8-4:20 + >------------< +4| ccc: Int = 0, + +[#3 Removal] = 4:8-5:8 + >------------- +4| ccc: Int = 0, +5| vararg ddd: Int = 1 + --------< + +[#3 Leading delimiter] = 3:23-4:8 + >- +3| vararg bbb: Int, +4| ccc: Int = 0, + --------< + +[#3 Trailing delimiter] = 4:20-5:8 + >- +4| ccc: Int = 0, +5| vararg ddd: Int = 1 + --------< + +[#3 Insertion delimiter] = ",\n" + + +[#4 Content] = +[#4 Domain] = 5:8-5:27 + >-------------------< +5| vararg ddd: Int = 1 + +[#4 Removal] = 4:20-5:27 + >- +4| ccc: Int = 0, +5| vararg ddd: Int = 1 + ---------------------------< + +[#4 Leading delimiter] = 4:20-5:8 + >- +4| ccc: Int = 0, +5| vararg ddd: Int = 1 + --------< + +[#4 Insertion delimiter] = ",\n" diff --git a/data/fixtures/scopes/kotlin/argument/argument.formal.method.singleLine.scope b/data/fixtures/scopes/kotlin/argument/argument.formal.method.singleLine.scope new file mode 100644 index 0000000000..7086fbc864 --- /dev/null +++ b/data/fixtures/scopes/kotlin/argument/argument.formal.method.singleLine.scope @@ -0,0 +1,75 @@ +class Foo { + fun bar(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} +} +--- + +[#1 Content] = +[#1 Domain] = 1:12-1:20 + >--------< +1| fun bar(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#1 Removal] = 1:12-1:22 + >----------< +1| fun bar(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#1 Trailing delimiter] = 1:20-1:22 + >--< +1| fun bar(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#1 Insertion delimiter] = ", " + + +[#2 Content] = +[#2 Domain] = 1:22-1:37 + >---------------< +1| fun bar(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#2 Removal] = 1:22-1:39 + >-----------------< +1| fun bar(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#2 Leading delimiter] = 1:20-1:22 + >--< +1| fun bar(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#2 Trailing delimiter] = 1:37-1:39 + >--< +1| fun bar(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#2 Insertion delimiter] = ", " + + +[#3 Content] = +[#3 Domain] = 1:39-1:51 + >------------< +1| fun bar(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#3 Removal] = 1:39-1:53 + >--------------< +1| fun bar(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#3 Leading delimiter] = 1:37-1:39 + >--< +1| fun bar(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#3 Trailing delimiter] = 1:51-1:53 + >--< +1| fun bar(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#3 Insertion delimiter] = ", " + + +[#4 Content] = +[#4 Domain] = 1:53-1:72 + >-------------------< +1| fun bar(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#4 Removal] = 1:51-1:72 + >---------------------< +1| fun bar(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#4 Leading delimiter] = 1:51-1:53 + >--< +1| fun bar(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#4 Insertion delimiter] = ", " diff --git a/data/fixtures/scopes/kotlin/argument/argument.formal.method.singleLine2.scope b/data/fixtures/scopes/kotlin/argument/argument.formal.method.singleLine2.scope new file mode 100644 index 0000000000..ff4e03a73a --- /dev/null +++ b/data/fixtures/scopes/kotlin/argument/argument.formal.method.singleLine2.scope @@ -0,0 +1,12 @@ +class Foo { + set(aaa: Int) {} +} +--- + +[Content] = +[Removal] = +[Domain] = 1:8-1:16 + >--------< +1| set(aaa: Int) {} + +[Insertion delimiter] = " " diff --git a/data/fixtures/scopes/kotlin/argument/argument.formal.multiLine.scope b/data/fixtures/scopes/kotlin/argument/argument.formal.multiLine.scope new file mode 100644 index 0000000000..ad4cb8d8ba --- /dev/null +++ b/data/fixtures/scopes/kotlin/argument/argument.formal.multiLine.scope @@ -0,0 +1,98 @@ +fun bar( + aaa: Int, + vararg bbb: Int, + ccc: Int = 0, + vararg ddd: Int = 1 +) {} +--- + +[#1 Content] = +[#1 Domain] = 1:4-1:12 + >--------< +1| aaa: Int, + +[#1 Removal] = 1:4-2:4 + >--------- +1| aaa: Int, +2| vararg bbb: Int, + ----< + +[#1 Trailing delimiter] = 1:12-2:4 + >- +1| aaa: Int, +2| vararg bbb: Int, + ----< + +[#1 Insertion delimiter] = ",\n" + + +[#2 Content] = +[#2 Domain] = 2:4-2:19 + >---------------< +2| vararg bbb: Int, + +[#2 Removal] = 2:4-3:4 + >---------------- +2| vararg bbb: Int, +3| ccc: Int = 0, + ----< + +[#2 Leading delimiter] = 1:12-2:4 + >- +1| aaa: Int, +2| vararg bbb: Int, + ----< + +[#2 Trailing delimiter] = 2:19-3:4 + >- +2| vararg bbb: Int, +3| ccc: Int = 0, + ----< + +[#2 Insertion delimiter] = ",\n" + + +[#3 Content] = +[#3 Domain] = 3:4-3:16 + >------------< +3| ccc: Int = 0, + +[#3 Removal] = 3:4-4:4 + >------------- +3| ccc: Int = 0, +4| vararg ddd: Int = 1 + ----< + +[#3 Leading delimiter] = 2:19-3:4 + >- +2| vararg bbb: Int, +3| ccc: Int = 0, + ----< + +[#3 Trailing delimiter] = 3:16-4:4 + >- +3| ccc: Int = 0, +4| vararg ddd: Int = 1 + ----< + +[#3 Insertion delimiter] = ",\n" + + +[#4 Content] = +[#4 Domain] = 4:4-4:23 + >-------------------< +4| vararg ddd: Int = 1 + +[#4 Removal] = 3:16-4:23 + >- +3| ccc: Int = 0, +4| vararg ddd: Int = 1 + -----------------------< + +[#4 Leading delimiter] = 3:16-4:4 + >- +3| ccc: Int = 0, +4| vararg ddd: Int = 1 + ----< + +[#4 Insertion delimiter] = ",\n" diff --git a/data/fixtures/scopes/kotlin/argument/argument.formal.singleLine.scope b/data/fixtures/scopes/kotlin/argument/argument.formal.singleLine.scope new file mode 100644 index 0000000000..629a7a0080 --- /dev/null +++ b/data/fixtures/scopes/kotlin/argument/argument.formal.singleLine.scope @@ -0,0 +1,73 @@ +fun bar(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} +--- + +[#1 Content] = +[#1 Domain] = 0:8-0:16 + >--------< +0| fun bar(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#1 Removal] = 0:8-0:18 + >----------< +0| fun bar(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#1 Trailing delimiter] = 0:16-0:18 + >--< +0| fun bar(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#1 Insertion delimiter] = ", " + + +[#2 Content] = +[#2 Domain] = 0:18-0:33 + >---------------< +0| fun bar(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#2 Removal] = 0:18-0:35 + >-----------------< +0| fun bar(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#2 Leading delimiter] = 0:16-0:18 + >--< +0| fun bar(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#2 Trailing delimiter] = 0:33-0:35 + >--< +0| fun bar(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#2 Insertion delimiter] = ", " + + +[#3 Content] = +[#3 Domain] = 0:35-0:47 + >------------< +0| fun bar(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#3 Removal] = 0:35-0:49 + >--------------< +0| fun bar(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#3 Leading delimiter] = 0:33-0:35 + >--< +0| fun bar(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#3 Trailing delimiter] = 0:47-0:49 + >--< +0| fun bar(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#3 Insertion delimiter] = ", " + + +[#4 Content] = +[#4 Domain] = 0:49-0:68 + >-------------------< +0| fun bar(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#4 Removal] = 0:47-0:68 + >---------------------< +0| fun bar(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#4 Leading delimiter] = 0:47-0:49 + >--< +0| fun bar(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#4 Insertion delimiter] = ", " diff --git a/data/fixtures/scopes/kotlin/argumentList/argumentList.actual.constructor.empty.scope b/data/fixtures/scopes/kotlin/argumentList/argumentList.actual.constructor.empty.scope new file mode 100644 index 0000000000..58e2245d03 --- /dev/null +++ b/data/fixtures/scopes/kotlin/argumentList/argumentList.actual.constructor.empty.scope @@ -0,0 +1,13 @@ +Foo() +--- + +[Content] = +[Removal] = 0:4-0:4 + >< +0| Foo() + +[Domain] = 0:0-0:5 + >-----< +0| Foo() + +[Insertion delimiter] = "" diff --git a/data/fixtures/scopes/kotlin/argumentList/argumentList.actual.constructor.empty2.scope b/data/fixtures/scopes/kotlin/argumentList/argumentList.actual.constructor.empty2.scope new file mode 100644 index 0000000000..94f6c2f5db --- /dev/null +++ b/data/fixtures/scopes/kotlin/argumentList/argumentList.actual.constructor.empty2.scope @@ -0,0 +1,13 @@ +class Foo: Bar() +--- + +[Content] = +[Removal] = 0:15-0:15 + >< +0| class Foo: Bar() + +[Domain] = 0:11-0:16 + >-----< +0| class Foo: Bar() + +[Insertion delimiter] = "" diff --git a/data/fixtures/scopes/kotlin/argumentList/argumentList.actual.constructor.multiLine.scope b/data/fixtures/scopes/kotlin/argumentList/argumentList.actual.constructor.multiLine.scope new file mode 100644 index 0000000000..06616a6faf --- /dev/null +++ b/data/fixtures/scopes/kotlin/argumentList/argumentList.actual.constructor.multiLine.scope @@ -0,0 +1,33 @@ +Foo( + aaa, + bbb +) +--- + +[Content] = 1:4-2:7 + >---- +1| aaa, +2| bbb + -------< + +[Removal] = 0:4-3:0 + > +0| Foo( +1| aaa, +2| bbb +3| ) + < + +[Leading delimiter] = 1:0-1:4 + >----< +1| aaa, + +[Domain] = 0:0-3:1 + >---- +0| Foo( +1| aaa, +2| bbb +3| ) + -< + +[Insertion delimiter] = ",\n" diff --git a/data/fixtures/scopes/kotlin/argumentList/argumentList.actual.constructor.multiLine2.scope b/data/fixtures/scopes/kotlin/argumentList/argumentList.actual.constructor.multiLine2.scope new file mode 100644 index 0000000000..7233dfa82d --- /dev/null +++ b/data/fixtures/scopes/kotlin/argumentList/argumentList.actual.constructor.multiLine2.scope @@ -0,0 +1,33 @@ +class Foo: Bar( + aaa, + bbb +) +--- + +[Content] = 1:4-2:7 + >---- +1| aaa, +2| bbb + -------< + +[Removal] = 0:15-3:0 + > +0| class Foo: Bar( +1| aaa, +2| bbb +3| ) + < + +[Leading delimiter] = 1:0-1:4 + >----< +1| aaa, + +[Domain] = 0:11-3:1 + >---- +0| class Foo: Bar( +1| aaa, +2| bbb +3| ) + -< + +[Insertion delimiter] = ",\n" diff --git a/data/fixtures/scopes/kotlin/argumentList/argumentList.actual.constructor.singleLine.scope b/data/fixtures/scopes/kotlin/argumentList/argumentList.actual.constructor.singleLine.scope new file mode 100644 index 0000000000..77680199f4 --- /dev/null +++ b/data/fixtures/scopes/kotlin/argumentList/argumentList.actual.constructor.singleLine.scope @@ -0,0 +1,13 @@ +Foo(aaa, bbb) +--- + +[Content] = +[Removal] = 0:4-0:12 + >--------< +0| Foo(aaa, bbb) + +[Domain] = 0:0-0:13 + >-------------< +0| Foo(aaa, bbb) + +[Insertion delimiter] = ", " diff --git a/data/fixtures/scopes/kotlin/argumentList/argumentList.actual.constructor.singleLine2.scope b/data/fixtures/scopes/kotlin/argumentList/argumentList.actual.constructor.singleLine2.scope new file mode 100644 index 0000000000..82864b9d93 --- /dev/null +++ b/data/fixtures/scopes/kotlin/argumentList/argumentList.actual.constructor.singleLine2.scope @@ -0,0 +1,13 @@ +class Foo: Bar(aaa, bbb) +--- + +[Content] = +[Removal] = 0:15-0:23 + >--------< +0| class Foo: Bar(aaa, bbb) + +[Domain] = 0:11-0:24 + >-------------< +0| class Foo: Bar(aaa, bbb) + +[Insertion delimiter] = ", " diff --git a/data/fixtures/scopes/kotlin/argumentList/argumentList.actual.empty.scope b/data/fixtures/scopes/kotlin/argumentList/argumentList.actual.empty.scope new file mode 100644 index 0000000000..947915ef96 --- /dev/null +++ b/data/fixtures/scopes/kotlin/argumentList/argumentList.actual.empty.scope @@ -0,0 +1,13 @@ +foo() +--- + +[Content] = +[Removal] = 0:4-0:4 + >< +0| foo() + +[Domain] = 0:0-0:5 + >-----< +0| foo() + +[Insertion delimiter] = "" diff --git a/data/fixtures/scopes/kotlin/argumentList/argumentList.actual.method.empty.scope b/data/fixtures/scopes/kotlin/argumentList/argumentList.actual.method.empty.scope new file mode 100644 index 0000000000..ed61422204 --- /dev/null +++ b/data/fixtures/scopes/kotlin/argumentList/argumentList.actual.method.empty.scope @@ -0,0 +1,13 @@ +foo.bar() +--- + +[Content] = +[Removal] = 0:8-0:8 + >< +0| foo.bar() + +[Domain] = 0:0-0:9 + >---------< +0| foo.bar() + +[Insertion delimiter] = "" diff --git a/data/fixtures/scopes/kotlin/argumentList/argumentList.actual.method.multiLine.scope b/data/fixtures/scopes/kotlin/argumentList/argumentList.actual.method.multiLine.scope new file mode 100644 index 0000000000..fbf6ce60c0 --- /dev/null +++ b/data/fixtures/scopes/kotlin/argumentList/argumentList.actual.method.multiLine.scope @@ -0,0 +1,33 @@ +foo.bar( + aaa, + bbb +) +--- + +[Content] = 1:4-2:7 + >---- +1| aaa, +2| bbb + -------< + +[Removal] = 0:8-3:0 + > +0| foo.bar( +1| aaa, +2| bbb +3| ) + < + +[Leading delimiter] = 1:0-1:4 + >----< +1| aaa, + +[Domain] = 0:0-3:1 + >-------- +0| foo.bar( +1| aaa, +2| bbb +3| ) + -< + +[Insertion delimiter] = ",\n" diff --git a/data/fixtures/scopes/kotlin/argumentList/argumentList.actual.method.singleLine.scope b/data/fixtures/scopes/kotlin/argumentList/argumentList.actual.method.singleLine.scope new file mode 100644 index 0000000000..69cf068256 --- /dev/null +++ b/data/fixtures/scopes/kotlin/argumentList/argumentList.actual.method.singleLine.scope @@ -0,0 +1,13 @@ +foo.bar(aaa, bbb) +--- + +[Content] = +[Removal] = 0:8-0:16 + >--------< +0| foo.bar(aaa, bbb) + +[Domain] = 0:0-0:17 + >-----------------< +0| foo.bar(aaa, bbb) + +[Insertion delimiter] = ", " diff --git a/data/fixtures/scopes/kotlin/argumentList/argumentList.actual.multiLine.scope b/data/fixtures/scopes/kotlin/argumentList/argumentList.actual.multiLine.scope new file mode 100644 index 0000000000..642614d02e --- /dev/null +++ b/data/fixtures/scopes/kotlin/argumentList/argumentList.actual.multiLine.scope @@ -0,0 +1,33 @@ +foo( + aaa, + bbb +) +--- + +[Content] = 1:4-2:7 + >---- +1| aaa, +2| bbb + -------< + +[Removal] = 0:4-3:0 + > +0| foo( +1| aaa, +2| bbb +3| ) + < + +[Leading delimiter] = 1:0-1:4 + >----< +1| aaa, + +[Domain] = 0:0-3:1 + >---- +0| foo( +1| aaa, +2| bbb +3| ) + -< + +[Insertion delimiter] = ",\n" diff --git a/data/fixtures/scopes/kotlin/argumentList/argumentList.actual.singleLine.scope b/data/fixtures/scopes/kotlin/argumentList/argumentList.actual.singleLine.scope new file mode 100644 index 0000000000..f0de18dd5d --- /dev/null +++ b/data/fixtures/scopes/kotlin/argumentList/argumentList.actual.singleLine.scope @@ -0,0 +1,13 @@ +foo(aaa, bbb) +--- + +[Content] = +[Removal] = 0:4-0:12 + >--------< +0| foo(aaa, bbb) + +[Domain] = 0:0-0:13 + >-------------< +0| foo(aaa, bbb) + +[Insertion delimiter] = ", " diff --git a/data/fixtures/scopes/kotlin/argumentList/argumentList.formal.constructor.empty.scope b/data/fixtures/scopes/kotlin/argumentList/argumentList.formal.constructor.empty.scope new file mode 100644 index 0000000000..ef9aee1a16 --- /dev/null +++ b/data/fixtures/scopes/kotlin/argumentList/argumentList.formal.constructor.empty.scope @@ -0,0 +1,13 @@ +class Foo() {} +--- + +[Content] = +[Removal] = 0:10-0:10 + >< +0| class Foo() {} + +[Domain] = 0:0-0:14 + >--------------< +0| class Foo() {} + +[Insertion delimiter] = "" diff --git a/data/fixtures/scopes/kotlin/argumentList/argumentList.formal.constructor.multiLine.scope b/data/fixtures/scopes/kotlin/argumentList/argumentList.formal.constructor.multiLine.scope new file mode 100644 index 0000000000..b794300da7 --- /dev/null +++ b/data/fixtures/scopes/kotlin/argumentList/argumentList.formal.constructor.multiLine.scope @@ -0,0 +1,35 @@ +class Foo { + constructor( + aaa: Int, + bbb: Int + ) {} +} +--- + +[Content] = 2:8-3:16 + >--------- +2| aaa: Int, +3| bbb: Int + ----------------< + +[Removal] = 1:16-4:4 + > +1| constructor( +2| aaa: Int, +3| bbb: Int +4| ) {} + ----< + +[Leading delimiter] = 2:0-2:8 + >--------< +2| aaa: Int, + +[Domain] = 1:4-4:8 + >------------ +1| constructor( +2| aaa: Int, +3| bbb: Int +4| ) {} + --------< + +[Insertion delimiter] = ",\n" diff --git a/data/fixtures/scopes/kotlin/argumentList/argumentList.formal.constructor.multiLine2.scope b/data/fixtures/scopes/kotlin/argumentList/argumentList.formal.constructor.multiLine2.scope new file mode 100644 index 0000000000..b6169a8c3e --- /dev/null +++ b/data/fixtures/scopes/kotlin/argumentList/argumentList.formal.constructor.multiLine2.scope @@ -0,0 +1,33 @@ +class Foo( + aaa: Int, + bbb: Int +) {} +--- + +[Content] = 1:4-2:12 + >--------- +1| aaa: Int, +2| bbb: Int + ------------< + +[Removal] = 0:10-3:0 + > +0| class Foo( +1| aaa: Int, +2| bbb: Int +3| ) {} + < + +[Leading delimiter] = 1:0-1:4 + >----< +1| aaa: Int, + +[Domain] = 0:0-3:4 + >---------- +0| class Foo( +1| aaa: Int, +2| bbb: Int +3| ) {} + ----< + +[Insertion delimiter] = ",\n" diff --git a/data/fixtures/scopes/kotlin/argumentList/argumentList.formal.constructor.singleLine.scope b/data/fixtures/scopes/kotlin/argumentList/argumentList.formal.constructor.singleLine.scope new file mode 100644 index 0000000000..a8e6de8abc --- /dev/null +++ b/data/fixtures/scopes/kotlin/argumentList/argumentList.formal.constructor.singleLine.scope @@ -0,0 +1,15 @@ +class Foo { + constructor(aaa: Int, bbb: Int) {} +} +--- + +[Content] = +[Removal] = 1:16-1:34 + >------------------< +1| constructor(aaa: Int, bbb: Int) {} + +[Domain] = 1:4-1:38 + >----------------------------------< +1| constructor(aaa: Int, bbb: Int) {} + +[Insertion delimiter] = ", " diff --git a/data/fixtures/scopes/kotlin/argumentList/argumentList.formal.constructor.singleLine2.scope b/data/fixtures/scopes/kotlin/argumentList/argumentList.formal.constructor.singleLine2.scope new file mode 100644 index 0000000000..2c4a96e79b --- /dev/null +++ b/data/fixtures/scopes/kotlin/argumentList/argumentList.formal.constructor.singleLine2.scope @@ -0,0 +1,13 @@ +class Foo(aaa: Int, bbb: Int) {} +--- + +[Content] = +[Removal] = 0:10-0:28 + >------------------< +0| class Foo(aaa: Int, bbb: Int) {} + +[Domain] = 0:0-0:32 + >--------------------------------< +0| class Foo(aaa: Int, bbb: Int) {} + +[Insertion delimiter] = ", " diff --git a/data/fixtures/scopes/kotlin/argumentList/argumentList.formal.empty.scope b/data/fixtures/scopes/kotlin/argumentList/argumentList.formal.empty.scope new file mode 100644 index 0000000000..27bbd3c96a --- /dev/null +++ b/data/fixtures/scopes/kotlin/argumentList/argumentList.formal.empty.scope @@ -0,0 +1,13 @@ +fun foo() {} +--- + +[Content] = +[Removal] = 0:8-0:8 + >< +0| fun foo() {} + +[Domain] = 0:0-0:12 + >------------< +0| fun foo() {} + +[Insertion delimiter] = "" diff --git a/data/fixtures/scopes/kotlin/argumentList/argumentList.formal.lambda.empty.scope b/data/fixtures/scopes/kotlin/argumentList/argumentList.formal.lambda.empty.scope new file mode 100644 index 0000000000..983545020d --- /dev/null +++ b/data/fixtures/scopes/kotlin/argumentList/argumentList.formal.lambda.empty.scope @@ -0,0 +1,17 @@ +{ -> } +--- + +[Content] = +[Removal] = 0:1-0:1 + >< +0| { -> } + +[Trailing delimiter] = 0:1-0:2 + >-< +0| { -> } + +[Domain] = 0:0-0:6 + >------< +0| { -> } + +[Insertion delimiter] = " " diff --git a/data/fixtures/scopes/kotlin/argumentList/argumentList.formal.lambda.multiLine.scope b/data/fixtures/scopes/kotlin/argumentList/argumentList.formal.lambda.multiLine.scope new file mode 100644 index 0000000000..b5e43d7998 --- /dev/null +++ b/data/fixtures/scopes/kotlin/argumentList/argumentList.formal.lambda.multiLine.scope @@ -0,0 +1,35 @@ +{ + aaa, + bbb -> +} +--- + +[Content] = 1:4-2:7 + >---- +1| aaa, +2| bbb -> + -------< + +[Removal] = 1:4-2:8 + >---- +1| aaa, +2| bbb -> + --------< + +[Leading delimiter] = 1:0-1:4 + >----< +1| aaa, + +[Trailing delimiter] = 2:7-2:8 + >-< +2| bbb -> + +[Domain] = 0:0-3:1 + >- +0| { +1| aaa, +2| bbb -> +3| } + -< + +[Insertion delimiter] = ",\n" diff --git a/data/fixtures/scopes/kotlin/argumentList/argumentList.formal.lambda.singleLine.scope b/data/fixtures/scopes/kotlin/argumentList/argumentList.formal.lambda.singleLine.scope new file mode 100644 index 0000000000..37f9417c86 --- /dev/null +++ b/data/fixtures/scopes/kotlin/argumentList/argumentList.formal.lambda.singleLine.scope @@ -0,0 +1,24 @@ +{ aaa, bbb -> } +--- + +[Content] = 0:2-0:10 + >--------< +0| { aaa, bbb -> } + +[Removal] = 0:2-0:11 + >---------< +0| { aaa, bbb -> } + +[Leading delimiter] = 0:1-0:2 + >-< +0| { aaa, bbb -> } + +[Trailing delimiter] = 0:10-0:11 + >-< +0| { aaa, bbb -> } + +[Domain] = 0:0-0:15 + >---------------< +0| { aaa, bbb -> } + +[Insertion delimiter] = ", " diff --git a/data/fixtures/scopes/kotlin/argumentList/argumentList.formal.method.empty.scope b/data/fixtures/scopes/kotlin/argumentList/argumentList.formal.method.empty.scope new file mode 100644 index 0000000000..f2a5f48d4a --- /dev/null +++ b/data/fixtures/scopes/kotlin/argumentList/argumentList.formal.method.empty.scope @@ -0,0 +1,15 @@ +class Foo { + fun bar() {} +} +--- + +[Content] = +[Removal] = 1:12-1:12 + >< +1| fun bar() {} + +[Domain] = 1:4-1:16 + >------------< +1| fun bar() {} + +[Insertion delimiter] = "" diff --git a/data/fixtures/scopes/kotlin/argumentList/argumentList.formal.method.multiLine.scope b/data/fixtures/scopes/kotlin/argumentList/argumentList.formal.method.multiLine.scope new file mode 100644 index 0000000000..fd47d799de --- /dev/null +++ b/data/fixtures/scopes/kotlin/argumentList/argumentList.formal.method.multiLine.scope @@ -0,0 +1,36 @@ +class Foo { + void bar( + aaa: Int, + bbb: Int + ) {} +} +--- + +[Content] = 2:8-3:16 + >--------- +2| aaa: Int, +3| bbb: Int + ----------------< + +[Removal] = 1:13-4:4 + > +1| void bar( +2| aaa: Int, +3| bbb: Int +4| ) {} + ----< + +[Leading delimiter] = 2:0-2:8 + >--------< +2| aaa: Int, + +[Domain] = 0:0-4:8 + >----------- +0| class Foo { +1| void bar( +2| aaa: Int, +3| bbb: Int +4| ) {} + --------< + +[Insertion delimiter] = ",\n" diff --git a/data/fixtures/scopes/kotlin/argumentList/argumentList.formal.method.singleLine.scope b/data/fixtures/scopes/kotlin/argumentList/argumentList.formal.method.singleLine.scope new file mode 100644 index 0000000000..9df3a17bbe --- /dev/null +++ b/data/fixtures/scopes/kotlin/argumentList/argumentList.formal.method.singleLine.scope @@ -0,0 +1,15 @@ +class Foo { + fun bar(aaa: Int, bbb: Int) {} +} +--- + +[Content] = +[Removal] = 1:12-1:30 + >------------------< +1| fun bar(aaa: Int, bbb: Int) {} + +[Domain] = 1:4-1:34 + >------------------------------< +1| fun bar(aaa: Int, bbb: Int) {} + +[Insertion delimiter] = ", " diff --git a/data/fixtures/scopes/kotlin/argumentList/argumentList.formal.multiLine.scope b/data/fixtures/scopes/kotlin/argumentList/argumentList.formal.multiLine.scope new file mode 100644 index 0000000000..c0711e616d --- /dev/null +++ b/data/fixtures/scopes/kotlin/argumentList/argumentList.formal.multiLine.scope @@ -0,0 +1,33 @@ +fun foo( + aaa: Int, + bbb: Int +) {} +--- + +[Content] = 1:4-2:12 + >--------- +1| aaa: Int, +2| bbb: Int + ------------< + +[Removal] = 0:8-3:0 + > +0| fun foo( +1| aaa: Int, +2| bbb: Int +3| ) {} + < + +[Leading delimiter] = 1:0-1:4 + >----< +1| aaa: Int, + +[Domain] = 0:0-3:4 + >-------- +0| fun foo( +1| aaa: Int, +2| bbb: Int +3| ) {} + ----< + +[Insertion delimiter] = ",\n" diff --git a/data/fixtures/scopes/kotlin/argumentList/argumentList.formal.singleLine.scope b/data/fixtures/scopes/kotlin/argumentList/argumentList.formal.singleLine.scope new file mode 100644 index 0000000000..d0ec120724 --- /dev/null +++ b/data/fixtures/scopes/kotlin/argumentList/argumentList.formal.singleLine.scope @@ -0,0 +1,13 @@ +fun foo(aaa: Int, bbb: Int) {} +--- + +[Content] = +[Removal] = 0:8-0:26 + >------------------< +0| fun foo(aaa: Int, bbb: Int) {} + +[Domain] = 0:0-0:30 + >------------------------------< +0| fun foo(aaa: Int, bbb: Int) {} + +[Insertion delimiter] = ", " diff --git a/data/fixtures/scopes/kotlin/branch/branch.if.elif.else.scope b/data/fixtures/scopes/kotlin/branch/branch.if.elif.else.scope new file mode 100644 index 0000000000..8bf55324af --- /dev/null +++ b/data/fixtures/scopes/kotlin/branch/branch.if.elif.else.scope @@ -0,0 +1,45 @@ +if (true) {} +else if (false) {} +else {} +--- + +[#1 Content] = +[#1 Domain] = 0:0-0:12 + >------------< +0| if (true) {} + +[#1 Removal] = 0:0-1:5 + >------------ +0| if (true) {} +1| else if (false) {} + -----< + +[#1 Insertion delimiter] = "\n" + + +[#2 Content] = +[#2 Domain] = 1:0-1:18 + >------------------< +1| else if (false) {} + +[#2 Removal] = 1:0-2:0 + >------------------ +1| else if (false) {} +2| else {} + < + +[#2 Insertion delimiter] = "\n" + + +[#3 Content] = +[#3 Domain] = 2:0-2:7 + >-------< +2| else {} + +[#3 Removal] = 1:18-2:7 + > +1| else if (false) {} +2| else {} + -------< + +[#3 Insertion delimiter] = "\n" diff --git a/data/fixtures/scopes/kotlin/branch/branch.if.else.scope b/data/fixtures/scopes/kotlin/branch/branch.if.else.scope new file mode 100644 index 0000000000..489c0edd09 --- /dev/null +++ b/data/fixtures/scopes/kotlin/branch/branch.if.else.scope @@ -0,0 +1,30 @@ +if (true) {} +else {} +--- + +[#1 Content] = +[#1 Domain] = 0:0-0:12 + >------------< +0| if (true) {} + +[#1 Removal] = 0:0-1:0 + >------------ +0| if (true) {} +1| else {} + < + +[#1 Insertion delimiter] = "\n" + + +[#2 Content] = +[#2 Domain] = 1:0-1:7 + >-------< +1| else {} + +[#2 Removal] = 0:12-1:7 + > +0| if (true) {} +1| else {} + -------< + +[#2 Insertion delimiter] = "\n" diff --git a/data/fixtures/scopes/kotlin/branch/branch.if.iteration.scope b/data/fixtures/scopes/kotlin/branch/branch.if.iteration.scope new file mode 100644 index 0000000000..84064bd4fa --- /dev/null +++ b/data/fixtures/scopes/kotlin/branch/branch.if.iteration.scope @@ -0,0 +1,12 @@ +if (true) {} +else if (false) {} +else {} +--- + +[Content] = +[Domain] = 0:0-2:7 + >------------ +0| if (true) {} +1| else if (false) {} +2| else {} + -------< diff --git a/data/fixtures/scopes/kotlin/branch/branch.if.scope b/data/fixtures/scopes/kotlin/branch/branch.if.scope new file mode 100644 index 0000000000..26855fbbaa --- /dev/null +++ b/data/fixtures/scopes/kotlin/branch/branch.if.scope @@ -0,0 +1,10 @@ +if (true) {} +--- + +[Content] = +[Removal] = +[Domain] = 0:0-0:12 + >------------< +0| if (true) {} + +[Insertion delimiter] = "\n" diff --git a/data/fixtures/scopes/kotlin/branch/branch.switchCase.iteration.scope b/data/fixtures/scopes/kotlin/branch/branch.switchCase.iteration.scope new file mode 100644 index 0000000000..7343248d28 --- /dev/null +++ b/data/fixtures/scopes/kotlin/branch/branch.switchCase.iteration.scope @@ -0,0 +1,10 @@ +when (foo) { } +--- + +[Content] = 0:12-0:13 + >-< +0| when (foo) { } + +[Domain] = 0:0-0:14 + >--------------< +0| when (foo) { } diff --git a/data/fixtures/scopes/kotlin/branch/branch.switchCase.scope b/data/fixtures/scopes/kotlin/branch/branch.switchCase.scope new file mode 100644 index 0000000000..a4db6df212 --- /dev/null +++ b/data/fixtures/scopes/kotlin/branch/branch.switchCase.scope @@ -0,0 +1,44 @@ +when (foo) { + 0 -> + break + else -> {} +} +--- + +[#1 Content] = +[#1 Domain] = 1:4-2:13 + >---- +1| 0 -> +2| break + -------------< + +[#1 Removal] = 1:0-3:0 + >-------- +1| 0 -> +2| break +3| else -> {} + < + +[#1 Leading delimiter] = 1:0-1:4 + >----< +1| 0 -> + +[#1 Insertion delimiter] = "\n" + + +[#2 Content] = +[#2 Domain] = 3:4-3:14 + >----------< +3| else -> {} + +[#2 Removal] = 3:0-4:0 + >-------------- +3| else -> {} +4| } + < + +[#2 Leading delimiter] = 3:0-3:4 + >----< +3| else -> {} + +[#2 Insertion delimiter] = "\n" diff --git a/data/fixtures/scopes/kotlin/branch/branch.ternary.iteration.scope b/data/fixtures/scopes/kotlin/branch/branch.ternary.iteration.scope new file mode 100644 index 0000000000..169fec3094 --- /dev/null +++ b/data/fixtures/scopes/kotlin/branch/branch.ternary.iteration.scope @@ -0,0 +1,7 @@ +if (true) 0 else 1 +--- + +[Content] = +[Domain] = 0:0-0:18 + >------------------< +0| if (true) 0 else 1 diff --git a/data/fixtures/scopes/kotlin/branch/branch.ternary.scope b/data/fixtures/scopes/kotlin/branch/branch.ternary.scope new file mode 100644 index 0000000000..4829d09cdc --- /dev/null +++ b/data/fixtures/scopes/kotlin/branch/branch.ternary.scope @@ -0,0 +1,33 @@ +if (true) 0 else 1 +--- + +[#1 Content] = +[#1 Domain] = 0:0-0:11 + >-----------< +0| if (true) 0 else 1 + +[#1 Removal] = 0:0-0:12 + >------------< +0| if (true) 0 else 1 + +[#1 Trailing delimiter] = 0:11-0:12 + >-< +0| if (true) 0 else 1 + +[#1 Insertion delimiter] = "\n" + + +[#2 Content] = +[#2 Domain] = 0:12-0:18 + >------< +0| if (true) 0 else 1 + +[#2 Removal] = 0:11-0:18 + >-------< +0| if (true) 0 else 1 + +[#2 Leading delimiter] = 0:11-0:12 + >-< +0| if (true) 0 else 1 + +[#2 Insertion delimiter] = "\n" diff --git a/data/fixtures/scopes/kotlin/branch/branch.try.iteration.scope b/data/fixtures/scopes/kotlin/branch/branch.try.iteration.scope new file mode 100644 index 0000000000..9b5ab1f938 --- /dev/null +++ b/data/fixtures/scopes/kotlin/branch/branch.try.iteration.scope @@ -0,0 +1,14 @@ +try { +} catch (ex: Exception) { +} finally { +} +--- + +[Content] = +[Domain] = 0:0-3:1 + >----- +0| try { +1| } catch (ex: Exception) { +2| } finally { +3| } + -< diff --git a/data/fixtures/scopes/kotlin/branch/branch.try.scope b/data/fixtures/scopes/kotlin/branch/branch.try.scope new file mode 100644 index 0000000000..a1ef010a2b --- /dev/null +++ b/data/fixtures/scopes/kotlin/branch/branch.try.scope @@ -0,0 +1,68 @@ +try { +} catch (ex: Exception) { +} finally { +} +--- + +[#1 Content] = +[#1 Domain] = 0:0-1:1 + >----- +0| try { +1| } catch (ex: Exception) { + -< + +[#1 Removal] = 0:0-1:2 + >----- +0| try { +1| } catch (ex: Exception) { + --< + +[#1 Trailing delimiter] = 1:1-1:2 + >-< +1| } catch (ex: Exception) { + +[#1 Insertion delimiter] = "\n" + + +[#2 Content] = +[#2 Domain] = 1:2-2:1 + >----------------------- +1| } catch (ex: Exception) { +2| } finally { + -< + +[#2 Removal] = 1:2-2:2 + >----------------------- +1| } catch (ex: Exception) { +2| } finally { + --< + +[#2 Leading delimiter] = 1:1-1:2 + >-< +1| } catch (ex: Exception) { + +[#2 Trailing delimiter] = 2:1-2:2 + >-< +2| } finally { + +[#2 Insertion delimiter] = "\n" + + +[#3 Content] = +[#3 Domain] = 2:2-3:1 + >--------- +2| } finally { +3| } + -< + +[#3 Removal] = 2:1-3:1 + >---------- +2| } finally { +3| } + -< + +[#3 Leading delimiter] = 2:1-2:2 + >-< +2| } finally { + +[#3 Insertion delimiter] = "\n" diff --git a/data/fixtures/scopes/kotlin/class.iteration.document.scope b/data/fixtures/scopes/kotlin/class.iteration.document.scope new file mode 100644 index 0000000000..813bb62ea9 --- /dev/null +++ b/data/fixtures/scopes/kotlin/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/kotlin/class.scope b/data/fixtures/scopes/kotlin/class.scope new file mode 100644 index 0000000000..ffbda12f63 --- /dev/null +++ b/data/fixtures/scopes/kotlin/class.scope @@ -0,0 +1,10 @@ +class Foo {} +--- + +[Content] = +[Removal] = +[Domain] = 0:0-0:12 + >------------< +0| class Foo {} + +[Insertion delimiter] = "\n\n" diff --git a/data/fixtures/scopes/kotlin/class2.scope b/data/fixtures/scopes/kotlin/class2.scope new file mode 100644 index 0000000000..b73b26f0f0 --- /dev/null +++ b/data/fixtures/scopes/kotlin/class2.scope @@ -0,0 +1,13 @@ +@bar +class Foo {} +--- + +[Content] = +[Removal] = +[Domain] = 0:0-1:12 + >---- +0| @bar +1| class Foo {} + ------------< + +[Insertion delimiter] = "\n\n" diff --git a/data/fixtures/scopes/kotlin/class3.scope b/data/fixtures/scopes/kotlin/class3.scope new file mode 100644 index 0000000000..32eea1eb2b --- /dev/null +++ b/data/fixtures/scopes/kotlin/class3.scope @@ -0,0 +1,10 @@ +object Foo {} +--- + +[Content] = +[Removal] = +[Domain] = 0:0-0:13 + >-------------< +0| object Foo {} + +[Insertion delimiter] = "\n\n" diff --git a/data/fixtures/scopes/kotlin/class4.scope b/data/fixtures/scopes/kotlin/class4.scope new file mode 100644 index 0000000000..28390172bb --- /dev/null +++ b/data/fixtures/scopes/kotlin/class4.scope @@ -0,0 +1,33 @@ +class Foo { + companion object Bar {} +} +--- + +[#1 Content] = +[#1 Removal] = +[#1 Domain] = 0:0-2:1 + >----------- +0| class Foo { +1| companion object Bar {} +2| } + -< + +[#1 Insertion delimiter] = "\n\n" + + +[#2 Content] = +[#2 Domain] = 1:4-1:27 + >-----------------------< +1| companion object Bar {} + +[#2 Removal] = 1:0-2:0 + >--------------------------- +1| companion object Bar {} +2| } + < + +[#2 Leading delimiter] = 1:0-1:4 + >----< +1| companion object Bar {} + +[#2 Insertion delimiter] = "\n\n" diff --git a/data/fixtures/scopes/kotlin/comment.block.scope b/data/fixtures/scopes/kotlin/comment.block.scope new file mode 100644 index 0000000000..5e8b51111c --- /dev/null +++ b/data/fixtures/scopes/kotlin/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/kotlin/comment.block2.scope b/data/fixtures/scopes/kotlin/comment.block2.scope new file mode 100644 index 0000000000..b5d8404237 --- /dev/null +++ b/data/fixtures/scopes/kotlin/comment.block2.scope @@ -0,0 +1,10 @@ +/** Hello world */ +--- + +[Content] = +[Removal] = +[Domain] = 0:0-0:18 + >------------------< +0| /** Hello world */ + +[Insertion delimiter] = "\n" diff --git a/data/fixtures/scopes/kotlin/comment.line.scope b/data/fixtures/scopes/kotlin/comment.line.scope new file mode 100644 index 0000000000..7d1477b8a1 --- /dev/null +++ b/data/fixtures/scopes/kotlin/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/kotlin/condition/condition.doWhile.scope b/data/fixtures/scopes/kotlin/condition/condition.doWhile.scope new file mode 100644 index 0000000000..a5db4c6278 --- /dev/null +++ b/data/fixtures/scopes/kotlin/condition/condition.doWhile.scope @@ -0,0 +1,13 @@ +do {} while (true) +--- + +[Content] = +[Removal] = 0:13-0:17 + >----< +0| do {} while (true) + +[Domain] = 0:0-0:18 + >------------------< +0| do {} while (true) + +[Insertion delimiter] = " " diff --git a/data/fixtures/scopes/kotlin/condition/condition.if.scope b/data/fixtures/scopes/kotlin/condition/condition.if.scope new file mode 100644 index 0000000000..4f5ac14fc6 --- /dev/null +++ b/data/fixtures/scopes/kotlin/condition/condition.if.scope @@ -0,0 +1,30 @@ +if (true) {} +else if (false) {} +else {} +--- + +[#1 Content] = +[#1 Removal] = 0:4-0:8 + >----< +0| if (true) {} + +[#1 Domain] = 0:0-2:7 + >------------ +0| if (true) {} +1| else if (false) {} +2| else {} + -------< + +[#1 Insertion delimiter] = " " + + +[#2 Content] = +[#2 Removal] = 1:9-1:14 + >-----< +1| else if (false) {} + +[#2 Domain] = 1:0-1:18 + >------------------< +1| else if (false) {} + +[#2 Insertion delimiter] = " " diff --git a/data/fixtures/scopes/kotlin/condition/condition.switchCase.iteration.scope b/data/fixtures/scopes/kotlin/condition/condition.switchCase.iteration.scope new file mode 100644 index 0000000000..7343248d28 --- /dev/null +++ b/data/fixtures/scopes/kotlin/condition/condition.switchCase.iteration.scope @@ -0,0 +1,10 @@ +when (foo) { } +--- + +[Content] = 0:12-0:13 + >-< +0| when (foo) { } + +[Domain] = 0:0-0:14 + >--------------< +0| when (foo) { } diff --git a/data/fixtures/scopes/kotlin/condition/condition.switchCase.scope b/data/fixtures/scopes/kotlin/condition/condition.switchCase.scope new file mode 100644 index 0000000000..951eb90612 --- /dev/null +++ b/data/fixtures/scopes/kotlin/condition/condition.switchCase.scope @@ -0,0 +1,26 @@ +when (foo) { + 0 -> break +} +--- + +[Content] = 1:4-1:5 + >-< +1| 0 -> break + +[Removal] = 1:4-1:6 + >--< +1| 0 -> break + +[Leading delimiter] = 1:0-1:4 + >----< +1| 0 -> break + +[Trailing delimiter] = 1:5-1:6 + >-< +1| 0 -> break + +[Domain] = 1:4-1:14 + >----------< +1| 0 -> break + +[Insertion delimiter] = " " diff --git a/data/fixtures/scopes/kotlin/condition/condition.switchCase2.scope b/data/fixtures/scopes/kotlin/condition/condition.switchCase2.scope new file mode 100644 index 0000000000..3d6bbfb259 --- /dev/null +++ b/data/fixtures/scopes/kotlin/condition/condition.switchCase2.scope @@ -0,0 +1,40 @@ +when (foo) { + 0, 1 -> break +} +--- + +[#1.1 Content] = 1:4-1:5 + >-< +1| 0, 1 -> break + +[#1.1 Removal] = 1:0-1:5 + >-----< +1| 0, 1 -> break + +[#1.1 Leading delimiter] = 1:0-1:4 + >----< +1| 0, 1 -> break + +[#1.1 Insertion delimiter] = " " + +[#1.2 Content] = 1:7-1:8 + >-< +1| 0, 1 -> break + +[#1.2 Removal] = 1:7-1:9 + >--< +1| 0, 1 -> break + +[#1.2 Leading delimiter] = 1:6-1:7 + >-< +1| 0, 1 -> break + +[#1.2 Trailing delimiter] = 1:8-1:9 + >-< +1| 0, 1 -> break + +[#1.2 Insertion delimiter] = " " + +[#1 Domain] = 1:4-1:17 + >-------------< +1| 0, 1 -> break diff --git a/data/fixtures/scopes/kotlin/condition/condition.switchCase3.scope b/data/fixtures/scopes/kotlin/condition/condition.switchCase3.scope new file mode 100644 index 0000000000..759b683694 --- /dev/null +++ b/data/fixtures/scopes/kotlin/condition/condition.switchCase3.scope @@ -0,0 +1,26 @@ +when (foo) { + else -> break +} +--- + +[Content] = 1:4-1:8 + >----< +1| else -> break + +[Removal] = 1:4-1:9 + >-----< +1| else -> break + +[Leading delimiter] = 1:0-1:4 + >----< +1| else -> break + +[Trailing delimiter] = 1:8-1:9 + >-< +1| else -> break + +[Domain] = 1:4-1:17 + >-------------< +1| else -> break + +[Insertion delimiter] = " " diff --git a/data/fixtures/scopes/kotlin/condition/condition.ternary.scope b/data/fixtures/scopes/kotlin/condition/condition.ternary.scope new file mode 100644 index 0000000000..543169cb1c --- /dev/null +++ b/data/fixtures/scopes/kotlin/condition/condition.ternary.scope @@ -0,0 +1,13 @@ +if (true) 0 else 1 +--- + +[Content] = +[Removal] = 0:4-0:8 + >----< +0| if (true) 0 else 1 + +[Domain] = 0:0-0:18 + >------------------< +0| if (true) 0 else 1 + +[Insertion delimiter] = " " diff --git a/data/fixtures/scopes/kotlin/condition/condition.while.scope b/data/fixtures/scopes/kotlin/condition/condition.while.scope new file mode 100644 index 0000000000..61cd7d9e7a --- /dev/null +++ b/data/fixtures/scopes/kotlin/condition/condition.while.scope @@ -0,0 +1,13 @@ +while (true) {} +--- + +[Content] = +[Removal] = 0:7-0:11 + >----< +0| while (true) {} + +[Domain] = 0:0-0:15 + >---------------< +0| while (true) {} + +[Insertion delimiter] = " " diff --git a/data/fixtures/scopes/kotlin/disqualifyDelimiter.scope b/data/fixtures/scopes/kotlin/disqualifyDelimiter.scope new file mode 100644 index 0000000000..d29fc4f298 --- /dev/null +++ b/data/fixtures/scopes/kotlin/disqualifyDelimiter.scope @@ -0,0 +1,30 @@ +1 < 2 +1 > 2 +1 <= 2 +1 >= 2 +when (foo) { x -> 0 } +{ x -> 0 } +--- +[#1 Content] = 0:2-0:3 + >-< +0| 1 < 2 + +[#2 Content] = 1:2-1:3 + >-< +1| 1 > 2 + +[#3 Content] = 2:2-2:4 + >--< +2| 1 <= 2 + +[#4 Content] = 3:2-3:4 + >--< +3| 1 >= 2 + +[#5 Content] = 4:15-4:17 + >--< +4| when (foo) { x -> 0 } + +[#6 Content] = 5:4-5:6 + >--< +5| { x -> 0 } diff --git a/data/fixtures/scopes/kotlin/functionCall/functionCall.chain.scope b/data/fixtures/scopes/kotlin/functionCall/functionCall.chain.scope new file mode 100644 index 0000000000..c73434c70d --- /dev/null +++ b/data/fixtures/scopes/kotlin/functionCall/functionCall.chain.scope @@ -0,0 +1,19 @@ +foo().bar() +--- + +[#1 Content] = +[#1 Removal] = +[#1 Domain] = 0:0-0:5 + >-----< +0| foo().bar() + +[#1 Insertion delimiter] = " " + + +[#2 Content] = +[#2 Removal] = +[#2 Domain] = 0:0-0:11 + >-----------< +0| foo().bar() + +[#2 Insertion delimiter] = " " diff --git a/data/fixtures/scopes/kotlin/functionCall/functionCall.constructor.scope b/data/fixtures/scopes/kotlin/functionCall/functionCall.constructor.scope new file mode 100644 index 0000000000..c6d74f15a1 --- /dev/null +++ b/data/fixtures/scopes/kotlin/functionCall/functionCall.constructor.scope @@ -0,0 +1,10 @@ +Foo() +--- + +[Content] = +[Removal] = +[Domain] = 0:0-0:5 + >-----< +0| Foo() + +[Insertion delimiter] = " " diff --git a/data/fixtures/scopes/kotlin/functionCall/functionCall.constructor2.scope b/data/fixtures/scopes/kotlin/functionCall/functionCall.constructor2.scope new file mode 100644 index 0000000000..0af026f8fe --- /dev/null +++ b/data/fixtures/scopes/kotlin/functionCall/functionCall.constructor2.scope @@ -0,0 +1,17 @@ +class Foo: Bar() +--- + +[Content] = +[Domain] = 0:11-0:16 + >-----< +0| class Foo: Bar() + +[Removal] = 0:10-0:16 + >------< +0| class Foo: Bar() + +[Leading delimiter] = 0:10-0:11 + >-< +0| class Foo: Bar() + +[Insertion delimiter] = " " diff --git a/data/fixtures/scopes/kotlin/functionCall/functionCall.constructor3.scope b/data/fixtures/scopes/kotlin/functionCall/functionCall.constructor3.scope new file mode 100644 index 0000000000..79b65cdf7a --- /dev/null +++ b/data/fixtures/scopes/kotlin/functionCall/functionCall.constructor3.scope @@ -0,0 +1,19 @@ +class Foo { + constructor(): this() +} +--- + +[Content] = +[Domain] = 1:19-1:25 + >------< +1| constructor(): this() + +[Removal] = 1:18-1:25 + >-------< +1| constructor(): this() + +[Leading delimiter] = 1:18-1:19 + >-< +1| constructor(): this() + +[Insertion delimiter] = " " diff --git a/data/fixtures/scopes/kotlin/functionCall/functionCall.method.scope b/data/fixtures/scopes/kotlin/functionCall/functionCall.method.scope new file mode 100644 index 0000000000..6ab0ba4c3a --- /dev/null +++ b/data/fixtures/scopes/kotlin/functionCall/functionCall.method.scope @@ -0,0 +1,10 @@ +foo.bar() +--- + +[Content] = +[Removal] = +[Domain] = 0:0-0:9 + >---------< +0| foo.bar() + +[Insertion delimiter] = " " diff --git a/data/fixtures/scopes/kotlin/functionCall/functionCall.scope b/data/fixtures/scopes/kotlin/functionCall/functionCall.scope new file mode 100644 index 0000000000..00162e317c --- /dev/null +++ b/data/fixtures/scopes/kotlin/functionCall/functionCall.scope @@ -0,0 +1,10 @@ +foo() +--- + +[Content] = +[Removal] = +[Domain] = 0:0-0:5 + >-----< +0| foo() + +[Insertion delimiter] = " " diff --git a/data/fixtures/scopes/kotlin/functionCallee/functionCallee.chain.scope b/data/fixtures/scopes/kotlin/functionCallee/functionCallee.chain.scope new file mode 100644 index 0000000000..b0b9872650 --- /dev/null +++ b/data/fixtures/scopes/kotlin/functionCallee/functionCallee.chain.scope @@ -0,0 +1,25 @@ +foo().bar() +--- + +[#1 Content] = +[#1 Removal] = 0:0-0:3 + >---< +0| foo().bar() + +[#1 Domain] = 0:0-0:5 + >-----< +0| foo().bar() + +[#1 Insertion delimiter] = " " + + +[#2 Content] = +[#2 Removal] = 0:0-0:9 + >---------< +0| foo().bar() + +[#2 Domain] = 0:0-0:11 + >-----------< +0| foo().bar() + +[#2 Insertion delimiter] = " " diff --git a/data/fixtures/scopes/kotlin/functionCallee/functionCallee.constructor.scope b/data/fixtures/scopes/kotlin/functionCallee/functionCallee.constructor.scope new file mode 100644 index 0000000000..16cc5263eb --- /dev/null +++ b/data/fixtures/scopes/kotlin/functionCallee/functionCallee.constructor.scope @@ -0,0 +1,13 @@ +Foo() +--- + +[Content] = +[Removal] = 0:0-0:3 + >---< +0| Foo() + +[Domain] = 0:0-0:5 + >-----< +0| Foo() + +[Insertion delimiter] = " " diff --git a/data/fixtures/scopes/kotlin/functionCallee/functionCallee.constructor2.scope b/data/fixtures/scopes/kotlin/functionCallee/functionCallee.constructor2.scope new file mode 100644 index 0000000000..a0ff063a6f --- /dev/null +++ b/data/fixtures/scopes/kotlin/functionCallee/functionCallee.constructor2.scope @@ -0,0 +1,17 @@ +class Foo: Bar() +--- + +[Content] = +[Removal] = 0:11-0:14 + >---< +0| class Foo: Bar() + +[Leading delimiter] = 0:10-0:11 + >-< +0| class Foo: Bar() + +[Domain] = 0:11-0:16 + >-----< +0| class Foo: Bar() + +[Insertion delimiter] = " " diff --git a/data/fixtures/scopes/kotlin/functionCallee/functionCallee.constructor3.scope b/data/fixtures/scopes/kotlin/functionCallee/functionCallee.constructor3.scope new file mode 100644 index 0000000000..afafd94175 --- /dev/null +++ b/data/fixtures/scopes/kotlin/functionCallee/functionCallee.constructor3.scope @@ -0,0 +1,19 @@ +class Foo { + constructor(): this() +} +--- + +[Content] = +[Removal] = 1:19-1:23 + >----< +1| constructor(): this() + +[Leading delimiter] = 1:18-1:19 + >-< +1| constructor(): this() + +[Domain] = 1:19-1:25 + >------< +1| constructor(): this() + +[Insertion delimiter] = " " diff --git a/data/fixtures/scopes/kotlin/functionCallee/functionCallee.method.scope b/data/fixtures/scopes/kotlin/functionCallee/functionCallee.method.scope new file mode 100644 index 0000000000..e77bc361ec --- /dev/null +++ b/data/fixtures/scopes/kotlin/functionCallee/functionCallee.method.scope @@ -0,0 +1,13 @@ +foo.bar() +--- + +[Content] = +[Removal] = 0:0-0:7 + >-------< +0| foo.bar() + +[Domain] = 0:0-0:9 + >---------< +0| foo.bar() + +[Insertion delimiter] = " " diff --git a/data/fixtures/scopes/kotlin/functionCallee/functionCallee.scope b/data/fixtures/scopes/kotlin/functionCallee/functionCallee.scope new file mode 100644 index 0000000000..2b075b5c33 --- /dev/null +++ b/data/fixtures/scopes/kotlin/functionCallee/functionCallee.scope @@ -0,0 +1,13 @@ +foo() +--- + +[Content] = +[Removal] = 0:0-0:3 + >---< +0| foo() + +[Domain] = 0:0-0:5 + >-----< +0| foo() + +[Insertion delimiter] = " " diff --git a/data/fixtures/scopes/kotlin/ifStatement.scope b/data/fixtures/scopes/kotlin/ifStatement.scope new file mode 100644 index 0000000000..14f2507621 --- /dev/null +++ b/data/fixtures/scopes/kotlin/ifStatement.scope @@ -0,0 +1,15 @@ +if (true) {} +else if (false) {} +else {} +--- + +[Content] = +[Removal] = +[Domain] = 0:0-2:7 + >------------ +0| if (true) {} +1| else if (false) {} +2| else {} + -------< + +[Insertion delimiter] = "\n" diff --git a/data/fixtures/scopes/kotlin/interior/interior.class.scope b/data/fixtures/scopes/kotlin/interior/interior.class.scope new file mode 100644 index 0000000000..13ef2f4d94 --- /dev/null +++ b/data/fixtures/scopes/kotlin/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/kotlin/interior/interior.constructor.scope b/data/fixtures/scopes/kotlin/interior/interior.constructor.scope new file mode 100644 index 0000000000..21da00c906 --- /dev/null +++ b/data/fixtures/scopes/kotlin/interior/interior.constructor.scope @@ -0,0 +1,27 @@ +class Foo { + constructor() { } +} +--- + +[#1 Content] = 1:4-1:21 + >-----------------< +1| constructor() { } + +[#1 Removal] = +[#1 Domain] = 0:11-2:0 + > +0| class Foo { +1| constructor() { } +2| } + < + +[#1 Insertion delimiter] = " " + + +[#2 Content] = +[#2 Removal] = +[#2 Domain] = 1:19-1:20 + >-< +1| constructor() { } + +[#2 Insertion delimiter] = " " diff --git a/data/fixtures/scopes/kotlin/interior/interior.doWhile.scope b/data/fixtures/scopes/kotlin/interior/interior.doWhile.scope new file mode 100644 index 0000000000..1c2166cf2f --- /dev/null +++ b/data/fixtures/scopes/kotlin/interior/interior.doWhile.scope @@ -0,0 +1,10 @@ +do { } while (true) +--- + +[Content] = +[Removal] = +[Domain] = 0:4-0:5 + >-< +0| do { } while (true) + +[Insertion delimiter] = " " diff --git a/data/fixtures/scopes/kotlin/interior/interior.enum.scope b/data/fixtures/scopes/kotlin/interior/interior.enum.scope new file mode 100644 index 0000000000..ba8db21a41 --- /dev/null +++ b/data/fixtures/scopes/kotlin/interior/interior.enum.scope @@ -0,0 +1,10 @@ +enum class Foo { } +--- + +[Content] = +[Removal] = +[Domain] = 0:16-0:17 + >-< +0| enum class Foo { } + +[Insertion delimiter] = " " diff --git a/data/fixtures/scopes/kotlin/interior/interior.for.scope b/data/fixtures/scopes/kotlin/interior/interior.for.scope new file mode 100644 index 0000000000..47b9d05522 --- /dev/null +++ b/data/fixtures/scopes/kotlin/interior/interior.for.scope @@ -0,0 +1,10 @@ +for (i in 0 until size) { } +--- + +[Content] = +[Removal] = +[Domain] = 0:25-0:26 + >-< +0| for (i in 0 until size) { } + +[Insertion delimiter] = " " diff --git a/data/fixtures/scopes/kotlin/interior/interior.foreach.scope b/data/fixtures/scopes/kotlin/interior/interior.foreach.scope new file mode 100644 index 0000000000..7738d34017 --- /dev/null +++ b/data/fixtures/scopes/kotlin/interior/interior.foreach.scope @@ -0,0 +1,10 @@ +for (v in values) { } +--- + +[Content] = +[Removal] = +[Domain] = 0:19-0:20 + >-< +0| for (v in values) { } + +[Insertion delimiter] = " " diff --git a/data/fixtures/scopes/kotlin/interior/interior.function.scope b/data/fixtures/scopes/kotlin/interior/interior.function.scope new file mode 100644 index 0000000000..6f92f91543 --- /dev/null +++ b/data/fixtures/scopes/kotlin/interior/interior.function.scope @@ -0,0 +1,10 @@ +fun bar() { } +--- + +[Content] = +[Removal] = +[Domain] = 0:11-0:12 + >-< +0| fun bar() { } + +[Insertion delimiter] = " " diff --git a/data/fixtures/scopes/kotlin/interior/interior.if.scope b/data/fixtures/scopes/kotlin/interior/interior.if.scope new file mode 100644 index 0000000000..407453929f --- /dev/null +++ b/data/fixtures/scopes/kotlin/interior/interior.if.scope @@ -0,0 +1,30 @@ +if (true) { } +else if (false) { } +else { } +--- + +[#1 Content] = +[#1 Removal] = +[#1 Domain] = 0:11-0:12 + >-< +0| if (true) { } + +[#1 Insertion delimiter] = " " + + +[#2 Content] = +[#2 Removal] = +[#2 Domain] = 1:17-1:18 + >-< +1| else if (false) { } + +[#2 Insertion delimiter] = " " + + +[#3 Content] = +[#3 Removal] = +[#3 Domain] = 2:6-2:7 + >-< +2| else { } + +[#3 Insertion delimiter] = " " diff --git a/data/fixtures/scopes/kotlin/interior/interior.interface.scope b/data/fixtures/scopes/kotlin/interior/interior.interface.scope new file mode 100644 index 0000000000..b9968a2fff --- /dev/null +++ b/data/fixtures/scopes/kotlin/interior/interior.interface.scope @@ -0,0 +1,10 @@ +interface Foo { } +--- + +[Content] = +[Removal] = +[Domain] = 0:15-0:16 + >-< +0| interface Foo { } + +[Insertion delimiter] = " " diff --git a/data/fixtures/scopes/kotlin/interior/interior.lambda.scope b/data/fixtures/scopes/kotlin/interior/interior.lambda.scope new file mode 100644 index 0000000000..54d303e92f --- /dev/null +++ b/data/fixtures/scopes/kotlin/interior/interior.lambda.scope @@ -0,0 +1,10 @@ +{ } +--- + +[Content] = +[Removal] = +[Domain] = 0:1-0:2 + >-< +0| { } + +[Insertion delimiter] = " " diff --git a/data/fixtures/scopes/kotlin/interior/interior.method.scope b/data/fixtures/scopes/kotlin/interior/interior.method.scope new file mode 100644 index 0000000000..5e1e62642d --- /dev/null +++ b/data/fixtures/scopes/kotlin/interior/interior.method.scope @@ -0,0 +1,27 @@ +class Foo { + fun bar() { } +} +--- + +[#1 Content] = 1:4-1:17 + >-------------< +1| fun bar() { } + +[#1 Removal] = +[#1 Domain] = 0:11-2:0 + > +0| class Foo { +1| fun bar() { } +2| } + < + +[#1 Insertion delimiter] = " " + + +[#2 Content] = +[#2 Removal] = +[#2 Domain] = 1:15-1:16 + >-< +1| fun bar() { } + +[#2 Insertion delimiter] = " " diff --git a/data/fixtures/scopes/kotlin/interior/interior.static.scope b/data/fixtures/scopes/kotlin/interior/interior.static.scope new file mode 100644 index 0000000000..c50e7cda65 --- /dev/null +++ b/data/fixtures/scopes/kotlin/interior/interior.static.scope @@ -0,0 +1,27 @@ +class Foo { + init { } +} +--- + +[#1 Content] = 1:4-1:12 + >--------< +1| init { } + +[#1 Removal] = +[#1 Domain] = 0:11-2:0 + > +0| class Foo { +1| init { } +2| } + < + +[#1 Insertion delimiter] = " " + + +[#2 Content] = +[#2 Removal] = +[#2 Domain] = 1:10-1:11 + >-< +1| init { } + +[#2 Insertion delimiter] = " " diff --git a/data/fixtures/scopes/kotlin/interior/interior.switch.scope b/data/fixtures/scopes/kotlin/interior/interior.switch.scope new file mode 100644 index 0000000000..18bb219b2d --- /dev/null +++ b/data/fixtures/scopes/kotlin/interior/interior.switch.scope @@ -0,0 +1,10 @@ +when (value) { } +--- + +[Content] = +[Removal] = +[Domain] = 0:14-0:15 + >-< +0| when (value) { } + +[Insertion delimiter] = " " diff --git a/data/fixtures/scopes/kotlin/interior/interior.switchCase.scope b/data/fixtures/scopes/kotlin/interior/interior.switchCase.scope new file mode 100644 index 0000000000..d9d9833bd0 --- /dev/null +++ b/data/fixtures/scopes/kotlin/interior/interior.switchCase.scope @@ -0,0 +1,87 @@ +when (foo) { + 0 -> + bar() + 1 -> { + bar() + break + } + else -> bar() +--- + +[#1 Content] = 2:8-2:13 + >-----< +2| bar() + +[#1 Removal] = 1:8-2:13 + > +1| 0 -> +2| bar() + -------------< + +[#1 Domain] = 1:4-2:13 + >---- +1| 0 -> +2| bar() + -------------< + +[#1 Insertion delimiter] = " " + + +[#2 Content] = 3:9-6:5 + >- +3| 1 -> { +4| bar() +5| break +6| } + -----< + +[#2 Removal] = 3:8-6:5 + >-- +3| 1 -> { +4| bar() +5| break +6| } + -----< + +[#2 Domain] = 3:4-6:5 + >------ +3| 1 -> { +4| bar() +5| break +6| } + -----< + +[#2 Insertion delimiter] = " " + + +[#3 Content] = 4:8-5:13 + >----- +4| bar() +5| break + -------------< + +[#3 Removal] = +[#3 Domain] = 3:10-6:4 + > +3| 1 -> { +4| bar() +5| break +6| } + ----< + +[#3 Insertion delimiter] = " " + + +[#4 Content] = 7:12-7:17 + >-----< +7| else -> bar() + +[#4 Removal] = 7:11-7:17 + >------< +7| else -> bar() + +[#4 Domain] = 7:4-7:17 + >-------------< +7| else -> bar() + +[#4 Insertion delimiter] = " " diff --git a/data/fixtures/scopes/kotlin/interior/interior.try.scope b/data/fixtures/scopes/kotlin/interior/interior.try.scope new file mode 100644 index 0000000000..02b8ad0d84 --- /dev/null +++ b/data/fixtures/scopes/kotlin/interior/interior.try.scope @@ -0,0 +1,37 @@ +try { +} catch (ex: Exception) { +} finally { +} +--- + +[#1 Content] = +[#1 Removal] = +[#1 Domain] = 0:5-1:0 + > +0| try { +1| } catch (ex: Exception) { + < + +[#1 Insertion delimiter] = " " + + +[#2 Content] = +[#2 Removal] = +[#2 Domain] = 1:25-2:0 + > +1| } catch (ex: Exception) { +2| } finally { + < + +[#2 Insertion delimiter] = " " + + +[#3 Content] = +[#3 Removal] = +[#3 Domain] = 2:11-3:0 + > +2| } finally { +3| } + < + +[#3 Insertion delimiter] = " " diff --git a/data/fixtures/scopes/kotlin/interior/interior.while.scope b/data/fixtures/scopes/kotlin/interior/interior.while.scope new file mode 100644 index 0000000000..1afbe23128 --- /dev/null +++ b/data/fixtures/scopes/kotlin/interior/interior.while.scope @@ -0,0 +1,10 @@ +while (true) { } +--- + +[Content] = +[Removal] = +[Domain] = 0:14-0:15 + >-< +0| while (true) { } + +[Insertion delimiter] = " " diff --git a/data/fixtures/scopes/kotlin/key.mapPair.iteration.scope b/data/fixtures/scopes/kotlin/key.mapPair.iteration.scope new file mode 100644 index 0000000000..33ef36ed68 --- /dev/null +++ b/data/fixtures/scopes/kotlin/key.mapPair.iteration.scope @@ -0,0 +1,7 @@ +mapOf(aaa to 0, bbb to 1) +--- + +[Content] = +[Domain] = 0:6-0:24 + >------------------< +0| mapOf(aaa to 0, bbb to 1) diff --git a/data/fixtures/scopes/kotlin/key.mapPair.scope b/data/fixtures/scopes/kotlin/key.mapPair.scope new file mode 100644 index 0000000000..cc62511afb --- /dev/null +++ b/data/fixtures/scopes/kotlin/key.mapPair.scope @@ -0,0 +1,43 @@ +mapOf(aaa to 0, bbb to 1) +--- + +[#1 Content] = 0:6-0:9 + >---< +0| mapOf(aaa to 0, bbb to 1) + +[#1 Removal] = 0:6-0:10 + >----< +0| mapOf(aaa to 0, bbb to 1) + +[#1 Trailing delimiter] = 0:9-0:10 + >-< +0| mapOf(aaa to 0, bbb to 1) + +[#1 Domain] = 0:6-0:14 + >--------< +0| mapOf(aaa to 0, bbb to 1) + +[#1 Insertion delimiter] = " " + + +[#2 Content] = 0:16-0:19 + >---< +0| mapOf(aaa to 0, bbb to 1) + +[#2 Removal] = 0:16-0:20 + >----< +0| mapOf(aaa to 0, bbb to 1) + +[#2 Leading delimiter] = 0:15-0:16 + >-< +0| mapOf(aaa to 0, bbb to 1) + +[#2 Trailing delimiter] = 0:19-0:20 + >-< +0| mapOf(aaa to 0, bbb to 1) + +[#2 Domain] = 0:16-0:24 + >--------< +0| mapOf(aaa to 0, bbb to 1) + +[#2 Insertion delimiter] = " " diff --git a/data/fixtures/scopes/kotlin/name/name.argument.actual.iteration.scope b/data/fixtures/scopes/kotlin/name/name.argument.actual.iteration.scope new file mode 100644 index 0000000000..546c765209 --- /dev/null +++ b/data/fixtures/scopes/kotlin/name/name.argument.actual.iteration.scope @@ -0,0 +1,13 @@ +foo(aaa = 0, bbb = 1) +--- + +[#1 Content] = +[#1 Domain] = 0:0-0:21 + >---------------------< +0| foo(aaa = 0, bbb = 1) + + +[#2 Content] = +[#2 Domain] = 0:4-0:20 + >----------------< +0| foo(aaa = 0, bbb = 1) diff --git a/data/fixtures/scopes/kotlin/name/name.argument.actual.scope b/data/fixtures/scopes/kotlin/name/name.argument.actual.scope new file mode 100644 index 0000000000..7587d44f94 --- /dev/null +++ b/data/fixtures/scopes/kotlin/name/name.argument.actual.scope @@ -0,0 +1,43 @@ +foo(aaa = 0, bbb = 1) +--- + +[#1 Content] = 0:4-0:7 + >---< +0| foo(aaa = 0, bbb = 1) + +[#1 Removal] = 0:4-0:8 + >----< +0| foo(aaa = 0, bbb = 1) + +[#1 Trailing delimiter] = 0:7-0:8 + >-< +0| foo(aaa = 0, bbb = 1) + +[#1 Domain] = 0:4-0:11 + >-------< +0| foo(aaa = 0, bbb = 1) + +[#1 Insertion delimiter] = " " + + +[#2 Content] = 0:13-0:16 + >---< +0| foo(aaa = 0, bbb = 1) + +[#2 Removal] = 0:13-0:17 + >----< +0| foo(aaa = 0, bbb = 1) + +[#2 Leading delimiter] = 0:12-0:13 + >-< +0| foo(aaa = 0, bbb = 1) + +[#2 Trailing delimiter] = 0:16-0:17 + >-< +0| foo(aaa = 0, bbb = 1) + +[#2 Domain] = 0:13-0:20 + >-------< +0| foo(aaa = 0, bbb = 1) + +[#2 Insertion delimiter] = " " diff --git a/data/fixtures/scopes/kotlin/name/name.argument.catch.scope b/data/fixtures/scopes/kotlin/name/name.argument.catch.scope new file mode 100644 index 0000000000..6d686d18c9 --- /dev/null +++ b/data/fixtures/scopes/kotlin/name/name.argument.catch.scope @@ -0,0 +1,27 @@ +try { +} catch (e: MyException) { +} catch (e: Exception) {} +--- + +[#1 Content] = +[#1 Removal] = 1:9-1:10 + >-< +1| } catch (e: MyException) { + +[#1 Domain] = 1:9-1:23 + >--------------< +1| } catch (e: MyException) { + +[#1 Insertion delimiter] = " " + + +[#2 Content] = +[#2 Removal] = 2:9-2:10 + >-< +2| } catch (e: Exception) {} + +[#2 Domain] = 2:9-2:21 + >------------< +2| } catch (e: Exception) {} + +[#2 Insertion delimiter] = " " diff --git a/data/fixtures/scopes/kotlin/name/name.argument.formal.constructor.iteration.scope b/data/fixtures/scopes/kotlin/name/name.argument.formal.constructor.iteration.scope new file mode 100644 index 0000000000..d58138ab5c --- /dev/null +++ b/data/fixtures/scopes/kotlin/name/name.argument.formal.constructor.iteration.scope @@ -0,0 +1,27 @@ +class Foo { + constructor(aaa: Int, bbb: Int) {} +} +--- + +[#1 Content] = +[#1 Domain] = 0:0-2:1 + >----------- +0| class Foo { +1| constructor(aaa: Int, bbb: Int) {} +2| } + -< + + +[#2 Content] = +[#2 Domain] = 0:11-2:0 + > +0| class Foo { +1| constructor(aaa: Int, bbb: Int) {} +2| } + < + + +[#3 Content] = +[#3 Domain] = 1:16-1:34 + >------------------< +1| constructor(aaa: Int, bbb: Int) {} diff --git a/data/fixtures/scopes/kotlin/name/name.argument.formal.constructor.iteration2.scope b/data/fixtures/scopes/kotlin/name/name.argument.formal.constructor.iteration2.scope new file mode 100644 index 0000000000..44868ed858 --- /dev/null +++ b/data/fixtures/scopes/kotlin/name/name.argument.formal.constructor.iteration2.scope @@ -0,0 +1,13 @@ +class Foo(aaa: Int, bbb: Int) {} +--- + +[#1 Content] = +[#1 Domain] = 0:0-0:32 + >--------------------------------< +0| class Foo(aaa: Int, bbb: Int) {} + + +[#2 Content] = +[#2 Domain] = 0:10-0:28 + >------------------< +0| class Foo(aaa: Int, bbb: Int) {} diff --git a/data/fixtures/scopes/kotlin/name/name.argument.formal.constructor.scope b/data/fixtures/scopes/kotlin/name/name.argument.formal.constructor.scope new file mode 100644 index 0000000000..1dac5abd48 --- /dev/null +++ b/data/fixtures/scopes/kotlin/name/name.argument.formal.constructor.scope @@ -0,0 +1,114 @@ +class Foo { + constructor(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 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-2:1 + >----------- +0| class Foo { +1| constructor(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} +2| } + -< + +[#1 Insertion delimiter] = " " + + +[#2 Content] = +[#2 Removal] = 1:4-1:15 + >-----------< +1| constructor(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#2 Leading delimiter] = 1:0-1:4 + >----< +1| constructor(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#2 Domain] = 1:4-1:80 + >----------------------------------------------------------------------------< +1| constructor(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#2 Insertion delimiter] = " " + + +[#3 Content] = +[#3 Removal] = 1:16-1:19 + >---< +1| constructor(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#3 Domain] = 1:16-1:24 + >--------< +1| constructor(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#3 Insertion delimiter] = " " + + +[#4 Content] = 1:33-1:36 + >---< +1| constructor(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#4 Removal] = 1:32-1:36 + >----< +1| constructor(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#4 Leading delimiter] = 1:32-1:33 + >-< +1| constructor(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#4 Domain] = 1:26-1:41 + >---------------< +1| constructor(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#4 Insertion delimiter] = " " + + +[#5 Content] = 1:43-1:46 + >---< +1| constructor(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#5 Removal] = 1:42-1:46 + >----< +1| constructor(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#5 Leading delimiter] = 1:42-1:43 + >-< +1| constructor(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#5 Domain] = 1:43-1:55 + >------------< +1| constructor(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#5 Insertion delimiter] = " " + + +[#6 Content] = 1:64-1:67 + >---< +1| constructor(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#6 Removal] = 1:63-1:67 + >----< +1| constructor(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#6 Leading delimiter] = 1:63-1:64 + >-< +1| constructor(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#6 Domain] = 1:57-1:76 + >-------------------< +1| constructor(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#6 Insertion delimiter] = " " diff --git a/data/fixtures/scopes/kotlin/name/name.argument.formal.constructor2.scope b/data/fixtures/scopes/kotlin/name/name.argument.formal.constructor2.scope new file mode 100644 index 0000000000..6e764d4197 --- /dev/null +++ b/data/fixtures/scopes/kotlin/name/name.argument.formal.constructor2.scope @@ -0,0 +1,86 @@ +class Foo(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} +--- + +[#1 Content] = +[#1 Removal] = 0:6-0:9 + >---< +0| class Foo(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#1 Leading delimiter] = 0:5-0:6 + >-< +0| class Foo(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#1 Domain] = 0:0-0:74 + >--------------------------------------------------------------------------< +0| class Foo(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#1 Insertion delimiter] = " " + + +[#2 Content] = +[#2 Removal] = 0:10-0:13 + >---< +0| class Foo(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#2 Domain] = 0:10-0:18 + >--------< +0| class Foo(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#2 Insertion delimiter] = " " + + +[#3 Content] = 0:27-0:30 + >---< +0| class Foo(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#3 Removal] = 0:26-0:30 + >----< +0| class Foo(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#3 Leading delimiter] = 0:26-0:27 + >-< +0| class Foo(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#3 Domain] = 0:20-0:35 + >---------------< +0| class Foo(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#3 Insertion delimiter] = " " + + +[#4 Content] = 0:37-0:40 + >---< +0| class Foo(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#4 Removal] = 0:36-0:40 + >----< +0| class Foo(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#4 Leading delimiter] = 0:36-0:37 + >-< +0| class Foo(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#4 Domain] = 0:37-0:49 + >------------< +0| class Foo(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#4 Insertion delimiter] = " " + + +[#5 Content] = 0:58-0:61 + >---< +0| class Foo(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#5 Removal] = 0:57-0:61 + >----< +0| class Foo(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#5 Leading delimiter] = 0:57-0:58 + >-< +0| class Foo(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#5 Domain] = 0:51-0:70 + >-------------------< +0| class Foo(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#5 Insertion delimiter] = " " diff --git a/data/fixtures/scopes/kotlin/name/name.argument.formal.iteration.scope b/data/fixtures/scopes/kotlin/name/name.argument.formal.iteration.scope new file mode 100644 index 0000000000..bfafcabc7e --- /dev/null +++ b/data/fixtures/scopes/kotlin/name/name.argument.formal.iteration.scope @@ -0,0 +1,13 @@ +fun foo(aaa: Int, bbb: Int) {} +--- + +[#1 Content] = +[#1 Domain] = 0:0-0:30 + >------------------------------< +0| fun foo(aaa: Int, bbb: Int) {} + + +[#2 Content] = +[#2 Domain] = 0:8-0:26 + >------------------< +0| fun foo(aaa: Int, bbb: Int) {} diff --git a/data/fixtures/scopes/kotlin/name/name.argument.formal.method.iteration.scope b/data/fixtures/scopes/kotlin/name/name.argument.formal.method.iteration.scope new file mode 100644 index 0000000000..d4b45da11e --- /dev/null +++ b/data/fixtures/scopes/kotlin/name/name.argument.formal.method.iteration.scope @@ -0,0 +1,27 @@ +class Foo { + fun bar(aaa: Int, bbb: Int) {} +} +--- + +[#1 Content] = +[#1 Domain] = 0:0-2:1 + >----------- +0| class Foo { +1| fun bar(aaa: Int, bbb: Int) {} +2| } + -< + + +[#2 Content] = +[#2 Domain] = 0:11-2:0 + > +0| class Foo { +1| fun bar(aaa: Int, bbb: Int) {} +2| } + < + + +[#3 Content] = +[#3 Domain] = 1:12-1:30 + >------------------< +1| fun bar(aaa: Int, bbb: Int) {} diff --git a/data/fixtures/scopes/kotlin/name/name.argument.formal.method.scope b/data/fixtures/scopes/kotlin/name/name.argument.formal.method.scope new file mode 100644 index 0000000000..dabfb505d8 --- /dev/null +++ b/data/fixtures/scopes/kotlin/name/name.argument.formal.method.scope @@ -0,0 +1,114 @@ +class Foo { + fun foo(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 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-2:1 + >----------- +0| class Foo { +1| fun foo(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} +2| } + -< + +[#1 Insertion delimiter] = " " + + +[#2 Content] = +[#2 Removal] = 1:8-1:11 + >---< +1| fun foo(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#2 Leading delimiter] = 1:7-1:8 + >-< +1| fun foo(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#2 Domain] = 1:4-1:76 + >------------------------------------------------------------------------< +1| fun foo(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#2 Insertion delimiter] = " " + + +[#3 Content] = +[#3 Removal] = 1:12-1:15 + >---< +1| fun foo(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#3 Domain] = 1:12-1:20 + >--------< +1| fun foo(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#3 Insertion delimiter] = " " + + +[#4 Content] = 1:29-1:32 + >---< +1| fun foo(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#4 Removal] = 1:28-1:32 + >----< +1| fun foo(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#4 Leading delimiter] = 1:28-1:29 + >-< +1| fun foo(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#4 Domain] = 1:22-1:37 + >---------------< +1| fun foo(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#4 Insertion delimiter] = " " + + +[#5 Content] = 1:39-1:42 + >---< +1| fun foo(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#5 Removal] = 1:38-1:42 + >----< +1| fun foo(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#5 Leading delimiter] = 1:38-1:39 + >-< +1| fun foo(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#5 Domain] = 1:39-1:51 + >------------< +1| fun foo(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#5 Insertion delimiter] = " " + + +[#6 Content] = 1:60-1:63 + >---< +1| fun foo(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#6 Removal] = 1:59-1:63 + >----< +1| fun foo(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#6 Leading delimiter] = 1:59-1:60 + >-< +1| fun foo(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#6 Domain] = 1:53-1:72 + >-------------------< +1| fun foo(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#6 Insertion delimiter] = " " diff --git a/data/fixtures/scopes/kotlin/name/name.argument.formal.method2.scope b/data/fixtures/scopes/kotlin/name/name.argument.formal.method2.scope new file mode 100644 index 0000000000..e8f6cdbfa9 --- /dev/null +++ b/data/fixtures/scopes/kotlin/name/name.argument.formal.method2.scope @@ -0,0 +1,41 @@ +class Foo { + set(aaa: Int) {} +} +--- + +[#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| set(aaa: Int) {} +2| } + -< + +[#1 Insertion delimiter] = " " + + +[#2 Content] = +[#2 Removal] = 1:8-1:11 + >---< +1| set(aaa: Int) {} + +[#2 Domain] = 1:8-1:16 + >--------< +1| set(aaa: Int) {} + +[#2 Insertion delimiter] = " " diff --git a/data/fixtures/scopes/kotlin/name/name.argument.formal.scope b/data/fixtures/scopes/kotlin/name/name.argument.formal.scope new file mode 100644 index 0000000000..e76cbdf9d1 --- /dev/null +++ b/data/fixtures/scopes/kotlin/name/name.argument.formal.scope @@ -0,0 +1,86 @@ +fun foo(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} +--- + +[#1 Content] = +[#1 Removal] = 0:4-0:7 + >---< +0| fun foo(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#1 Leading delimiter] = 0:3-0:4 + >-< +0| fun foo(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#1 Domain] = 0:0-0:72 + >------------------------------------------------------------------------< +0| fun foo(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#1 Insertion delimiter] = " " + + +[#2 Content] = +[#2 Removal] = 0:8-0:11 + >---< +0| fun foo(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#2 Domain] = 0:8-0:16 + >--------< +0| fun foo(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#2 Insertion delimiter] = " " + + +[#3 Content] = 0:25-0:28 + >---< +0| fun foo(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#3 Removal] = 0:24-0:28 + >----< +0| fun foo(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#3 Leading delimiter] = 0:24-0:25 + >-< +0| fun foo(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#3 Domain] = 0:18-0:33 + >---------------< +0| fun foo(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#3 Insertion delimiter] = " " + + +[#4 Content] = 0:35-0:38 + >---< +0| fun foo(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#4 Removal] = 0:34-0:38 + >----< +0| fun foo(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#4 Leading delimiter] = 0:34-0:35 + >-< +0| fun foo(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#4 Domain] = 0:35-0:47 + >------------< +0| fun foo(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#4 Insertion delimiter] = " " + + +[#5 Content] = 0:56-0:59 + >---< +0| fun foo(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#5 Removal] = 0:55-0:59 + >----< +0| fun foo(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#5 Leading delimiter] = 0:55-0:56 + >-< +0| fun foo(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#5 Domain] = 0:49-0:68 + >-------------------< +0| fun foo(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#5 Insertion delimiter] = " " diff --git a/data/fixtures/scopes/kotlin/name/name.assignment.scope b/data/fixtures/scopes/kotlin/name/name.assignment.scope new file mode 100644 index 0000000000..ccbd90c654 --- /dev/null +++ b/data/fixtures/scopes/kotlin/name/name.assignment.scope @@ -0,0 +1,20 @@ +foo = 0 +--- + +[Content] = 0:0-0:3 + >---< +0| foo = 0 + +[Removal] = 0:0-0:4 + >----< +0| foo = 0 + +[Trailing delimiter] = 0:3-0:4 + >-< +0| foo = 0 + +[Domain] = 0:0-0:7 + >-------< +0| foo = 0 + +[Insertion delimiter] = " " diff --git a/data/fixtures/scopes/kotlin/name/name.class.scope b/data/fixtures/scopes/kotlin/name/name.class.scope new file mode 100644 index 0000000000..211086562c --- /dev/null +++ b/data/fixtures/scopes/kotlin/name/name.class.scope @@ -0,0 +1,24 @@ +class Foo {} +--- + +[Content] = 0:6-0:9 + >---< +0| class Foo {} + +[Removal] = 0:6-0:10 + >----< +0| class Foo {} + +[Leading delimiter] = 0:5-0:6 + >-< +0| class Foo {} + +[Trailing delimiter] = 0:9-0:10 + >-< +0| class Foo {} + +[Domain] = 0:0-0:12 + >------------< +0| class Foo {} + +[Insertion delimiter] = " " diff --git a/data/fixtures/scopes/kotlin/name/name.class2.scope b/data/fixtures/scopes/kotlin/name/name.class2.scope new file mode 100644 index 0000000000..f5dc179a8b --- /dev/null +++ b/data/fixtures/scopes/kotlin/name/name.class2.scope @@ -0,0 +1,24 @@ +object Foo {} +--- + +[Content] = 0:7-0:10 + >---< +0| object Foo {} + +[Removal] = 0:7-0:11 + >----< +0| object Foo {} + +[Leading delimiter] = 0:6-0:7 + >-< +0| object Foo {} + +[Trailing delimiter] = 0:10-0:11 + >-< +0| object Foo {} + +[Domain] = 0:0-0:13 + >-------------< +0| object Foo {} + +[Insertion delimiter] = " " diff --git a/data/fixtures/scopes/kotlin/name/name.class3.scope b/data/fixtures/scopes/kotlin/name/name.class3.scope new file mode 100644 index 0000000000..518f3ca8bb --- /dev/null +++ b/data/fixtures/scopes/kotlin/name/name.class3.scope @@ -0,0 +1,52 @@ +class Foo { + companion object 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| companion object Bar {} +2| } + -< + +[#1 Insertion delimiter] = " " + + +[#2 Content] = 1:21-1:24 + >---< +1| companion object Bar {} + +[#2 Removal] = 1:21-1:25 + >----< +1| companion object Bar {} + +[#2 Leading delimiter] = 1:20-1:21 + >-< +1| companion object Bar {} + +[#2 Trailing delimiter] = 1:24-1:25 + >-< +1| companion object Bar {} + +[#2 Domain] = 1:4-1:27 + >-----------------------< +1| companion object Bar {} + +[#2 Insertion delimiter] = " " diff --git a/data/fixtures/scopes/kotlin/name/name.constructor.scope b/data/fixtures/scopes/kotlin/name/name.constructor.scope new file mode 100644 index 0000000000..0f06c0b675 --- /dev/null +++ b/data/fixtures/scopes/kotlin/name/name.constructor.scope @@ -0,0 +1,45 @@ +class Foo { + constructor() {} +} +--- + +[#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| constructor() {} +2| } + -< + +[#1 Insertion delimiter] = " " + + +[#2 Content] = +[#2 Removal] = 1:4-1:15 + >-----------< +1| constructor() {} + +[#2 Leading delimiter] = 1:0-1:4 + >----< +1| constructor() {} + +[#2 Domain] = 1:4-1:20 + >----------------< +1| constructor() {} + +[#2 Insertion delimiter] = " " diff --git a/data/fixtures/scopes/kotlin/name/name.enum.scope b/data/fixtures/scopes/kotlin/name/name.enum.scope new file mode 100644 index 0000000000..049f0a5883 --- /dev/null +++ b/data/fixtures/scopes/kotlin/name/name.enum.scope @@ -0,0 +1,24 @@ +enum class Foo {} +--- + +[Content] = 0:11-0:14 + >---< +0| enum class Foo {} + +[Removal] = 0:11-0:15 + >----< +0| enum class Foo {} + +[Leading delimiter] = 0:10-0:11 + >-< +0| enum class Foo {} + +[Trailing delimiter] = 0:14-0:15 + >-< +0| enum class Foo {} + +[Domain] = 0:0-0:17 + >-----------------< +0| enum class Foo {} + +[Insertion delimiter] = " " diff --git a/data/fixtures/scopes/kotlin/name/name.field.class.scope b/data/fixtures/scopes/kotlin/name/name.field.class.scope new file mode 100644 index 0000000000..c03fbe7548 --- /dev/null +++ b/data/fixtures/scopes/kotlin/name/name.field.class.scope @@ -0,0 +1,94 @@ +class Foo { + var bar: Int = 0 + val baz = 0 + val bongo: Int +} +--- + +[#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-4:1 + >----------- +0| class Foo { +1| var bar: Int = 0 +2| val baz = 0 +3| val bongo: Int +4| } + -< + +[#1 Insertion delimiter] = " " + + +[#2 Content] = 1:8-1:11 + >---< +1| var bar: Int = 0 + +[#2 Removal] = 1:7-1:11 + >----< +1| var bar: Int = 0 + +[#2 Leading delimiter] = 1:7-1:8 + >-< +1| var bar: Int = 0 + +[#2 Domain] = 1:4-1:20 + >----------------< +1| var bar: Int = 0 + +[#2 Insertion delimiter] = " " + + +[#3 Content] = 2:8-2:11 + >---< +2| val baz = 0 + +[#3 Removal] = 2:8-2:12 + >----< +2| val baz = 0 + +[#3 Leading delimiter] = 2:7-2:8 + >-< +2| val baz = 0 + +[#3 Trailing delimiter] = 2:11-2:12 + >-< +2| val baz = 0 + +[#3 Domain] = 2:4-2:15 + >-----------< +2| val baz = 0 + +[#3 Insertion delimiter] = " " + + +[#4 Content] = 3:8-3:13 + >-----< +3| val bongo: Int + +[#4 Removal] = 3:7-3:13 + >------< +3| val bongo: Int + +[#4 Leading delimiter] = 3:7-3:8 + >-< +3| val bongo: Int + +[#4 Domain] = 3:4-3:18 + >--------------< +3| val bongo: Int + +[#4 Insertion delimiter] = " " diff --git a/data/fixtures/scopes/kotlin/name/name.field.enum.scope b/data/fixtures/scopes/kotlin/name/name.field.enum.scope new file mode 100644 index 0000000000..3e18c1fffa --- /dev/null +++ b/data/fixtures/scopes/kotlin/name/name.field.enum.scope @@ -0,0 +1,63 @@ +enum class Foo { + bar, + baz() +} +--- + +[#1 Content] = 0:11-0:14 + >---< +0| enum class Foo { + +[#1 Removal] = 0:11-0:15 + >----< +0| enum class Foo { + +[#1 Leading delimiter] = 0:10-0:11 + >-< +0| enum class Foo { + +[#1 Trailing delimiter] = 0:14-0:15 + >-< +0| enum class Foo { + +[#1 Domain] = 0:0-3:1 + >---------------- +0| enum class 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/kotlin/name/name.field.interface.scope b/data/fixtures/scopes/kotlin/name/name.field.interface.scope new file mode 100644 index 0000000000..62b2cf00ea --- /dev/null +++ b/data/fixtures/scopes/kotlin/name/name.field.interface.scope @@ -0,0 +1,48 @@ +interface Foo { + val bar: Int +} +--- + +[#1 Content] = 0:10-0:13 + >---< +0| interface Foo { + +[#1 Removal] = 0:10-0:14 + >----< +0| interface Foo { + +[#1 Leading delimiter] = 0:9-0:10 + >-< +0| interface Foo { + +[#1 Trailing delimiter] = 0:13-0:14 + >-< +0| interface Foo { + +[#1 Domain] = 0:0-2:1 + >--------------- +0| interface Foo { +1| val bar: Int +2| } + -< + +[#1 Insertion delimiter] = " " + + +[#2 Content] = 1:8-1:11 + >---< +1| val bar: Int + +[#2 Removal] = 1:7-1:11 + >----< +1| val bar: Int + +[#2 Leading delimiter] = 1:7-1:8 + >-< +1| val bar: Int + +[#2 Domain] = 1:4-1:16 + >------------< +1| val bar: Int + +[#2 Insertion delimiter] = " " diff --git a/data/fixtures/scopes/kotlin/name/name.foreach.scope b/data/fixtures/scopes/kotlin/name/name.foreach.scope new file mode 100644 index 0000000000..e71717e127 --- /dev/null +++ b/data/fixtures/scopes/kotlin/name/name.foreach.scope @@ -0,0 +1,20 @@ +for (v in values) {} +--- + +[Content] = 0:5-0:6 + >-< +0| for (v in values) {} + +[Removal] = 0:5-0:7 + >--< +0| for (v in values) {} + +[Trailing delimiter] = 0:6-0:7 + >-< +0| for (v in values) {} + +[Domain] = 0:0-0:20 + >--------------------< +0| for (v in values) {} + +[Insertion delimiter] = " " diff --git a/data/fixtures/scopes/kotlin/name/name.function.scope b/data/fixtures/scopes/kotlin/name/name.function.scope new file mode 100644 index 0000000000..a34a35925c --- /dev/null +++ b/data/fixtures/scopes/kotlin/name/name.function.scope @@ -0,0 +1,17 @@ +fun bar() {} +--- + +[Content] = +[Removal] = 0:4-0:7 + >---< +0| fun bar() {} + +[Leading delimiter] = 0:3-0:4 + >-< +0| fun bar() {} + +[Domain] = 0:0-0:12 + >------------< +0| fun bar() {} + +[Insertion delimiter] = " " diff --git a/data/fixtures/scopes/kotlin/name/name.interface.scope b/data/fixtures/scopes/kotlin/name/name.interface.scope new file mode 100644 index 0000000000..52074b01f0 --- /dev/null +++ b/data/fixtures/scopes/kotlin/name/name.interface.scope @@ -0,0 +1,24 @@ +interface Foo {} +--- + +[Content] = 0:10-0:13 + >---< +0| interface Foo {} + +[Removal] = 0:10-0:14 + >----< +0| interface Foo {} + +[Leading delimiter] = 0:9-0:10 + >-< +0| interface Foo {} + +[Trailing delimiter] = 0:13-0:14 + >-< +0| interface Foo {} + +[Domain] = 0:0-0:16 + >----------------< +0| interface Foo {} + +[Insertion delimiter] = " " diff --git a/data/fixtures/scopes/kotlin/name/name.iteration.block.scope b/data/fixtures/scopes/kotlin/name/name.iteration.block.scope new file mode 100644 index 0000000000..686814557e --- /dev/null +++ b/data/fixtures/scopes/kotlin/name/name.iteration.block.scope @@ -0,0 +1,27 @@ +class Foo { + fun bar() { } +} +--- + +[#1 Content] = +[#1 Domain] = 0:0-2:1 + >----------- +0| class Foo { +1| fun bar() { } +2| } + -< + + +[#2 Content] = +[#2 Domain] = 0:11-2:0 + > +0| class Foo { +1| fun bar() { } +2| } + < + + +[#3 Content] = +[#3 Domain] = 1:15-1:16 + >-< +1| fun bar() { } diff --git a/data/fixtures/scopes/kotlin/name/name.iteration.block2.scope b/data/fixtures/scopes/kotlin/name/name.iteration.block2.scope new file mode 100644 index 0000000000..6d18e788c8 --- /dev/null +++ b/data/fixtures/scopes/kotlin/name/name.iteration.block2.scope @@ -0,0 +1,13 @@ +fun foo() { } +--- + +[#1 Content] = +[#1 Domain] = 0:0-0:13 + >-------------< +0| fun foo() { } + + +[#2 Content] = +[#2 Domain] = 0:11-0:12 + >-< +0| fun foo() { } diff --git a/data/fixtures/scopes/kotlin/name/name.iteration.block3.scope b/data/fixtures/scopes/kotlin/name/name.iteration.block3.scope new file mode 100644 index 0000000000..a9cb72326e --- /dev/null +++ b/data/fixtures/scopes/kotlin/name/name.iteration.block3.scope @@ -0,0 +1,30 @@ +if (true) { } +else if (false) { } +else { } +--- + +[#1 Content] = +[#1 Domain] = 0:0-2:8 + >------------- +0| if (true) { } +1| else if (false) { } +2| else { } + --------< + + +[#2 Content] = +[#2 Domain] = 0:11-0:12 + >-< +0| if (true) { } + + +[#3 Content] = +[#3 Domain] = 1:17-1:18 + >-< +1| else if (false) { } + + +[#4 Content] = +[#4 Domain] = 2:6-2:7 + >-< +2| else { } diff --git a/data/fixtures/scopes/kotlin/name/name.iteration.block4.scope b/data/fixtures/scopes/kotlin/name/name.iteration.block4.scope new file mode 100644 index 0000000000..ba0f1535af --- /dev/null +++ b/data/fixtures/scopes/kotlin/name/name.iteration.block4.scope @@ -0,0 +1,13 @@ +while (true) { } +--- + +[#1 Content] = +[#1 Domain] = 0:0-0:16 + >----------------< +0| while (true) { } + + +[#2 Content] = +[#2 Domain] = 0:14-0:15 + >-< +0| while (true) { } diff --git a/data/fixtures/scopes/kotlin/name/name.iteration.class.scope b/data/fixtures/scopes/kotlin/name/name.iteration.class.scope new file mode 100644 index 0000000000..a3ec5f3456 --- /dev/null +++ b/data/fixtures/scopes/kotlin/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/kotlin/name/name.iteration.document.scope b/data/fixtures/scopes/kotlin/name/name.iteration.document.scope new file mode 100644 index 0000000000..d737b02c9a --- /dev/null +++ b/data/fixtures/scopes/kotlin/name/name.iteration.document.scope @@ -0,0 +1,12 @@ + +var foo + +--- + +[Content] = +[Domain] = 0:0-2:0 + > +0| +1| var foo +2| + < diff --git a/data/fixtures/scopes/kotlin/name/name.iteration.enum.scope b/data/fixtures/scopes/kotlin/name/name.iteration.enum.scope new file mode 100644 index 0000000000..e94d52284e --- /dev/null +++ b/data/fixtures/scopes/kotlin/name/name.iteration.enum.scope @@ -0,0 +1,13 @@ +enum class Foo { } +--- + +[#1 Content] = +[#1 Domain] = 0:0-0:18 + >------------------< +0| enum class Foo { } + + +[#2 Content] = +[#2 Domain] = 0:16-0:17 + >-< +0| enum class Foo { } diff --git a/data/fixtures/scopes/kotlin/name/name.iteration.interface.scope b/data/fixtures/scopes/kotlin/name/name.iteration.interface.scope new file mode 100644 index 0000000000..4140b6c622 --- /dev/null +++ b/data/fixtures/scopes/kotlin/name/name.iteration.interface.scope @@ -0,0 +1,13 @@ +interface Foo { } +--- + +[#1 Content] = +[#1 Domain] = 0:0-0:17 + >-----------------< +0| interface Foo { } + + +[#2 Content] = +[#2 Domain] = 0:15-0:16 + >-< +0| interface Foo { } diff --git a/data/fixtures/scopes/kotlin/name/name.method.scope b/data/fixtures/scopes/kotlin/name/name.method.scope new file mode 100644 index 0000000000..b0b86dc608 --- /dev/null +++ b/data/fixtures/scopes/kotlin/name/name.method.scope @@ -0,0 +1,45 @@ +class Foo { + fun 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| fun bar() {} +2| } + -< + +[#1 Insertion delimiter] = " " + + +[#2 Content] = +[#2 Removal] = 1:8-1:11 + >---< +1| fun bar() {} + +[#2 Leading delimiter] = 1:7-1:8 + >-< +1| fun bar() {} + +[#2 Domain] = 1:4-1:16 + >------------< +1| fun bar() {} + +[#2 Insertion delimiter] = " " diff --git a/data/fixtures/scopes/kotlin/name/name.variable.pattern.scope b/data/fixtures/scopes/kotlin/name/name.variable.pattern.scope new file mode 100644 index 0000000000..6cc5a568ef --- /dev/null +++ b/data/fixtures/scopes/kotlin/name/name.variable.pattern.scope @@ -0,0 +1,26 @@ +var (foo, bar) = baz +--- + +[#1 Content] = +[#1 Removal] = +[#1 Domain] = 0:5-0:8 + >---< +0| var (foo, bar) = baz + +[#1 Insertion delimiter] = " " + + +[#2 Content] = +[#2 Domain] = 0:10-0:13 + >---< +0| var (foo, bar) = baz + +[#2 Removal] = 0:9-0:13 + >----< +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/kotlin/name/name.variable.pattern2.scope b/data/fixtures/scopes/kotlin/name/name.variable.pattern2.scope new file mode 100644 index 0000000000..d27d8fa212 --- /dev/null +++ b/data/fixtures/scopes/kotlin/name/name.variable.pattern2.scope @@ -0,0 +1,32 @@ +var (foo: Int, bar: Int) = baz +--- + +[#1 Content] = +[#1 Removal] = 0:5-0:8 + >---< +0| var (foo: Int, bar: Int) = baz + +[#1 Domain] = 0:5-0:13 + >--------< +0| var (foo: Int, bar: Int) = baz + +[#1 Insertion delimiter] = " " + + +[#2 Content] = 0:15-0:18 + >---< +0| var (foo: Int, bar: Int) = baz + +[#2 Removal] = 0:14-0:18 + >----< +0| var (foo: Int, bar: Int) = baz + +[#2 Leading delimiter] = 0:14-0:15 + >-< +0| var (foo: Int, bar: Int) = baz + +[#2 Domain] = 0:15-0:23 + >--------< +0| var (foo: Int, bar: Int) = baz + +[#2 Insertion delimiter] = " " diff --git a/data/fixtures/scopes/kotlin/name/name.variable.scope b/data/fixtures/scopes/kotlin/name/name.variable.scope new file mode 100644 index 0000000000..1cd9475d1d --- /dev/null +++ b/data/fixtures/scopes/kotlin/name/name.variable.scope @@ -0,0 +1,24 @@ +var foo = 0 +--- + +[Content] = 0:4-0:7 + >---< +0| var foo = 0 + +[Removal] = 0:4-0:8 + >----< +0| var foo = 0 + +[Leading delimiter] = 0:3-0:4 + >-< +0| var foo = 0 + +[Trailing delimiter] = 0:7-0:8 + >-< +0| var foo = 0 + +[Domain] = 0:0-0:11 + >-----------< +0| var foo = 0 + +[Insertion delimiter] = " " diff --git a/data/fixtures/scopes/kotlin/name/name.variable2.scope b/data/fixtures/scopes/kotlin/name/name.variable2.scope new file mode 100644 index 0000000000..608e22c538 --- /dev/null +++ b/data/fixtures/scopes/kotlin/name/name.variable2.scope @@ -0,0 +1,24 @@ +val foo = 0 +--- + +[Content] = 0:4-0:7 + >---< +0| val foo = 0 + +[Removal] = 0:4-0:8 + >----< +0| val foo = 0 + +[Leading delimiter] = 0:3-0:4 + >-< +0| val foo = 0 + +[Trailing delimiter] = 0:7-0:8 + >-< +0| val foo = 0 + +[Domain] = 0:0-0:11 + >-----------< +0| val foo = 0 + +[Insertion delimiter] = " " diff --git a/data/fixtures/scopes/kotlin/namedFunction/namedFunction.constructor.scope b/data/fixtures/scopes/kotlin/namedFunction/namedFunction.constructor.scope new file mode 100644 index 0000000000..aa1ece2eea --- /dev/null +++ b/data/fixtures/scopes/kotlin/namedFunction/namedFunction.constructor.scope @@ -0,0 +1,21 @@ +class Foo { + constructor() {} +} +--- + +[Content] = +[Domain] = 1:4-1:20 + >----------------< +1| constructor() {} + +[Removal] = 1:0-2:0 + >-------------------- +1| constructor() {} +2| } + < + +[Leading delimiter] = 1:0-1:4 + >----< +1| constructor() {} + +[Insertion delimiter] = "\n\n" diff --git a/data/fixtures/scopes/kotlin/namedFunction/namedFunction.constructor2.scope b/data/fixtures/scopes/kotlin/namedFunction/namedFunction.constructor2.scope new file mode 100644 index 0000000000..765c2daea9 --- /dev/null +++ b/data/fixtures/scopes/kotlin/namedFunction/namedFunction.constructor2.scope @@ -0,0 +1,25 @@ +class Foo { + @bar + constructor() {} +} +--- + +[Content] = +[Domain] = 1:4-2:20 + >---- +1| @bar +2| constructor() {} + --------------------< + +[Removal] = 1:0-3:0 + >-------- +1| @bar +2| constructor() {} +3| } + < + +[Leading delimiter] = 1:0-1:4 + >----< +1| @bar + +[Insertion delimiter] = "\n\n" diff --git a/data/fixtures/scopes/kotlin/namedFunction/namedFunction.iteration.class.scope b/data/fixtures/scopes/kotlin/namedFunction/namedFunction.iteration.class.scope new file mode 100644 index 0000000000..a3ec5f3456 --- /dev/null +++ b/data/fixtures/scopes/kotlin/namedFunction/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/kotlin/namedFunction/namedFunction.iteration.document.scope b/data/fixtures/scopes/kotlin/namedFunction/namedFunction.iteration.document.scope new file mode 100644 index 0000000000..dd50539657 --- /dev/null +++ b/data/fixtures/scopes/kotlin/namedFunction/namedFunction.iteration.document.scope @@ -0,0 +1,12 @@ + +fun foo() {} + +--- + +[Content] = +[Domain] = 0:0-2:0 + > +0| +1| fun foo() {} +2| + < diff --git a/data/fixtures/scopes/kotlin/namedFunction/namedFunction.method.scope b/data/fixtures/scopes/kotlin/namedFunction/namedFunction.method.scope new file mode 100644 index 0000000000..8b9e4f9ee7 --- /dev/null +++ b/data/fixtures/scopes/kotlin/namedFunction/namedFunction.method.scope @@ -0,0 +1,21 @@ +class Foo { + fun bar() {} +} +--- + +[Content] = +[Domain] = 1:4-1:16 + >------------< +1| fun bar() {} + +[Removal] = 1:0-2:0 + >---------------- +1| fun bar() {} +2| } + < + +[Leading delimiter] = 1:0-1:4 + >----< +1| fun bar() {} + +[Insertion delimiter] = "\n\n" diff --git a/data/fixtures/scopes/kotlin/namedFunction/namedFunction.method2.scope b/data/fixtures/scopes/kotlin/namedFunction/namedFunction.method2.scope new file mode 100644 index 0000000000..bf3dc71914 --- /dev/null +++ b/data/fixtures/scopes/kotlin/namedFunction/namedFunction.method2.scope @@ -0,0 +1,25 @@ +class Foo { + @baz + fun bar() {} +} +--- + +[Content] = +[Domain] = 1:4-2:16 + >---- +1| @baz +2| fun bar() {} + ----------------< + +[Removal] = 1:0-3:0 + >-------- +1| @baz +2| fun bar() {} +3| } + < + +[Leading delimiter] = 1:0-1:4 + >----< +1| @baz + +[Insertion delimiter] = "\n\n" diff --git a/data/fixtures/scopes/kotlin/namedFunction/namedFunction.method3.scope b/data/fixtures/scopes/kotlin/namedFunction/namedFunction.method3.scope new file mode 100644 index 0000000000..141dece681 --- /dev/null +++ b/data/fixtures/scopes/kotlin/namedFunction/namedFunction.method3.scope @@ -0,0 +1,21 @@ +class Foo { + get(): Int {} +} +--- + +[Content] = +[Domain] = 1:4-1:17 + >-------------< +1| get(): Int {} + +[Removal] = 1:0-2:0 + >----------------- +1| get(): Int {} +2| } + < + +[Leading delimiter] = 1:0-1:4 + >----< +1| get(): Int {} + +[Insertion delimiter] = "\n\n" diff --git a/data/fixtures/scopes/kotlin/namedFunction/namedFunction.method4.scope b/data/fixtures/scopes/kotlin/namedFunction/namedFunction.method4.scope new file mode 100644 index 0000000000..c36c0647b3 --- /dev/null +++ b/data/fixtures/scopes/kotlin/namedFunction/namedFunction.method4.scope @@ -0,0 +1,21 @@ +class Foo { + set(aaa: Int) {} +} +--- + +[Content] = +[Domain] = 1:4-1:20 + >----------------< +1| set(aaa: Int) {} + +[Removal] = 1:0-2:0 + >-------------------- +1| set(aaa: Int) {} +2| } + < + +[Leading delimiter] = 1:0-1:4 + >----< +1| set(aaa: Int) {} + +[Insertion delimiter] = "\n\n" diff --git a/data/fixtures/scopes/kotlin/namedFunction/namedFunction.scope b/data/fixtures/scopes/kotlin/namedFunction/namedFunction.scope new file mode 100644 index 0000000000..9f94e3d20b --- /dev/null +++ b/data/fixtures/scopes/kotlin/namedFunction/namedFunction.scope @@ -0,0 +1,10 @@ +fun bar() {} +--- + +[Content] = +[Removal] = +[Domain] = 0:0-0:12 + >------------< +0| fun bar() {} + +[Insertion delimiter] = "\n\n" diff --git a/data/fixtures/scopes/kotlin/namedFunction/namedFunction2.scope b/data/fixtures/scopes/kotlin/namedFunction/namedFunction2.scope new file mode 100644 index 0000000000..7dfff22a50 --- /dev/null +++ b/data/fixtures/scopes/kotlin/namedFunction/namedFunction2.scope @@ -0,0 +1,13 @@ +@baz +fun bar() {} +--- + +[Content] = +[Removal] = +[Domain] = 0:0-1:12 + >---- +0| @baz +1| fun bar() {} + ------------< + +[Insertion delimiter] = "\n\n" diff --git a/data/fixtures/scopes/kotlin/statement/statement.assignment.scope b/data/fixtures/scopes/kotlin/statement/statement.assignment.scope new file mode 100644 index 0000000000..acdb2b1498 --- /dev/null +++ b/data/fixtures/scopes/kotlin/statement/statement.assignment.scope @@ -0,0 +1,10 @@ +foo = 0 +--- + +[Content] = +[Removal] = +[Domain] = 0:0-0:7 + >-------< +0| foo = 0 + +[Insertion delimiter] = "\n" diff --git a/data/fixtures/scopes/kotlin/statement/statement.break.scope b/data/fixtures/scopes/kotlin/statement/statement.break.scope new file mode 100644 index 0000000000..22c1cfd287 --- /dev/null +++ b/data/fixtures/scopes/kotlin/statement/statement.break.scope @@ -0,0 +1,33 @@ +while (true) { + break +} +--- + +[#1 Content] = +[#1 Removal] = +[#1 Domain] = 0:0-2:1 + >-------------- +0| while (true) { +1| break +2| } + -< + +[#1 Insertion delimiter] = "\n" + + +[#2 Content] = +[#2 Domain] = 1:4-1:9 + >-----< +1| break + +[#2 Removal] = 1:0-2:0 + >--------- +1| break +2| } + < + +[#2 Leading delimiter] = 1:0-1:4 + >----< +1| break + +[#2 Insertion delimiter] = "\n" diff --git a/data/fixtures/scopes/kotlin/statement/statement.class.scope b/data/fixtures/scopes/kotlin/statement/statement.class.scope new file mode 100644 index 0000000000..a6008d311f --- /dev/null +++ b/data/fixtures/scopes/kotlin/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/kotlin/statement/statement.class2.scope b/data/fixtures/scopes/kotlin/statement/statement.class2.scope new file mode 100644 index 0000000000..987f60709b --- /dev/null +++ b/data/fixtures/scopes/kotlin/statement/statement.class2.scope @@ -0,0 +1,10 @@ +object Foo {} +--- + +[Content] = +[Removal] = +[Domain] = 0:0-0:13 + >-------------< +0| object Foo {} + +[Insertion delimiter] = "\n" diff --git a/data/fixtures/scopes/kotlin/statement/statement.class3.scope b/data/fixtures/scopes/kotlin/statement/statement.class3.scope new file mode 100644 index 0000000000..81d99eb207 --- /dev/null +++ b/data/fixtures/scopes/kotlin/statement/statement.class3.scope @@ -0,0 +1,33 @@ +class Foo { + companion object Bar {} +} +--- + +[#1 Content] = +[#1 Removal] = +[#1 Domain] = 0:0-2:1 + >----------- +0| class Foo { +1| companion object Bar {} +2| } + -< + +[#1 Insertion delimiter] = "\n" + + +[#2 Content] = +[#2 Domain] = 1:4-1:27 + >-----------------------< +1| companion object Bar {} + +[#2 Removal] = 1:0-2:0 + >--------------------------- +1| companion object Bar {} +2| } + < + +[#2 Leading delimiter] = 1:0-1:4 + >----< +1| companion object Bar {} + +[#2 Insertion delimiter] = "\n" diff --git a/data/fixtures/scopes/kotlin/statement/statement.constructor.scope b/data/fixtures/scopes/kotlin/statement/statement.constructor.scope new file mode 100644 index 0000000000..15212a3a3e --- /dev/null +++ b/data/fixtures/scopes/kotlin/statement/statement.constructor.scope @@ -0,0 +1,33 @@ +class Foo { + constructor() {} +} +--- + +[#1 Content] = +[#1 Removal] = +[#1 Domain] = 0:0-2:1 + >----------- +0| class Foo { +1| constructor() {} +2| } + -< + +[#1 Insertion delimiter] = "\n" + + +[#2 Content] = +[#2 Domain] = 1:4-1:20 + >----------------< +1| constructor() {} + +[#2 Removal] = 1:0-2:0 + >-------------------- +1| constructor() {} +2| } + < + +[#2 Leading delimiter] = 1:0-1:4 + >----< +1| constructor() {} + +[#2 Insertion delimiter] = "\n" diff --git a/data/fixtures/scopes/kotlin/statement/statement.constructor2.scope b/data/fixtures/scopes/kotlin/statement/statement.constructor2.scope new file mode 100644 index 0000000000..e6e1ac1444 --- /dev/null +++ b/data/fixtures/scopes/kotlin/statement/statement.constructor2.scope @@ -0,0 +1,38 @@ +class Foo { + @bar + constructor() {} +} +--- + +[#1 Content] = +[#1 Removal] = +[#1 Domain] = 0:0-3:1 + >----------- +0| class Foo { +1| @bar +2| constructor() {} +3| } + -< + +[#1 Insertion delimiter] = "\n" + + +[#2 Content] = +[#2 Domain] = 1:4-2:20 + >---- +1| @bar +2| constructor() {} + --------------------< + +[#2 Removal] = 1:0-3:0 + >-------- +1| @bar +2| constructor() {} +3| } + < + +[#2 Leading delimiter] = 1:0-1:4 + >----< +1| @bar + +[#2 Insertion delimiter] = "\n" diff --git a/data/fixtures/scopes/kotlin/statement/statement.continue.scope b/data/fixtures/scopes/kotlin/statement/statement.continue.scope new file mode 100644 index 0000000000..61621d39db --- /dev/null +++ b/data/fixtures/scopes/kotlin/statement/statement.continue.scope @@ -0,0 +1,33 @@ +while (true) { + continue +} +--- + +[#1 Content] = +[#1 Removal] = +[#1 Domain] = 0:0-2:1 + >-------------- +0| while (true) { +1| continue +2| } + -< + +[#1 Insertion delimiter] = "\n" + + +[#2 Content] = +[#2 Domain] = 1:4-1:12 + >--------< +1| continue + +[#2 Removal] = 1:0-2:0 + >------------ +1| continue +2| } + < + +[#2 Leading delimiter] = 1:0-1:4 + >----< +1| continue + +[#2 Insertion delimiter] = "\n" diff --git a/data/fixtures/scopes/kotlin/statement/statement.doWhile.scope b/data/fixtures/scopes/kotlin/statement/statement.doWhile.scope new file mode 100644 index 0000000000..74d5b94183 --- /dev/null +++ b/data/fixtures/scopes/kotlin/statement/statement.doWhile.scope @@ -0,0 +1,10 @@ +do {} while (true) +--- + +[Content] = +[Removal] = +[Domain] = 0:0-0:18 + >------------------< +0| do {} while (true) + +[Insertion delimiter] = "\n" diff --git a/data/fixtures/scopes/kotlin/statement/statement.enum.scope b/data/fixtures/scopes/kotlin/statement/statement.enum.scope new file mode 100644 index 0000000000..f07ca5fc76 --- /dev/null +++ b/data/fixtures/scopes/kotlin/statement/statement.enum.scope @@ -0,0 +1,10 @@ +enum class Foo {} +--- + +[Content] = +[Removal] = +[Domain] = 0:0-0:17 + >-----------------< +0| enum class Foo {} + +[Insertion delimiter] = "\n" diff --git a/data/fixtures/scopes/kotlin/statement/statement.field.class.scope b/data/fixtures/scopes/kotlin/statement/statement.field.class.scope new file mode 100644 index 0000000000..429629e4b9 --- /dev/null +++ b/data/fixtures/scopes/kotlin/statement/statement.field.class.scope @@ -0,0 +1,73 @@ +class Foo { + var bar: Int = 0 + val baz = 0 + val bongo: Int +} +--- + +[#1 Content] = +[#1 Removal] = +[#1 Domain] = 0:0-4:1 + >----------- +0| class Foo { +1| var bar: Int = 0 +2| val baz = 0 +3| val bongo: Int +4| } + -< + +[#1 Insertion delimiter] = "\n" + + +[#2 Content] = +[#2 Domain] = 1:4-1:20 + >----------------< +1| var bar: Int = 0 + +[#2 Removal] = 1:0-2:0 + >-------------------- +1| var bar: Int = 0 +2| val baz = 0 + < + +[#2 Leading delimiter] = 1:0-1:4 + >----< +1| var bar: Int = 0 + +[#2 Insertion delimiter] = "\n" + + +[#3 Content] = +[#3 Domain] = 2:4-2:15 + >-----------< +2| val baz = 0 + +[#3 Removal] = 2:0-3:0 + >--------------- +2| val baz = 0 +3| val bongo: Int + < + +[#3 Leading delimiter] = 2:0-2:4 + >----< +2| val baz = 0 + +[#3 Insertion delimiter] = "\n" + + +[#4 Content] = +[#4 Domain] = 3:4-3:18 + >--------------< +3| val bongo: Int + +[#4 Removal] = 3:0-4:0 + >------------------ +3| val bongo: Int +4| } + < + +[#4 Leading delimiter] = 3:0-3:4 + >----< +3| val bongo: Int + +[#4 Insertion delimiter] = "\n" diff --git a/data/fixtures/scopes/kotlin/statement/statement.field.interface.scope b/data/fixtures/scopes/kotlin/statement/statement.field.interface.scope new file mode 100644 index 0000000000..e0d9c16e35 --- /dev/null +++ b/data/fixtures/scopes/kotlin/statement/statement.field.interface.scope @@ -0,0 +1,33 @@ +interface Foo { + val bar: Int +} +--- + +[#1 Content] = +[#1 Removal] = +[#1 Domain] = 0:0-2:1 + >--------------- +0| interface Foo { +1| val bar: Int +2| } + -< + +[#1 Insertion delimiter] = "\n" + + +[#2 Content] = +[#2 Domain] = 1:4-1:16 + >------------< +1| val bar: Int + +[#2 Removal] = 1:0-2:0 + >---------------- +1| val bar: Int +2| } + < + +[#2 Leading delimiter] = 1:0-1:4 + >----< +1| val bar: Int + +[#2 Insertion delimiter] = "\n" diff --git a/data/fixtures/scopes/kotlin/statement/statement.foreach.scope b/data/fixtures/scopes/kotlin/statement/statement.foreach.scope new file mode 100644 index 0000000000..8b146d89ba --- /dev/null +++ b/data/fixtures/scopes/kotlin/statement/statement.foreach.scope @@ -0,0 +1,10 @@ +for (v in values) {} +--- + +[Content] = +[Removal] = +[Domain] = 0:0-0:20 + >--------------------< +0| for (v in values) {} + +[Insertion delimiter] = "\n" diff --git a/data/fixtures/scopes/kotlin/statement/statement.function.scope b/data/fixtures/scopes/kotlin/statement/statement.function.scope new file mode 100644 index 0000000000..2026908f66 --- /dev/null +++ b/data/fixtures/scopes/kotlin/statement/statement.function.scope @@ -0,0 +1,10 @@ +fun foo() {} +--- + +[Content] = +[Removal] = +[Domain] = 0:0-0:12 + >------------< +0| fun foo() {} + +[Insertion delimiter] = "\n" diff --git a/data/fixtures/scopes/kotlin/statement/statement.if.scope b/data/fixtures/scopes/kotlin/statement/statement.if.scope new file mode 100644 index 0000000000..14f2507621 --- /dev/null +++ b/data/fixtures/scopes/kotlin/statement/statement.if.scope @@ -0,0 +1,15 @@ +if (true) {} +else if (false) {} +else {} +--- + +[Content] = +[Removal] = +[Domain] = 0:0-2:7 + >------------ +0| if (true) {} +1| else if (false) {} +2| else {} + -------< + +[Insertion delimiter] = "\n" diff --git a/data/fixtures/scopes/kotlin/statement/statement.interface.scope b/data/fixtures/scopes/kotlin/statement/statement.interface.scope new file mode 100644 index 0000000000..f114e8b3c6 --- /dev/null +++ b/data/fixtures/scopes/kotlin/statement/statement.interface.scope @@ -0,0 +1,10 @@ +interface Foo {} +--- + +[Content] = +[Removal] = +[Domain] = 0:0-0:16 + >----------------< +0| interface Foo {} + +[Insertion delimiter] = "\n" diff --git a/data/fixtures/scopes/kotlin/statement/statement.iteration.block.scope b/data/fixtures/scopes/kotlin/statement/statement.iteration.block.scope new file mode 100644 index 0000000000..686814557e --- /dev/null +++ b/data/fixtures/scopes/kotlin/statement/statement.iteration.block.scope @@ -0,0 +1,27 @@ +class Foo { + fun bar() { } +} +--- + +[#1 Content] = +[#1 Domain] = 0:0-2:1 + >----------- +0| class Foo { +1| fun bar() { } +2| } + -< + + +[#2 Content] = +[#2 Domain] = 0:11-2:0 + > +0| class Foo { +1| fun bar() { } +2| } + < + + +[#3 Content] = +[#3 Domain] = 1:15-1:16 + >-< +1| fun bar() { } diff --git a/data/fixtures/scopes/kotlin/statement/statement.iteration.block2.scope b/data/fixtures/scopes/kotlin/statement/statement.iteration.block2.scope new file mode 100644 index 0000000000..6d18e788c8 --- /dev/null +++ b/data/fixtures/scopes/kotlin/statement/statement.iteration.block2.scope @@ -0,0 +1,13 @@ +fun foo() { } +--- + +[#1 Content] = +[#1 Domain] = 0:0-0:13 + >-------------< +0| fun foo() { } + + +[#2 Content] = +[#2 Domain] = 0:11-0:12 + >-< +0| fun foo() { } diff --git a/data/fixtures/scopes/kotlin/statement/statement.iteration.block3.scope b/data/fixtures/scopes/kotlin/statement/statement.iteration.block3.scope new file mode 100644 index 0000000000..a9cb72326e --- /dev/null +++ b/data/fixtures/scopes/kotlin/statement/statement.iteration.block3.scope @@ -0,0 +1,30 @@ +if (true) { } +else if (false) { } +else { } +--- + +[#1 Content] = +[#1 Domain] = 0:0-2:8 + >------------- +0| if (true) { } +1| else if (false) { } +2| else { } + --------< + + +[#2 Content] = +[#2 Domain] = 0:11-0:12 + >-< +0| if (true) { } + + +[#3 Content] = +[#3 Domain] = 1:17-1:18 + >-< +1| else if (false) { } + + +[#4 Content] = +[#4 Domain] = 2:6-2:7 + >-< +2| else { } diff --git a/data/fixtures/scopes/kotlin/statement/statement.iteration.block4.scope b/data/fixtures/scopes/kotlin/statement/statement.iteration.block4.scope new file mode 100644 index 0000000000..ba0f1535af --- /dev/null +++ b/data/fixtures/scopes/kotlin/statement/statement.iteration.block4.scope @@ -0,0 +1,13 @@ +while (true) { } +--- + +[#1 Content] = +[#1 Domain] = 0:0-0:16 + >----------------< +0| while (true) { } + + +[#2 Content] = +[#2 Domain] = 0:14-0:15 + >-< +0| while (true) { } diff --git a/data/fixtures/scopes/kotlin/statement/statement.iteration.class.scope b/data/fixtures/scopes/kotlin/statement/statement.iteration.class.scope new file mode 100644 index 0000000000..a3ec5f3456 --- /dev/null +++ b/data/fixtures/scopes/kotlin/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/kotlin/statement/statement.iteration.document.scope b/data/fixtures/scopes/kotlin/statement/statement.iteration.document.scope new file mode 100644 index 0000000000..d737b02c9a --- /dev/null +++ b/data/fixtures/scopes/kotlin/statement/statement.iteration.document.scope @@ -0,0 +1,12 @@ + +var foo + +--- + +[Content] = +[Domain] = 0:0-2:0 + > +0| +1| var foo +2| + < diff --git a/data/fixtures/scopes/kotlin/statement/statement.iteration.interface.scope b/data/fixtures/scopes/kotlin/statement/statement.iteration.interface.scope new file mode 100644 index 0000000000..4140b6c622 --- /dev/null +++ b/data/fixtures/scopes/kotlin/statement/statement.iteration.interface.scope @@ -0,0 +1,13 @@ +interface Foo { } +--- + +[#1 Content] = +[#1 Domain] = 0:0-0:17 + >-----------------< +0| interface Foo { } + + +[#2 Content] = +[#2 Domain] = 0:15-0:16 + >-< +0| interface Foo { } diff --git a/data/fixtures/scopes/kotlin/statement/statement.method.scope b/data/fixtures/scopes/kotlin/statement/statement.method.scope new file mode 100644 index 0000000000..93f5951e2d --- /dev/null +++ b/data/fixtures/scopes/kotlin/statement/statement.method.scope @@ -0,0 +1,33 @@ +class Foo { + fun bar() {} +} +--- + +[#1 Content] = +[#1 Removal] = +[#1 Domain] = 0:0-2:1 + >----------- +0| class Foo { +1| fun bar() {} +2| } + -< + +[#1 Insertion delimiter] = "\n" + + +[#2 Content] = +[#2 Domain] = 1:4-1:16 + >------------< +1| fun bar() {} + +[#2 Removal] = 1:0-2:0 + >---------------- +1| fun bar() {} +2| } + < + +[#2 Leading delimiter] = 1:0-1:4 + >----< +1| fun bar() {} + +[#2 Insertion delimiter] = "\n" diff --git a/data/fixtures/scopes/kotlin/statement/statement.method2.scope b/data/fixtures/scopes/kotlin/statement/statement.method2.scope new file mode 100644 index 0000000000..d065bdf278 --- /dev/null +++ b/data/fixtures/scopes/kotlin/statement/statement.method2.scope @@ -0,0 +1,38 @@ +class Foo { + @baz + fun bar() {} +} +--- + +[#1 Content] = +[#1 Removal] = +[#1 Domain] = 0:0-3:1 + >----------- +0| class Foo { +1| @baz +2| fun bar() {} +3| } + -< + +[#1 Insertion delimiter] = "\n" + + +[#2 Content] = +[#2 Domain] = 1:4-2:16 + >---- +1| @baz +2| fun bar() {} + ----------------< + +[#2 Removal] = 1:0-3:0 + >-------- +1| @baz +2| fun bar() {} +3| } + < + +[#2 Leading delimiter] = 1:0-1:4 + >----< +1| @baz + +[#2 Insertion delimiter] = "\n" diff --git a/data/fixtures/scopes/kotlin/statement/statement.method3.scope b/data/fixtures/scopes/kotlin/statement/statement.method3.scope new file mode 100644 index 0000000000..c042339641 --- /dev/null +++ b/data/fixtures/scopes/kotlin/statement/statement.method3.scope @@ -0,0 +1,33 @@ +class Foo { + get(): Int {} +} +--- + +[#1 Content] = +[#1 Removal] = +[#1 Domain] = 0:0-2:1 + >----------- +0| class Foo { +1| get(): Int {} +2| } + -< + +[#1 Insertion delimiter] = "\n" + + +[#2 Content] = +[#2 Domain] = 1:4-1:17 + >-------------< +1| get(): Int {} + +[#2 Removal] = 1:0-2:0 + >----------------- +1| get(): Int {} +2| } + < + +[#2 Leading delimiter] = 1:0-1:4 + >----< +1| get(): Int {} + +[#2 Insertion delimiter] = "\n" diff --git a/data/fixtures/scopes/kotlin/statement/statement.method4.scope b/data/fixtures/scopes/kotlin/statement/statement.method4.scope new file mode 100644 index 0000000000..f10831488f --- /dev/null +++ b/data/fixtures/scopes/kotlin/statement/statement.method4.scope @@ -0,0 +1,33 @@ +class Foo { + set(aaa: Int) {} +} +--- + +[#1 Content] = +[#1 Removal] = +[#1 Domain] = 0:0-2:1 + >----------- +0| class Foo { +1| set(aaa: Int) {} +2| } + -< + +[#1 Insertion delimiter] = "\n" + + +[#2 Content] = +[#2 Domain] = 1:4-1:20 + >----------------< +1| set(aaa: Int) {} + +[#2 Removal] = 1:0-2:0 + >-------------------- +1| set(aaa: Int) {} +2| } + < + +[#2 Leading delimiter] = 1:0-1:4 + >----< +1| set(aaa: Int) {} + +[#2 Insertion delimiter] = "\n" diff --git a/data/fixtures/scopes/kotlin/statement/statement.return.scope b/data/fixtures/scopes/kotlin/statement/statement.return.scope new file mode 100644 index 0000000000..1acf5073fd --- /dev/null +++ b/data/fixtures/scopes/kotlin/statement/statement.return.scope @@ -0,0 +1,33 @@ +fun bar() { + return 0 +} +--- + +[#1 Content] = +[#1 Removal] = +[#1 Domain] = 0:0-2:1 + >----------- +0| fun bar() { +1| return 0 +2| } + -< + +[#1 Insertion delimiter] = "\n" + + +[#2 Content] = +[#2 Domain] = 1:4-1:12 + >--------< +1| return 0 + +[#2 Removal] = 1:0-2:0 + >------------ +1| return 0 +2| } + < + +[#2 Leading delimiter] = 1:0-1:4 + >----< +1| return 0 + +[#2 Insertion delimiter] = "\n" diff --git a/data/fixtures/scopes/kotlin/statement/statement.static.scope b/data/fixtures/scopes/kotlin/statement/statement.static.scope new file mode 100644 index 0000000000..aa72d276ba --- /dev/null +++ b/data/fixtures/scopes/kotlin/statement/statement.static.scope @@ -0,0 +1,33 @@ +class Foo { + init {} +} +--- + +[#1 Content] = +[#1 Removal] = +[#1 Domain] = 0:0-2:1 + >----------- +0| class Foo { +1| init {} +2| } + -< + +[#1 Insertion delimiter] = "\n" + + +[#2 Content] = +[#2 Domain] = 1:4-1:11 + >-------< +1| init {} + +[#2 Removal] = 1:0-2:0 + >----------- +1| init {} +2| } + < + +[#2 Leading delimiter] = 1:0-1:4 + >----< +1| init {} + +[#2 Insertion delimiter] = "\n" diff --git a/data/fixtures/scopes/kotlin/statement/statement.switch.scope b/data/fixtures/scopes/kotlin/statement/statement.switch.scope new file mode 100644 index 0000000000..1a66ac2f04 --- /dev/null +++ b/data/fixtures/scopes/kotlin/statement/statement.switch.scope @@ -0,0 +1,10 @@ +when (foo) {} +--- + +[Content] = +[Removal] = +[Domain] = 0:0-0:13 + >-------------< +0| when (foo) {} + +[Insertion delimiter] = "\n" diff --git a/data/fixtures/scopes/kotlin/statement/statement.try.scope b/data/fixtures/scopes/kotlin/statement/statement.try.scope new file mode 100644 index 0000000000..b304252c85 --- /dev/null +++ b/data/fixtures/scopes/kotlin/statement/statement.try.scope @@ -0,0 +1,17 @@ +try { +} catch (ex: Exception) { +} finally { +} +--- + +[Content] = +[Removal] = +[Domain] = 0:0-3:1 + >----- +0| try { +1| } catch (ex: Exception) { +2| } finally { +3| } + -< + +[Insertion delimiter] = "\n" diff --git a/data/fixtures/scopes/kotlin/statement/statement.variable.scope b/data/fixtures/scopes/kotlin/statement/statement.variable.scope new file mode 100644 index 0000000000..0c4f8800bd --- /dev/null +++ b/data/fixtures/scopes/kotlin/statement/statement.variable.scope @@ -0,0 +1,10 @@ +var foo: Int +--- + +[Content] = +[Removal] = +[Domain] = 0:0-0:12 + >------------< +0| var foo: Int + +[Insertion delimiter] = "\n" diff --git a/data/fixtures/scopes/kotlin/statement/statement.variable2.scope b/data/fixtures/scopes/kotlin/statement/statement.variable2.scope new file mode 100644 index 0000000000..a69afa0fed --- /dev/null +++ b/data/fixtures/scopes/kotlin/statement/statement.variable2.scope @@ -0,0 +1,10 @@ +val foo: Int +--- + +[Content] = +[Removal] = +[Domain] = 0:0-0:12 + >------------< +0| val foo: Int + +[Insertion delimiter] = "\n" diff --git a/data/fixtures/scopes/kotlin/statement/statement.variable3.scope b/data/fixtures/scopes/kotlin/statement/statement.variable3.scope new file mode 100644 index 0000000000..4934548475 --- /dev/null +++ b/data/fixtures/scopes/kotlin/statement/statement.variable3.scope @@ -0,0 +1,10 @@ +var foo = 0 +--- + +[Content] = +[Removal] = +[Domain] = 0:0-0:11 + >-----------< +0| var foo = 0 + +[Insertion delimiter] = "\n" diff --git a/data/fixtures/scopes/kotlin/statement/statement.variable4.scope b/data/fixtures/scopes/kotlin/statement/statement.variable4.scope new file mode 100644 index 0000000000..3e53923b5e --- /dev/null +++ b/data/fixtures/scopes/kotlin/statement/statement.variable4.scope @@ -0,0 +1,10 @@ +val foo = 0 +--- + +[Content] = +[Removal] = +[Domain] = 0:0-0:11 + >-----------< +0| val foo = 0 + +[Insertion delimiter] = "\n" diff --git a/data/fixtures/scopes/kotlin/statement/statement.while.scope b/data/fixtures/scopes/kotlin/statement/statement.while.scope new file mode 100644 index 0000000000..5aaf57be8f --- /dev/null +++ b/data/fixtures/scopes/kotlin/statement/statement.while.scope @@ -0,0 +1,10 @@ +while (true) {} +--- + +[Content] = +[Removal] = +[Domain] = 0:0-0:15 + >---------------< +0| while (true) {} + +[Insertion delimiter] = "\n" diff --git a/data/fixtures/scopes/kotlin/string.multiLine.scope b/data/fixtures/scopes/kotlin/string.multiLine.scope new file mode 100644 index 0000000000..80dbca0966 --- /dev/null +++ b/data/fixtures/scopes/kotlin/string.multiLine.scope @@ -0,0 +1,13 @@ +"""Hello +world""" +--- + +[Content] = +[Removal] = +[Domain] = 0:0-1:8 + >-------- +0| """Hello +1| world""" + --------< + +[Insertion delimiter] = " " diff --git a/data/fixtures/scopes/kotlin/string.singleLine.scope b/data/fixtures/scopes/kotlin/string.singleLine.scope new file mode 100644 index 0000000000..4b26cf31b3 --- /dev/null +++ b/data/fixtures/scopes/kotlin/string.singleLine.scope @@ -0,0 +1,10 @@ +"Hello world" +--- + +[Content] = +[Removal] = +[Domain] = 0:0-0:13 + >-------------< +0| "Hello world" + +[Insertion delimiter] = " " diff --git a/data/fixtures/scopes/kotlin/textFragment.comment.block.scope b/data/fixtures/scopes/kotlin/textFragment.comment.block.scope new file mode 100644 index 0000000000..af33f95d00 --- /dev/null +++ b/data/fixtures/scopes/kotlin/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/kotlin/textFragment.comment.block2.scope b/data/fixtures/scopes/kotlin/textFragment.comment.block2.scope new file mode 100644 index 0000000000..396e9267dc --- /dev/null +++ b/data/fixtures/scopes/kotlin/textFragment.comment.block2.scope @@ -0,0 +1,10 @@ +/** Hello world */ +--- + +[Content] = +[Removal] = +[Domain] = 0:0-0:18 + >------------------< +0| /** Hello world */ + +[Insertion delimiter] = " " diff --git a/data/fixtures/scopes/kotlin/textFragment.comment.line.scope b/data/fixtures/scopes/kotlin/textFragment.comment.line.scope new file mode 100644 index 0000000000..6758f81490 --- /dev/null +++ b/data/fixtures/scopes/kotlin/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/kotlin/textFragment.string.multiLine.scope b/data/fixtures/scopes/kotlin/textFragment.string.multiLine.scope new file mode 100644 index 0000000000..32632a1b32 --- /dev/null +++ b/data/fixtures/scopes/kotlin/textFragment.string.multiLine.scope @@ -0,0 +1,13 @@ +"""Hello +world""" +--- + +[Content] = +[Removal] = +[Domain] = 0:3-1:5 + >----- +0| """Hello +1| world""" + -----< + +[Insertion delimiter] = " " diff --git a/data/fixtures/scopes/kotlin/textFragment.string.singleLine.scope b/data/fixtures/scopes/kotlin/textFragment.string.singleLine.scope new file mode 100644 index 0000000000..85dcf5fa7f --- /dev/null +++ b/data/fixtures/scopes/kotlin/textFragment.string.singleLine.scope @@ -0,0 +1,10 @@ +"Hello world" +--- + +[Content] = +[Removal] = +[Domain] = 0:1-0:12 + >-----------< +0| "Hello world" + +[Insertion delimiter] = " " diff --git a/data/fixtures/scopes/kotlin/type/type.alias.scope b/data/fixtures/scopes/kotlin/type/type.alias.scope new file mode 100644 index 0000000000..19275a0f96 --- /dev/null +++ b/data/fixtures/scopes/kotlin/type/type.alias.scope @@ -0,0 +1,10 @@ +typealias Foo = Bar +--- + +[Content] = +[Removal] = +[Domain] = 0:0-0:19 + >-------------------< +0| typealias Foo = Bar + +[Insertion delimiter] = " " diff --git a/data/fixtures/scopes/kotlin/type/type.argument.catch.scope b/data/fixtures/scopes/kotlin/type/type.argument.catch.scope new file mode 100644 index 0000000000..b24ad6a789 --- /dev/null +++ b/data/fixtures/scopes/kotlin/type/type.argument.catch.scope @@ -0,0 +1,42 @@ +try { +} catch (e: MyException) { +} catch (e: Exception) { +} +--- + +[#1 Content] = 1:12-1:23 + >-----------< +1| } catch (e: MyException) { + +[#1 Removal] = 1:10-1:23 + >-------------< +1| } catch (e: MyException) { + +[#1 Leading delimiter] = 1:10-1:12 + >--< +1| } catch (e: MyException) { + +[#1 Domain] = 1:9-1:23 + >--------------< +1| } catch (e: MyException) { + +[#1 Insertion delimiter] = " " + + +[#2 Content] = 2:12-2:21 + >---------< +2| } catch (e: Exception) { + +[#2 Removal] = 2:10-2:21 + >-----------< +2| } catch (e: Exception) { + +[#2 Leading delimiter] = 2:10-2:12 + >--< +2| } catch (e: Exception) { + +[#2 Domain] = 2:9-2:21 + >------------< +2| } catch (e: Exception) { + +[#2 Insertion delimiter] = " " diff --git a/data/fixtures/scopes/kotlin/type/type.argument.formal.constructor.iteration.scope b/data/fixtures/scopes/kotlin/type/type.argument.formal.constructor.iteration.scope new file mode 100644 index 0000000000..d58138ab5c --- /dev/null +++ b/data/fixtures/scopes/kotlin/type/type.argument.formal.constructor.iteration.scope @@ -0,0 +1,27 @@ +class Foo { + constructor(aaa: Int, bbb: Int) {} +} +--- + +[#1 Content] = +[#1 Domain] = 0:0-2:1 + >----------- +0| class Foo { +1| constructor(aaa: Int, bbb: Int) {} +2| } + -< + + +[#2 Content] = +[#2 Domain] = 0:11-2:0 + > +0| class Foo { +1| constructor(aaa: Int, bbb: Int) {} +2| } + < + + +[#3 Content] = +[#3 Domain] = 1:16-1:34 + >------------------< +1| constructor(aaa: Int, bbb: Int) {} diff --git a/data/fixtures/scopes/kotlin/type/type.argument.formal.constructor.iteration2.scope b/data/fixtures/scopes/kotlin/type/type.argument.formal.constructor.iteration2.scope new file mode 100644 index 0000000000..44868ed858 --- /dev/null +++ b/data/fixtures/scopes/kotlin/type/type.argument.formal.constructor.iteration2.scope @@ -0,0 +1,13 @@ +class Foo(aaa: Int, bbb: Int) {} +--- + +[#1 Content] = +[#1 Domain] = 0:0-0:32 + >--------------------------------< +0| class Foo(aaa: Int, bbb: Int) {} + + +[#2 Content] = +[#2 Domain] = 0:10-0:28 + >------------------< +0| class Foo(aaa: Int, bbb: Int) {} diff --git a/data/fixtures/scopes/kotlin/type/type.argument.formal.constructor.scope b/data/fixtures/scopes/kotlin/type/type.argument.formal.constructor.scope new file mode 100644 index 0000000000..a0ae059943 --- /dev/null +++ b/data/fixtures/scopes/kotlin/type/type.argument.formal.constructor.scope @@ -0,0 +1,91 @@ +class Foo { + constructor(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} +} +--- + +[#1 Content] = +[#1 Removal] = +[#1 Domain] = 0:0-2:1 + >----------- +0| class Foo { +1| constructor(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} +2| } + -< + +[#1 Insertion delimiter] = " " + + +[#2 Content] = 1:21-1:24 + >---< +1| constructor(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#2 Removal] = 1:19-1:24 + >-----< +1| constructor(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#2 Leading delimiter] = 1:19-1:21 + >--< +1| constructor(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#2 Domain] = 1:16-1:24 + >--------< +1| constructor(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#2 Insertion delimiter] = " " + + +[#3 Content] = 1:38-1:41 + >---< +1| constructor(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#3 Removal] = 1:36-1:41 + >-----< +1| constructor(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#3 Leading delimiter] = 1:36-1:38 + >--< +1| constructor(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#3 Domain] = 1:26-1:41 + >---------------< +1| constructor(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#3 Insertion delimiter] = " " + + +[#4 Content] = 1:48-1:51 + >---< +1| constructor(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#4 Removal] = 1:46-1:51 + >-----< +1| constructor(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#4 Leading delimiter] = 1:46-1:48 + >--< +1| constructor(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#4 Domain] = 1:43-1:55 + >------------< +1| constructor(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#4 Insertion delimiter] = " " + + +[#5 Content] = 1:69-1:72 + >---< +1| constructor(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#5 Removal] = 1:67-1:72 + >-----< +1| constructor(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#5 Leading delimiter] = 1:67-1:69 + >--< +1| constructor(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#5 Domain] = 1:57-1:76 + >-------------------< +1| constructor(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#5 Insertion delimiter] = " " diff --git a/data/fixtures/scopes/kotlin/type/type.argument.formal.constructor2.scope b/data/fixtures/scopes/kotlin/type/type.argument.formal.constructor2.scope new file mode 100644 index 0000000000..b104dc6c65 --- /dev/null +++ b/data/fixtures/scopes/kotlin/type/type.argument.formal.constructor2.scope @@ -0,0 +1,86 @@ +class Foo(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} +--- + +[#1 Content] = +[#1 Removal] = +[#1 Domain] = 0:0-0:74 + >--------------------------------------------------------------------------< +0| class Foo(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#1 Insertion delimiter] = " " + + +[#2 Content] = 0:15-0:18 + >---< +0| class Foo(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#2 Removal] = 0:13-0:18 + >-----< +0| class Foo(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#2 Leading delimiter] = 0:13-0:15 + >--< +0| class Foo(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#2 Domain] = 0:10-0:18 + >--------< +0| class Foo(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#2 Insertion delimiter] = " " + + +[#3 Content] = 0:32-0:35 + >---< +0| class Foo(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#3 Removal] = 0:30-0:35 + >-----< +0| class Foo(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#3 Leading delimiter] = 0:30-0:32 + >--< +0| class Foo(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#3 Domain] = 0:20-0:35 + >---------------< +0| class Foo(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#3 Insertion delimiter] = " " + + +[#4 Content] = 0:42-0:45 + >---< +0| class Foo(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#4 Removal] = 0:40-0:45 + >-----< +0| class Foo(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#4 Leading delimiter] = 0:40-0:42 + >--< +0| class Foo(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#4 Domain] = 0:37-0:49 + >------------< +0| class Foo(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#4 Insertion delimiter] = " " + + +[#5 Content] = 0:63-0:66 + >---< +0| class Foo(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#5 Removal] = 0:61-0:66 + >-----< +0| class Foo(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#5 Leading delimiter] = 0:61-0:63 + >--< +0| class Foo(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#5 Domain] = 0:51-0:70 + >-------------------< +0| class Foo(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#5 Insertion delimiter] = " " diff --git a/data/fixtures/scopes/kotlin/type/type.argument.formal.iteration.scope b/data/fixtures/scopes/kotlin/type/type.argument.formal.iteration.scope new file mode 100644 index 0000000000..bfafcabc7e --- /dev/null +++ b/data/fixtures/scopes/kotlin/type/type.argument.formal.iteration.scope @@ -0,0 +1,13 @@ +fun foo(aaa: Int, bbb: Int) {} +--- + +[#1 Content] = +[#1 Domain] = 0:0-0:30 + >------------------------------< +0| fun foo(aaa: Int, bbb: Int) {} + + +[#2 Content] = +[#2 Domain] = 0:8-0:26 + >------------------< +0| fun foo(aaa: Int, bbb: Int) {} diff --git a/data/fixtures/scopes/kotlin/type/type.argument.formal.method.iteration.scope b/data/fixtures/scopes/kotlin/type/type.argument.formal.method.iteration.scope new file mode 100644 index 0000000000..d4b45da11e --- /dev/null +++ b/data/fixtures/scopes/kotlin/type/type.argument.formal.method.iteration.scope @@ -0,0 +1,27 @@ +class Foo { + fun bar(aaa: Int, bbb: Int) {} +} +--- + +[#1 Content] = +[#1 Domain] = 0:0-2:1 + >----------- +0| class Foo { +1| fun bar(aaa: Int, bbb: Int) {} +2| } + -< + + +[#2 Content] = +[#2 Domain] = 0:11-2:0 + > +0| class Foo { +1| fun bar(aaa: Int, bbb: Int) {} +2| } + < + + +[#3 Content] = +[#3 Domain] = 1:12-1:30 + >------------------< +1| fun bar(aaa: Int, bbb: Int) {} diff --git a/data/fixtures/scopes/kotlin/type/type.argument.formal.method.scope b/data/fixtures/scopes/kotlin/type/type.argument.formal.method.scope new file mode 100644 index 0000000000..b9d9de0fb4 --- /dev/null +++ b/data/fixtures/scopes/kotlin/type/type.argument.formal.method.scope @@ -0,0 +1,91 @@ +class Foo { + fun bar(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} +} +--- + +[#1 Content] = +[#1 Removal] = +[#1 Domain] = 0:0-2:1 + >----------- +0| class Foo { +1| fun bar(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} +2| } + -< + +[#1 Insertion delimiter] = " " + + +[#2 Content] = 1:17-1:20 + >---< +1| fun bar(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#2 Removal] = 1:15-1:20 + >-----< +1| fun bar(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#2 Leading delimiter] = 1:15-1:17 + >--< +1| fun bar(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#2 Domain] = 1:12-1:20 + >--------< +1| fun bar(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#2 Insertion delimiter] = " " + + +[#3 Content] = 1:34-1:37 + >---< +1| fun bar(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#3 Removal] = 1:32-1:37 + >-----< +1| fun bar(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#3 Leading delimiter] = 1:32-1:34 + >--< +1| fun bar(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#3 Domain] = 1:22-1:37 + >---------------< +1| fun bar(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#3 Insertion delimiter] = " " + + +[#4 Content] = 1:44-1:47 + >---< +1| fun bar(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#4 Removal] = 1:42-1:47 + >-----< +1| fun bar(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#4 Leading delimiter] = 1:42-1:44 + >--< +1| fun bar(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#4 Domain] = 1:39-1:51 + >------------< +1| fun bar(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#4 Insertion delimiter] = " " + + +[#5 Content] = 1:65-1:68 + >---< +1| fun bar(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#5 Removal] = 1:63-1:68 + >-----< +1| fun bar(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#5 Leading delimiter] = 1:63-1:65 + >--< +1| fun bar(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#5 Domain] = 1:53-1:72 + >-------------------< +1| fun bar(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#5 Insertion delimiter] = " " diff --git a/data/fixtures/scopes/kotlin/type/type.argument.formal.method2.scope b/data/fixtures/scopes/kotlin/type/type.argument.formal.method2.scope new file mode 100644 index 0000000000..1bb14dcd22 --- /dev/null +++ b/data/fixtures/scopes/kotlin/type/type.argument.formal.method2.scope @@ -0,0 +1,34 @@ +class Foo { + set(aaa: Int) {} +} +--- + +[#1 Content] = +[#1 Removal] = +[#1 Domain] = 0:0-2:1 + >----------- +0| class Foo { +1| set(aaa: Int) {} +2| } + -< + +[#1 Insertion delimiter] = " " + + +[#2 Content] = 1:13-1:16 + >---< +1| set(aaa: Int) {} + +[#2 Removal] = 1:11-1:16 + >-----< +1| set(aaa: Int) {} + +[#2 Leading delimiter] = 1:11-1:13 + >--< +1| set(aaa: Int) {} + +[#2 Domain] = 1:8-1:16 + >--------< +1| set(aaa: Int) {} + +[#2 Insertion delimiter] = " " diff --git a/data/fixtures/scopes/kotlin/type/type.argument.formal.scope b/data/fixtures/scopes/kotlin/type/type.argument.formal.scope new file mode 100644 index 0000000000..2fa964a0d3 --- /dev/null +++ b/data/fixtures/scopes/kotlin/type/type.argument.formal.scope @@ -0,0 +1,77 @@ +fun foo(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} +--- + +[#1 Content] = 0:13-0:16 + >---< +0| fun foo(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#1 Removal] = 0:11-0:16 + >-----< +0| fun foo(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#1 Leading delimiter] = 0:11-0:13 + >--< +0| fun foo(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#1 Domain] = 0:8-0:16 + >--------< +0| fun foo(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#1 Insertion delimiter] = " " + + +[#2 Content] = 0:30-0:33 + >---< +0| fun foo(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#2 Removal] = 0:28-0:33 + >-----< +0| fun foo(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#2 Leading delimiter] = 0:28-0:30 + >--< +0| fun foo(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#2 Domain] = 0:18-0:33 + >---------------< +0| fun foo(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#2 Insertion delimiter] = " " + + +[#3 Content] = 0:40-0:43 + >---< +0| fun foo(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#3 Removal] = 0:38-0:43 + >-----< +0| fun foo(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#3 Leading delimiter] = 0:38-0:40 + >--< +0| fun foo(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#3 Domain] = 0:35-0:47 + >------------< +0| fun foo(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#3 Insertion delimiter] = " " + + +[#4 Content] = 0:61-0:64 + >---< +0| fun foo(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#4 Removal] = 0:59-0:64 + >-----< +0| fun foo(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#4 Leading delimiter] = 0:59-0:61 + >--< +0| fun foo(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#4 Domain] = 0:49-0:68 + >-------------------< +0| fun foo(aaa: Int, vararg bbb: Int, ccc: Int = 0, vararg ddd: Int = 1) {} + +[#4 Insertion delimiter] = " " diff --git a/data/fixtures/scopes/kotlin/type/type.class.scope b/data/fixtures/scopes/kotlin/type/type.class.scope new file mode 100644 index 0000000000..79c274ccc6 --- /dev/null +++ b/data/fixtures/scopes/kotlin/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/kotlin/type/type.class2.scope b/data/fixtures/scopes/kotlin/type/type.class2.scope new file mode 100644 index 0000000000..cac638ce3c --- /dev/null +++ b/data/fixtures/scopes/kotlin/type/type.class2.scope @@ -0,0 +1,10 @@ +object Foo {} +--- + +[Content] = +[Removal] = +[Domain] = 0:0-0:13 + >-------------< +0| object Foo {} + +[Insertion delimiter] = " " diff --git a/data/fixtures/scopes/kotlin/type/type.class3.scope b/data/fixtures/scopes/kotlin/type/type.class3.scope new file mode 100644 index 0000000000..4ff64c01ca --- /dev/null +++ b/data/fixtures/scopes/kotlin/type/type.class3.scope @@ -0,0 +1,33 @@ +class Foo { + companion object Bar {} +} +--- + +[#1 Content] = +[#1 Removal] = +[#1 Domain] = 0:0-2:1 + >----------- +0| class Foo { +1| companion object Bar {} +2| } + -< + +[#1 Insertion delimiter] = " " + + +[#2 Content] = +[#2 Domain] = 1:4-1:27 + >-----------------------< +1| companion object Bar {} + +[#2 Removal] = 1:0-2:0 + >--------------------------- +1| companion object Bar {} +2| } + < + +[#2 Leading delimiter] = 1:0-1:4 + >----< +1| companion object Bar {} + +[#2 Insertion delimiter] = " " diff --git a/data/fixtures/scopes/kotlin/type/type.enum.scope b/data/fixtures/scopes/kotlin/type/type.enum.scope new file mode 100644 index 0000000000..a7d730c62d --- /dev/null +++ b/data/fixtures/scopes/kotlin/type/type.enum.scope @@ -0,0 +1,10 @@ +enum class Foo {} +--- + +[Content] = +[Removal] = +[Domain] = 0:0-0:17 + >-----------------< +0| enum class Foo {} + +[Insertion delimiter] = " " diff --git a/data/fixtures/scopes/kotlin/type/type.field.class.scope b/data/fixtures/scopes/kotlin/type/type.field.class.scope new file mode 100644 index 0000000000..b4ae9a39e7 --- /dev/null +++ b/data/fixtures/scopes/kotlin/type/type.field.class.scope @@ -0,0 +1,55 @@ +class Foo { + val bar: Int + var baz: Int = 0 +} +--- + +[#1 Content] = +[#1 Removal] = +[#1 Domain] = 0:0-3:1 + >----------- +0| class Foo { +1| val bar: Int +2| var baz: Int = 0 +3| } + -< + +[#1 Insertion delimiter] = " " + + +[#2 Content] = 1:13-1:16 + >---< +1| val bar: Int + +[#2 Removal] = 1:11-1:16 + >-----< +1| val bar: Int + +[#2 Leading delimiter] = 1:11-1:13 + >--< +1| val bar: Int + +[#2 Domain] = 1:4-1:16 + >------------< +1| val bar: Int + +[#2 Insertion delimiter] = " " + + +[#3 Content] = 2:13-2:16 + >---< +2| var baz: Int = 0 + +[#3 Removal] = 2:11-2:16 + >-----< +2| var baz: Int = 0 + +[#3 Leading delimiter] = 2:11-2:13 + >--< +2| var baz: Int = 0 + +[#3 Domain] = 2:4-2:20 + >----------------< +2| var baz: Int = 0 + +[#3 Insertion delimiter] = " " diff --git a/data/fixtures/scopes/kotlin/type/type.field.interface.scope b/data/fixtures/scopes/kotlin/type/type.field.interface.scope new file mode 100644 index 0000000000..912dcfef90 --- /dev/null +++ b/data/fixtures/scopes/kotlin/type/type.field.interface.scope @@ -0,0 +1,34 @@ +interface Foo { + val bar: Int +} +--- + +[#1 Content] = +[#1 Removal] = +[#1 Domain] = 0:0-2:1 + >--------------- +0| interface Foo { +1| val bar: Int +2| } + -< + +[#1 Insertion delimiter] = " " + + +[#2 Content] = 1:13-1:16 + >---< +1| val bar: Int + +[#2 Removal] = 1:11-1:16 + >-----< +1| val bar: Int + +[#2 Leading delimiter] = 1:11-1:13 + >--< +1| val bar: Int + +[#2 Domain] = 1:4-1:16 + >------------< +1| val bar: Int + +[#2 Insertion delimiter] = " " diff --git a/data/fixtures/scopes/kotlin/type/type.foreach.scope b/data/fixtures/scopes/kotlin/type/type.foreach.scope new file mode 100644 index 0000000000..40e7127cf5 --- /dev/null +++ b/data/fixtures/scopes/kotlin/type/type.foreach.scope @@ -0,0 +1,20 @@ +for (v: Int in values) {} +--- + +[Content] = 0:8-0:11 + >---< +0| for (v: Int in values) {} + +[Removal] = 0:6-0:11 + >-----< +0| for (v: Int in values) {} + +[Leading delimiter] = 0:6-0:8 + >--< +0| for (v: Int in values) {} + +[Domain] = 0:0-0:25 + >-------------------------< +0| for (v: Int in values) {} + +[Insertion delimiter] = " " diff --git a/data/fixtures/scopes/kotlin/type/type.interface.scope b/data/fixtures/scopes/kotlin/type/type.interface.scope new file mode 100644 index 0000000000..b589a37a0f --- /dev/null +++ b/data/fixtures/scopes/kotlin/type/type.interface.scope @@ -0,0 +1,10 @@ +interface Foo {} +--- + +[Content] = +[Removal] = +[Domain] = 0:0-0:16 + >----------------< +0| interface Foo {} + +[Insertion delimiter] = " " diff --git a/data/fixtures/scopes/kotlin/type/type.iteration.block.scope b/data/fixtures/scopes/kotlin/type/type.iteration.block.scope new file mode 100644 index 0000000000..686814557e --- /dev/null +++ b/data/fixtures/scopes/kotlin/type/type.iteration.block.scope @@ -0,0 +1,27 @@ +class Foo { + fun bar() { } +} +--- + +[#1 Content] = +[#1 Domain] = 0:0-2:1 + >----------- +0| class Foo { +1| fun bar() { } +2| } + -< + + +[#2 Content] = +[#2 Domain] = 0:11-2:0 + > +0| class Foo { +1| fun bar() { } +2| } + < + + +[#3 Content] = +[#3 Domain] = 1:15-1:16 + >-< +1| fun bar() { } diff --git a/data/fixtures/scopes/kotlin/type/type.iteration.block2.scope b/data/fixtures/scopes/kotlin/type/type.iteration.block2.scope new file mode 100644 index 0000000000..6d18e788c8 --- /dev/null +++ b/data/fixtures/scopes/kotlin/type/type.iteration.block2.scope @@ -0,0 +1,13 @@ +fun foo() { } +--- + +[#1 Content] = +[#1 Domain] = 0:0-0:13 + >-------------< +0| fun foo() { } + + +[#2 Content] = +[#2 Domain] = 0:11-0:12 + >-< +0| fun foo() { } diff --git a/data/fixtures/scopes/kotlin/type/type.iteration.block3.scope b/data/fixtures/scopes/kotlin/type/type.iteration.block3.scope new file mode 100644 index 0000000000..a9cb72326e --- /dev/null +++ b/data/fixtures/scopes/kotlin/type/type.iteration.block3.scope @@ -0,0 +1,30 @@ +if (true) { } +else if (false) { } +else { } +--- + +[#1 Content] = +[#1 Domain] = 0:0-2:8 + >------------- +0| if (true) { } +1| else if (false) { } +2| else { } + --------< + + +[#2 Content] = +[#2 Domain] = 0:11-0:12 + >-< +0| if (true) { } + + +[#3 Content] = +[#3 Domain] = 1:17-1:18 + >-< +1| else if (false) { } + + +[#4 Content] = +[#4 Domain] = 2:6-2:7 + >-< +2| else { } diff --git a/data/fixtures/scopes/kotlin/type/type.iteration.block4.scope b/data/fixtures/scopes/kotlin/type/type.iteration.block4.scope new file mode 100644 index 0000000000..ba0f1535af --- /dev/null +++ b/data/fixtures/scopes/kotlin/type/type.iteration.block4.scope @@ -0,0 +1,13 @@ +while (true) { } +--- + +[#1 Content] = +[#1 Domain] = 0:0-0:16 + >----------------< +0| while (true) { } + + +[#2 Content] = +[#2 Domain] = 0:14-0:15 + >-< +0| while (true) { } diff --git a/data/fixtures/scopes/kotlin/type/type.iteration.class.scope b/data/fixtures/scopes/kotlin/type/type.iteration.class.scope new file mode 100644 index 0000000000..a3ec5f3456 --- /dev/null +++ b/data/fixtures/scopes/kotlin/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/kotlin/type/type.iteration.document.scope b/data/fixtures/scopes/kotlin/type/type.iteration.document.scope new file mode 100644 index 0000000000..d737b02c9a --- /dev/null +++ b/data/fixtures/scopes/kotlin/type/type.iteration.document.scope @@ -0,0 +1,12 @@ + +var foo + +--- + +[Content] = +[Domain] = 0:0-2:0 + > +0| +1| var foo +2| + < diff --git a/data/fixtures/scopes/kotlin/type/type.iteration.interface.scope b/data/fixtures/scopes/kotlin/type/type.iteration.interface.scope new file mode 100644 index 0000000000..4140b6c622 --- /dev/null +++ b/data/fixtures/scopes/kotlin/type/type.iteration.interface.scope @@ -0,0 +1,13 @@ +interface Foo { } +--- + +[#1 Content] = +[#1 Domain] = 0:0-0:17 + >-----------------< +0| interface Foo { } + + +[#2 Content] = +[#2 Domain] = 0:15-0:16 + >-< +0| interface Foo { } diff --git a/data/fixtures/scopes/kotlin/type/type.return.scope b/data/fixtures/scopes/kotlin/type/type.return.scope new file mode 100644 index 0000000000..d0334866dd --- /dev/null +++ b/data/fixtures/scopes/kotlin/type/type.return.scope @@ -0,0 +1,20 @@ +fun foo(): Int {} +--- + +[Content] = 0:11-0:14 + >---< +0| fun foo(): Int {} + +[Removal] = 0:9-0:14 + >-----< +0| fun foo(): Int {} + +[Leading delimiter] = 0:9-0:11 + >--< +0| fun foo(): Int {} + +[Domain] = 0:0-0:17 + >-----------------< +0| fun foo(): Int {} + +[Insertion delimiter] = " " diff --git a/data/fixtures/scopes/kotlin/type/type.return2.scope b/data/fixtures/scopes/kotlin/type/type.return2.scope new file mode 100644 index 0000000000..d64ccff02a --- /dev/null +++ b/data/fixtures/scopes/kotlin/type/type.return2.scope @@ -0,0 +1,34 @@ +class Foo { + get(): Int {} +} +--- + +[#1 Content] = +[#1 Removal] = +[#1 Domain] = 0:0-2:1 + >----------- +0| class Foo { +1| get(): Int {} +2| } + -< + +[#1 Insertion delimiter] = " " + + +[#2 Content] = 1:11-1:14 + >---< +1| get(): Int {} + +[#2 Removal] = 1:9-1:14 + >-----< +1| get(): Int {} + +[#2 Leading delimiter] = 1:9-1:11 + >--< +1| get(): Int {} + +[#2 Domain] = 1:4-1:17 + >-------------< +1| get(): Int {} + +[#2 Insertion delimiter] = " " diff --git a/data/fixtures/scopes/kotlin/type/type.return3.scope b/data/fixtures/scopes/kotlin/type/type.return3.scope new file mode 100644 index 0000000000..76e7baaa33 --- /dev/null +++ b/data/fixtures/scopes/kotlin/type/type.return3.scope @@ -0,0 +1,20 @@ +fun foo(): @Bar Int {} +--- + +[Content] = 0:11-0:19 + >--------< +0| fun foo(): @Bar Int {} + +[Removal] = 0:9-0:19 + >----------< +0| fun foo(): @Bar Int {} + +[Leading delimiter] = 0:9-0:11 + >--< +0| fun foo(): @Bar Int {} + +[Domain] = 0:0-0:22 + >----------------------< +0| fun foo(): @Bar Int {} + +[Insertion delimiter] = " " diff --git a/data/fixtures/scopes/kotlin/type/type.return4.scope b/data/fixtures/scopes/kotlin/type/type.return4.scope new file mode 100644 index 0000000000..bd1990ecc0 --- /dev/null +++ b/data/fixtures/scopes/kotlin/type/type.return4.scope @@ -0,0 +1,34 @@ +class Foo { + set(): Unit {} +} +--- + +[#1 Content] = +[#1 Removal] = +[#1 Domain] = 0:0-2:1 + >----------- +0| class Foo { +1| set(): Unit {} +2| } + -< + +[#1 Insertion delimiter] = " " + + +[#2 Content] = 1:11-1:15 + >----< +1| set(): Unit {} + +[#2 Removal] = 1:9-1:15 + >------< +1| set(): Unit {} + +[#2 Leading delimiter] = 1:9-1:11 + >--< +1| set(): Unit {} + +[#2 Domain] = 1:4-1:18 + >--------------< +1| set(): Unit {} + +[#2 Insertion delimiter] = " " diff --git a/data/fixtures/scopes/kotlin/type/type.return5.scope b/data/fixtures/scopes/kotlin/type/type.return5.scope new file mode 100644 index 0000000000..71433d1b53 --- /dev/null +++ b/data/fixtures/scopes/kotlin/type/type.return5.scope @@ -0,0 +1,20 @@ +fun(): Int {} +--- + +[Content] = 0:7-0:10 + >---< +0| fun(): Int {} + +[Removal] = 0:5-0:10 + >-----< +0| fun(): Int {} + +[Leading delimiter] = 0:5-0:7 + >--< +0| fun(): Int {} + +[Domain] = 0:0-0:13 + >-------------< +0| fun(): Int {} + +[Insertion delimiter] = " " diff --git a/data/fixtures/scopes/kotlin/type/type.typeArgument.iteration.scope b/data/fixtures/scopes/kotlin/type/type.typeArgument.iteration.scope new file mode 100644 index 0000000000..d9b46b9799 --- /dev/null +++ b/data/fixtures/scopes/kotlin/type/type.typeArgument.iteration.scope @@ -0,0 +1,13 @@ +var foo: Map +--- + +[#1 Content] = +[#1 Domain] = 0:0-0:22 + >----------------------< +0| var foo: Map + + +[#2 Content] = +[#2 Domain] = 0:13-0:21 + >--------< +0| var foo: Map diff --git a/data/fixtures/scopes/kotlin/type/type.typeArgument.scope b/data/fixtures/scopes/kotlin/type/type.typeArgument.scope new file mode 100644 index 0000000000..15bfbbb685 --- /dev/null +++ b/data/fixtures/scopes/kotlin/type/type.typeArgument.scope @@ -0,0 +1,52 @@ +var foo: Map +--- + +[#1 Content] = 0:9-0:22 + >-------------< +0| var foo: Map + +[#1 Removal] = 0:7-0:22 + >---------------< +0| var foo: Map + +[#1 Leading delimiter] = 0:7-0:9 + >--< +0| var foo: Map + +[#1 Domain] = 0:0-0:22 + >----------------------< +0| var foo: Map + +[#1 Insertion delimiter] = " " + + +[#2 Content] = +[#2 Domain] = 0:13-0:16 + >---< +0| var foo: Map + +[#2 Removal] = 0:13-0:18 + >-----< +0| var foo: Map + +[#2 Trailing delimiter] = 0:16-0:18 + >--< +0| var foo: Map + +[#2 Insertion delimiter] = ", " + + +[#3 Content] = +[#3 Domain] = 0:18-0:21 + >---< +0| var foo: Map + +[#3 Removal] = 0:16-0:21 + >-----< +0| var foo: Map + +[#3 Leading delimiter] = 0:16-0:18 + >--< +0| var foo: Map + +[#3 Insertion delimiter] = ", " diff --git a/data/fixtures/scopes/kotlin/type/type.variable.scope b/data/fixtures/scopes/kotlin/type/type.variable.scope new file mode 100644 index 0000000000..99f31b1b07 --- /dev/null +++ b/data/fixtures/scopes/kotlin/type/type.variable.scope @@ -0,0 +1,20 @@ +var foo: Int +--- + +[Content] = 0:9-0:12 + >---< +0| var foo: Int + +[Removal] = 0:7-0:12 + >-----< +0| var foo: Int + +[Leading delimiter] = 0:7-0:9 + >--< +0| var foo: Int + +[Domain] = 0:0-0:12 + >------------< +0| var foo: Int + +[Insertion delimiter] = " " diff --git a/data/fixtures/scopes/kotlin/type/type.variable2.scope b/data/fixtures/scopes/kotlin/type/type.variable2.scope new file mode 100644 index 0000000000..ded7ac42ef --- /dev/null +++ b/data/fixtures/scopes/kotlin/type/type.variable2.scope @@ -0,0 +1,20 @@ +val foo: Int = 0 +--- + +[Content] = 0:9-0:12 + >---< +0| val foo: Int = 0 + +[Removal] = 0:7-0:12 + >-----< +0| val foo: Int = 0 + +[Leading delimiter] = 0:7-0:9 + >--< +0| val foo: Int = 0 + +[Domain] = 0:0-0:16 + >----------------< +0| val foo: Int = 0 + +[Insertion delimiter] = " " diff --git a/data/fixtures/scopes/kotlin/type/type.variable3.scope b/data/fixtures/scopes/kotlin/type/type.variable3.scope new file mode 100644 index 0000000000..efef805860 --- /dev/null +++ b/data/fixtures/scopes/kotlin/type/type.variable3.scope @@ -0,0 +1,20 @@ +val foo: @Bar Int +--- + +[Content] = 0:9-0:17 + >--------< +0| val foo: @Bar Int + +[Removal] = 0:7-0:17 + >----------< +0| val foo: @Bar Int + +[Leading delimiter] = 0:7-0:9 + >--< +0| val foo: @Bar Int + +[Domain] = 0:0-0:17 + >-----------------< +0| val foo: @Bar Int + +[Insertion delimiter] = " " diff --git a/data/fixtures/scopes/kotlin/type/type.variable4.scope b/data/fixtures/scopes/kotlin/type/type.variable4.scope new file mode 100644 index 0000000000..23c7360138 --- /dev/null +++ b/data/fixtures/scopes/kotlin/type/type.variable4.scope @@ -0,0 +1,20 @@ +val foo: suspend () -> Int +--- + +[Content] = 0:9-0:26 + >-----------------< +0| val foo: suspend () -> Int + +[Removal] = 0:7-0:26 + >-------------------< +0| val foo: suspend () -> Int + +[Leading delimiter] = 0:7-0:9 + >--< +0| val foo: suspend () -> Int + +[Domain] = 0:0-0:26 + >--------------------------< +0| val foo: suspend () -> Int + +[Insertion delimiter] = " " diff --git a/data/fixtures/scopes/kotlin/type/type.variable5.scope b/data/fixtures/scopes/kotlin/type/type.variable5.scope new file mode 100644 index 0000000000..6f020a93bb --- /dev/null +++ b/data/fixtures/scopes/kotlin/type/type.variable5.scope @@ -0,0 +1,20 @@ +val foo: suspend () -> Int = { 0 } +--- + +[Content] = 0:9-0:26 + >-----------------< +0| val foo: suspend () -> Int = { 0 } + +[Removal] = 0:7-0:26 + >-------------------< +0| val foo: suspend () -> Int = { 0 } + +[Leading delimiter] = 0:7-0:9 + >--< +0| val foo: suspend () -> Int = { 0 } + +[Domain] = 0:0-0:34 + >----------------------------------< +0| val foo: suspend () -> Int = { 0 } + +[Insertion delimiter] = " " diff --git a/data/fixtures/scopes/kotlin/type/type.variable6.scope b/data/fixtures/scopes/kotlin/type/type.variable6.scope new file mode 100644 index 0000000000..5a2347d172 --- /dev/null +++ b/data/fixtures/scopes/kotlin/type/type.variable6.scope @@ -0,0 +1,39 @@ +val (foo: Int, bar: Int) = baz +--- + +[#1 Content] = 0:10-0:13 + >---< +0| val (foo: Int, bar: Int) = baz + +[#1 Removal] = 0:8-0:13 + >-----< +0| val (foo: Int, bar: Int) = baz + +[#1 Leading delimiter] = 0:8-0:10 + >--< +0| val (foo: Int, bar: Int) = baz + +[#1 Domain] = 0:5-0:13 + >--------< +0| val (foo: Int, bar: Int) = baz + +[#1 Insertion delimiter] = " " + + +[#2 Content] = 0:20-0:23 + >---< +0| val (foo: Int, bar: Int) = baz + +[#2 Removal] = 0:18-0:23 + >-----< +0| val (foo: Int, bar: Int) = baz + +[#2 Leading delimiter] = 0:18-0:20 + >--< +0| val (foo: Int, bar: Int) = baz + +[#2 Domain] = 0:15-0:23 + >--------< +0| val (foo: Int, bar: Int) = baz + +[#2 Insertion delimiter] = " " diff --git a/data/fixtures/scopes/kotlin/value/value.argument.actual.iteration.scope b/data/fixtures/scopes/kotlin/value/value.argument.actual.iteration.scope new file mode 100644 index 0000000000..546c765209 --- /dev/null +++ b/data/fixtures/scopes/kotlin/value/value.argument.actual.iteration.scope @@ -0,0 +1,13 @@ +foo(aaa = 0, bbb = 1) +--- + +[#1 Content] = +[#1 Domain] = 0:0-0:21 + >---------------------< +0| foo(aaa = 0, bbb = 1) + + +[#2 Content] = +[#2 Domain] = 0:4-0:20 + >----------------< +0| foo(aaa = 0, bbb = 1) diff --git a/data/fixtures/scopes/kotlin/value/value.argument.actual.scope b/data/fixtures/scopes/kotlin/value/value.argument.actual.scope new file mode 100644 index 0000000000..b7b94700a4 --- /dev/null +++ b/data/fixtures/scopes/kotlin/value/value.argument.actual.scope @@ -0,0 +1,39 @@ +foo(aaa = 0, bbb = 1) +--- + +[#1 Content] = 0:10-0:11 + >-< +0| foo(aaa = 0, bbb = 1) + +[#1 Removal] = 0:7-0:11 + >----< +0| foo(aaa = 0, bbb = 1) + +[#1 Leading delimiter] = 0:7-0:10 + >---< +0| foo(aaa = 0, bbb = 1) + +[#1 Domain] = 0:4-0:11 + >-------< +0| foo(aaa = 0, bbb = 1) + +[#1 Insertion delimiter] = " " + + +[#2 Content] = 0:19-0:20 + >-< +0| foo(aaa = 0, bbb = 1) + +[#2 Removal] = 0:16-0:20 + >----< +0| foo(aaa = 0, bbb = 1) + +[#2 Leading delimiter] = 0:16-0:19 + >---< +0| foo(aaa = 0, bbb = 1) + +[#2 Domain] = 0:13-0:20 + >-------< +0| foo(aaa = 0, bbb = 1) + +[#2 Insertion delimiter] = " " diff --git a/data/fixtures/scopes/kotlin/value/value.argument.formal.constructor.iteration.scope b/data/fixtures/scopes/kotlin/value/value.argument.formal.constructor.iteration.scope new file mode 100644 index 0000000000..22bb38acb4 --- /dev/null +++ b/data/fixtures/scopes/kotlin/value/value.argument.formal.constructor.iteration.scope @@ -0,0 +1,27 @@ +class Foo { + constructor(aaa: Int = 0, bbb: Int = 1) {} +} +--- + +[#1 Content] = +[#1 Domain] = 0:0-2:1 + >----------- +0| class Foo { +1| constructor(aaa: Int = 0, bbb: Int = 1) {} +2| } + -< + + +[#2 Content] = +[#2 Domain] = 0:11-2:0 + > +0| class Foo { +1| constructor(aaa: Int = 0, bbb: Int = 1) {} +2| } + < + + +[#3 Content] = +[#3 Domain] = 1:16-1:42 + >--------------------------< +1| constructor(aaa: Int = 0, bbb: Int = 1) {} diff --git a/data/fixtures/scopes/kotlin/value/value.argument.formal.constructor.iteration2.scope b/data/fixtures/scopes/kotlin/value/value.argument.formal.constructor.iteration2.scope new file mode 100644 index 0000000000..25e53ec069 --- /dev/null +++ b/data/fixtures/scopes/kotlin/value/value.argument.formal.constructor.iteration2.scope @@ -0,0 +1,13 @@ +class Foo(aaa: Int = 0, bbb: Int = 1) {} +--- + +[#1 Content] = +[#1 Domain] = 0:0-0:40 + >----------------------------------------< +0| class Foo(aaa: Int = 0, bbb: Int = 1) {} + + +[#2 Content] = +[#2 Domain] = 0:10-0:36 + >--------------------------< +0| class Foo(aaa: Int = 0, bbb: Int = 1) {} diff --git a/data/fixtures/scopes/kotlin/value/value.argument.formal.constructor.scope b/data/fixtures/scopes/kotlin/value/value.argument.formal.constructor.scope new file mode 100644 index 0000000000..f4c93229d5 --- /dev/null +++ b/data/fixtures/scopes/kotlin/value/value.argument.formal.constructor.scope @@ -0,0 +1,41 @@ +class Foo { + constructor(aaa: Int = 0, vararg bbb: Int = 1) {} +} +--- + +[#1 Content] = 1:27-1:28 + >-< +1| constructor(aaa: Int = 0, vararg bbb: Int = 1) {} + +[#1 Removal] = 1:24-1:28 + >----< +1| constructor(aaa: Int = 0, vararg bbb: Int = 1) {} + +[#1 Leading delimiter] = 1:24-1:27 + >---< +1| constructor(aaa: Int = 0, vararg bbb: Int = 1) {} + +[#1 Domain] = 1:16-1:28 + >------------< +1| constructor(aaa: Int = 0, vararg bbb: Int = 1) {} + +[#1 Insertion delimiter] = " " + + +[#2 Content] = 1:48-1:49 + >-< +1| constructor(aaa: Int = 0, vararg bbb: Int = 1) {} + +[#2 Removal] = 1:45-1:49 + >----< +1| constructor(aaa: Int = 0, vararg bbb: Int = 1) {} + +[#2 Leading delimiter] = 1:45-1:48 + >---< +1| constructor(aaa: Int = 0, vararg bbb: Int = 1) {} + +[#2 Domain] = 1:30-1:49 + >-------------------< +1| constructor(aaa: Int = 0, vararg bbb: Int = 1) {} + +[#2 Insertion delimiter] = " " diff --git a/data/fixtures/scopes/kotlin/value/value.argument.formal.constructor2.scope b/data/fixtures/scopes/kotlin/value/value.argument.formal.constructor2.scope new file mode 100644 index 0000000000..59636efd24 --- /dev/null +++ b/data/fixtures/scopes/kotlin/value/value.argument.formal.constructor2.scope @@ -0,0 +1,39 @@ +class Foo(aaa: Int = 0, vararg bbb: Int = 1) {} +--- + +[#1 Content] = 0:21-0:22 + >-< +0| class Foo(aaa: Int = 0, vararg bbb: Int = 1) {} + +[#1 Removal] = 0:18-0:22 + >----< +0| class Foo(aaa: Int = 0, vararg bbb: Int = 1) {} + +[#1 Leading delimiter] = 0:18-0:21 + >---< +0| class Foo(aaa: Int = 0, vararg bbb: Int = 1) {} + +[#1 Domain] = 0:10-0:22 + >------------< +0| class Foo(aaa: Int = 0, vararg bbb: Int = 1) {} + +[#1 Insertion delimiter] = " " + + +[#2 Content] = 0:42-0:43 + >-< +0| class Foo(aaa: Int = 0, vararg bbb: Int = 1) {} + +[#2 Removal] = 0:39-0:43 + >----< +0| class Foo(aaa: Int = 0, vararg bbb: Int = 1) {} + +[#2 Leading delimiter] = 0:39-0:42 + >---< +0| class Foo(aaa: Int = 0, vararg bbb: Int = 1) {} + +[#2 Domain] = 0:24-0:43 + >-------------------< +0| class Foo(aaa: Int = 0, vararg bbb: Int = 1) {} + +[#2 Insertion delimiter] = " " diff --git a/data/fixtures/scopes/kotlin/value/value.argument.formal.iteration.scope b/data/fixtures/scopes/kotlin/value/value.argument.formal.iteration.scope new file mode 100644 index 0000000000..8c959bf6bd --- /dev/null +++ b/data/fixtures/scopes/kotlin/value/value.argument.formal.iteration.scope @@ -0,0 +1,13 @@ +fun foo(aaa: Int = 0, bbb: Int = 1) {} +--- + +[#1 Content] = +[#1 Domain] = 0:0-0:38 + >--------------------------------------< +0| fun foo(aaa: Int = 0, bbb: Int = 1) {} + + +[#2 Content] = +[#2 Domain] = 0:8-0:34 + >--------------------------< +0| fun foo(aaa: Int = 0, bbb: Int = 1) {} diff --git a/data/fixtures/scopes/kotlin/value/value.argument.formal.method.iteration.scope b/data/fixtures/scopes/kotlin/value/value.argument.formal.method.iteration.scope new file mode 100644 index 0000000000..1412c335ad --- /dev/null +++ b/data/fixtures/scopes/kotlin/value/value.argument.formal.method.iteration.scope @@ -0,0 +1,27 @@ +class Foo { + fun bar(aaa: Int = 0, bbb: Int = 1) {} +} +--- + +[#1 Content] = +[#1 Domain] = 0:0-2:1 + >----------- +0| class Foo { +1| fun bar(aaa: Int = 0, bbb: Int = 1) {} +2| } + -< + + +[#2 Content] = +[#2 Domain] = 0:11-2:0 + > +0| class Foo { +1| fun bar(aaa: Int = 0, bbb: Int = 1) {} +2| } + < + + +[#3 Content] = +[#3 Domain] = 1:12-1:38 + >--------------------------< +1| fun bar(aaa: Int = 0, bbb: Int = 1) {} diff --git a/data/fixtures/scopes/kotlin/value/value.argument.formal.method.scope b/data/fixtures/scopes/kotlin/value/value.argument.formal.method.scope new file mode 100644 index 0000000000..c9f57b8944 --- /dev/null +++ b/data/fixtures/scopes/kotlin/value/value.argument.formal.method.scope @@ -0,0 +1,41 @@ +class Foo { + fun bar(aaa: Int = 0, vararg bbb: Int = 1) {} +} +--- + +[#1 Content] = 1:23-1:24 + >-< +1| fun bar(aaa: Int = 0, vararg bbb: Int = 1) {} + +[#1 Removal] = 1:20-1:24 + >----< +1| fun bar(aaa: Int = 0, vararg bbb: Int = 1) {} + +[#1 Leading delimiter] = 1:20-1:23 + >---< +1| fun bar(aaa: Int = 0, vararg bbb: Int = 1) {} + +[#1 Domain] = 1:12-1:24 + >------------< +1| fun bar(aaa: Int = 0, vararg bbb: Int = 1) {} + +[#1 Insertion delimiter] = " " + + +[#2 Content] = 1:44-1:45 + >-< +1| fun bar(aaa: Int = 0, vararg bbb: Int = 1) {} + +[#2 Removal] = 1:41-1:45 + >----< +1| fun bar(aaa: Int = 0, vararg bbb: Int = 1) {} + +[#2 Leading delimiter] = 1:41-1:44 + >---< +1| fun bar(aaa: Int = 0, vararg bbb: Int = 1) {} + +[#2 Domain] = 1:26-1:45 + >-------------------< +1| fun bar(aaa: Int = 0, vararg bbb: Int = 1) {} + +[#2 Insertion delimiter] = " " diff --git a/data/fixtures/scopes/kotlin/value/value.argument.formal.scope b/data/fixtures/scopes/kotlin/value/value.argument.formal.scope new file mode 100644 index 0000000000..3232f27f3a --- /dev/null +++ b/data/fixtures/scopes/kotlin/value/value.argument.formal.scope @@ -0,0 +1,39 @@ +fun foo(aaa: Int = 0, vararg bbb: Int = 1) {} +--- + +[#1 Content] = 0:19-0:20 + >-< +0| fun foo(aaa: Int = 0, vararg bbb: Int = 1) {} + +[#1 Removal] = 0:16-0:20 + >----< +0| fun foo(aaa: Int = 0, vararg bbb: Int = 1) {} + +[#1 Leading delimiter] = 0:16-0:19 + >---< +0| fun foo(aaa: Int = 0, vararg bbb: Int = 1) {} + +[#1 Domain] = 0:8-0:20 + >------------< +0| fun foo(aaa: Int = 0, vararg bbb: Int = 1) {} + +[#1 Insertion delimiter] = " " + + +[#2 Content] = 0:40-0:41 + >-< +0| fun foo(aaa: Int = 0, vararg bbb: Int = 1) {} + +[#2 Removal] = 0:37-0:41 + >----< +0| fun foo(aaa: Int = 0, vararg bbb: Int = 1) {} + +[#2 Leading delimiter] = 0:37-0:40 + >---< +0| fun foo(aaa: Int = 0, vararg bbb: Int = 1) {} + +[#2 Domain] = 0:22-0:41 + >-------------------< +0| fun foo(aaa: Int = 0, vararg bbb: Int = 1) {} + +[#2 Insertion delimiter] = " " diff --git a/data/fixtures/scopes/kotlin/value/value.assignment.scope b/data/fixtures/scopes/kotlin/value/value.assignment.scope new file mode 100644 index 0000000000..6e89de0927 --- /dev/null +++ b/data/fixtures/scopes/kotlin/value/value.assignment.scope @@ -0,0 +1,20 @@ +foo = 0 +--- + +[Content] = 0:6-0:7 + >-< +0| foo = 0 + +[Removal] = 0:3-0:7 + >----< +0| foo = 0 + +[Leading delimiter] = 0:3-0:6 + >---< +0| foo = 0 + +[Domain] = 0:0-0:7 + >-------< +0| foo = 0 + +[Insertion delimiter] = " " diff --git a/data/fixtures/scopes/kotlin/value/value.field.class.scope b/data/fixtures/scopes/kotlin/value/value.field.class.scope new file mode 100644 index 0000000000..ffc48eea80 --- /dev/null +++ b/data/fixtures/scopes/kotlin/value/value.field.class.scope @@ -0,0 +1,42 @@ +class Foo { + val bar: Int = 0 + val baz = 0 +} +--- + +[#1 Content] = 1:19-1:20 + >-< +1| val bar: Int = 0 + +[#1 Removal] = 1:16-1:20 + >----< +1| val bar: Int = 0 + +[#1 Leading delimiter] = 1:16-1:19 + >---< +1| val bar: Int = 0 + +[#1 Domain] = 1:4-1:20 + >----------------< +1| val bar: Int = 0 + +[#1 Insertion delimiter] = " " + + +[#2 Content] = 2:14-2:15 + >-< +2| val baz = 0 + +[#2 Removal] = 2:11-2:15 + >----< +2| val baz = 0 + +[#2 Leading delimiter] = 2:11-2:14 + >---< +2| val baz = 0 + +[#2 Domain] = 2:4-2:15 + >-----------< +2| val baz = 0 + +[#2 Insertion delimiter] = " " diff --git a/data/fixtures/scopes/kotlin/value/value.foreach.scope b/data/fixtures/scopes/kotlin/value/value.foreach.scope new file mode 100644 index 0000000000..b360506e19 --- /dev/null +++ b/data/fixtures/scopes/kotlin/value/value.foreach.scope @@ -0,0 +1,20 @@ +for (v in values) {} +--- + +[Content] = 0:10-0:16 + >------< +0| for (v in values) {} + +[Removal] = 0:9-0:16 + >-------< +0| for (v in values) {} + +[Leading delimiter] = 0:9-0:10 + >-< +0| for (v in values) {} + +[Domain] = 0:0-0:20 + >--------------------< +0| for (v in values) {} + +[Insertion delimiter] = " " diff --git a/data/fixtures/scopes/kotlin/value/value.iteration.block.scope b/data/fixtures/scopes/kotlin/value/value.iteration.block.scope new file mode 100644 index 0000000000..686814557e --- /dev/null +++ b/data/fixtures/scopes/kotlin/value/value.iteration.block.scope @@ -0,0 +1,27 @@ +class Foo { + fun bar() { } +} +--- + +[#1 Content] = +[#1 Domain] = 0:0-2:1 + >----------- +0| class Foo { +1| fun bar() { } +2| } + -< + + +[#2 Content] = +[#2 Domain] = 0:11-2:0 + > +0| class Foo { +1| fun bar() { } +2| } + < + + +[#3 Content] = +[#3 Domain] = 1:15-1:16 + >-< +1| fun bar() { } diff --git a/data/fixtures/scopes/kotlin/value/value.iteration.block2.scope b/data/fixtures/scopes/kotlin/value/value.iteration.block2.scope new file mode 100644 index 0000000000..6d18e788c8 --- /dev/null +++ b/data/fixtures/scopes/kotlin/value/value.iteration.block2.scope @@ -0,0 +1,13 @@ +fun foo() { } +--- + +[#1 Content] = +[#1 Domain] = 0:0-0:13 + >-------------< +0| fun foo() { } + + +[#2 Content] = +[#2 Domain] = 0:11-0:12 + >-< +0| fun foo() { } diff --git a/data/fixtures/scopes/kotlin/value/value.iteration.block3.scope b/data/fixtures/scopes/kotlin/value/value.iteration.block3.scope new file mode 100644 index 0000000000..a9cb72326e --- /dev/null +++ b/data/fixtures/scopes/kotlin/value/value.iteration.block3.scope @@ -0,0 +1,30 @@ +if (true) { } +else if (false) { } +else { } +--- + +[#1 Content] = +[#1 Domain] = 0:0-2:8 + >------------- +0| if (true) { } +1| else if (false) { } +2| else { } + --------< + + +[#2 Content] = +[#2 Domain] = 0:11-0:12 + >-< +0| if (true) { } + + +[#3 Content] = +[#3 Domain] = 1:17-1:18 + >-< +1| else if (false) { } + + +[#4 Content] = +[#4 Domain] = 2:6-2:7 + >-< +2| else { } diff --git a/data/fixtures/scopes/kotlin/value/value.iteration.block4.scope b/data/fixtures/scopes/kotlin/value/value.iteration.block4.scope new file mode 100644 index 0000000000..ba0f1535af --- /dev/null +++ b/data/fixtures/scopes/kotlin/value/value.iteration.block4.scope @@ -0,0 +1,13 @@ +while (true) { } +--- + +[#1 Content] = +[#1 Domain] = 0:0-0:16 + >----------------< +0| while (true) { } + + +[#2 Content] = +[#2 Domain] = 0:14-0:15 + >-< +0| while (true) { } diff --git a/data/fixtures/scopes/kotlin/value/value.iteration.class.scope b/data/fixtures/scopes/kotlin/value/value.iteration.class.scope new file mode 100644 index 0000000000..a3ec5f3456 --- /dev/null +++ b/data/fixtures/scopes/kotlin/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/kotlin/value/value.iteration.document.scope b/data/fixtures/scopes/kotlin/value/value.iteration.document.scope new file mode 100644 index 0000000000..d737b02c9a --- /dev/null +++ b/data/fixtures/scopes/kotlin/value/value.iteration.document.scope @@ -0,0 +1,12 @@ + +var foo + +--- + +[Content] = +[Domain] = 0:0-2:0 + > +0| +1| var foo +2| + < diff --git a/data/fixtures/scopes/kotlin/value/value.mapPair.iteration.scope b/data/fixtures/scopes/kotlin/value/value.mapPair.iteration.scope new file mode 100644 index 0000000000..f5bab59979 --- /dev/null +++ b/data/fixtures/scopes/kotlin/value/value.mapPair.iteration.scope @@ -0,0 +1,13 @@ +mapOf(aaa to 0, bbb to 1) +--- + +[#1 Content] = +[#1 Domain] = 0:0-0:25 + >-------------------------< +0| mapOf(aaa to 0, bbb to 1) + + +[#2 Content] = +[#2 Domain] = 0:6-0:24 + >------------------< +0| mapOf(aaa to 0, bbb to 1) diff --git a/data/fixtures/scopes/kotlin/value/value.mapPair.scope b/data/fixtures/scopes/kotlin/value/value.mapPair.scope new file mode 100644 index 0000000000..fcdd57de13 --- /dev/null +++ b/data/fixtures/scopes/kotlin/value/value.mapPair.scope @@ -0,0 +1,39 @@ +mapOf(aaa to 0, bbb to 1) +--- + +[#1 Content] = 0:13-0:14 + >-< +0| mapOf(aaa to 0, bbb to 1) + +[#1 Removal] = 0:9-0:14 + >-----< +0| mapOf(aaa to 0, bbb to 1) + +[#1 Leading delimiter] = 0:9-0:13 + >----< +0| mapOf(aaa to 0, bbb to 1) + +[#1 Domain] = 0:6-0:14 + >--------< +0| mapOf(aaa to 0, bbb to 1) + +[#1 Insertion delimiter] = " " + + +[#2 Content] = 0:23-0:24 + >-< +0| mapOf(aaa to 0, bbb to 1) + +[#2 Removal] = 0:19-0:24 + >-----< +0| mapOf(aaa to 0, bbb to 1) + +[#2 Leading delimiter] = 0:19-0:23 + >----< +0| mapOf(aaa to 0, bbb to 1) + +[#2 Domain] = 0:16-0:24 + >--------< +0| mapOf(aaa to 0, bbb to 1) + +[#2 Insertion delimiter] = " " diff --git a/data/fixtures/scopes/kotlin/value/value.return.lambda.scope b/data/fixtures/scopes/kotlin/value/value.return.lambda.scope new file mode 100644 index 0000000000..7971bc194d --- /dev/null +++ b/data/fixtures/scopes/kotlin/value/value.return.lambda.scope @@ -0,0 +1,20 @@ +{x -> 0} +--- + +[Content] = 0:6-0:7 + >-< +0| {x -> 0} + +[Removal] = 0:5-0:7 + >--< +0| {x -> 0} + +[Leading delimiter] = 0:5-0:6 + >-< +0| {x -> 0} + +[Domain] = 0:0-0:8 + >--------< +0| {x -> 0} + +[Insertion delimiter] = " " diff --git a/data/fixtures/scopes/kotlin/value/value.return.lambda2.scope b/data/fixtures/scopes/kotlin/value/value.return.lambda2.scope new file mode 100644 index 0000000000..8bf2946b53 --- /dev/null +++ b/data/fixtures/scopes/kotlin/value/value.return.lambda2.scope @@ -0,0 +1,20 @@ +fun foo() = 0 +--- + +[Content] = 0:12-0:13 + >-< +0| fun foo() = 0 + +[Removal] = 0:9-0:13 + >----< +0| fun foo() = 0 + +[Leading delimiter] = 0:9-0:12 + >---< +0| fun foo() = 0 + +[Domain] = 0:0-0:13 + >-------------< +0| fun foo() = 0 + +[Insertion delimiter] = " " diff --git a/data/fixtures/scopes/kotlin/value/value.return.lambda3.scope b/data/fixtures/scopes/kotlin/value/value.return.lambda3.scope new file mode 100644 index 0000000000..5364970b5b --- /dev/null +++ b/data/fixtures/scopes/kotlin/value/value.return.lambda3.scope @@ -0,0 +1,20 @@ +fun foo(): Int = 0 +--- + +[Content] = 0:17-0:18 + >-< +0| fun foo(): Int = 0 + +[Removal] = 0:9-0:18 + >---------< +0| fun foo(): Int = 0 + +[Leading delimiter] = 0:9-0:17 + >--------< +0| fun foo(): Int = 0 + +[Domain] = 0:0-0:18 + >------------------< +0| fun foo(): Int = 0 + +[Insertion delimiter] = " " diff --git a/data/fixtures/scopes/kotlin/value/value.return.scope b/data/fixtures/scopes/kotlin/value/value.return.scope new file mode 100644 index 0000000000..f2114175c8 --- /dev/null +++ b/data/fixtures/scopes/kotlin/value/value.return.scope @@ -0,0 +1,22 @@ +fun bar() { + return 0 +} +--- + +[Content] = 1:11-1:12 + >-< +1| return 0 + +[Removal] = 1:10-1:12 + >--< +1| return 0 + +[Leading delimiter] = 1:10-1:11 + >-< +1| return 0 + +[Domain] = 1:4-1:12 + >--------< +1| return 0 + +[Insertion delimiter] = " " diff --git a/data/fixtures/scopes/kotlin/value/value.switch.scope b/data/fixtures/scopes/kotlin/value/value.switch.scope new file mode 100644 index 0000000000..1e201754f8 --- /dev/null +++ b/data/fixtures/scopes/kotlin/value/value.switch.scope @@ -0,0 +1,13 @@ +when (foo) {} +--- + +[Content] = +[Removal] = 0:6-0:9 + >---< +0| when (foo) {} + +[Domain] = 0:0-0:13 + >-------------< +0| when (foo) {} + +[Insertion delimiter] = " " diff --git a/data/fixtures/scopes/kotlin/value/value.switch2.scope b/data/fixtures/scopes/kotlin/value/value.switch2.scope new file mode 100644 index 0000000000..91c3e820f7 --- /dev/null +++ b/data/fixtures/scopes/kotlin/value/value.switch2.scope @@ -0,0 +1,20 @@ +when (val foo = 0) {} +--- + +[Content] = 0:16-0:17 + >-< +0| when (val foo = 0) {} + +[Removal] = 0:13-0:17 + >----< +0| when (val foo = 0) {} + +[Leading delimiter] = 0:13-0:16 + >---< +0| when (val foo = 0) {} + +[Domain] = 0:0-0:21 + >---------------------< +0| when (val foo = 0) {} + +[Insertion delimiter] = " " diff --git a/data/fixtures/scopes/kotlin/value/value.switch3.scope b/data/fixtures/scopes/kotlin/value/value.switch3.scope new file mode 100644 index 0000000000..c5cf2e1be1 --- /dev/null +++ b/data/fixtures/scopes/kotlin/value/value.switch3.scope @@ -0,0 +1,20 @@ +when (val foo: Int = 0) {} +--- + +[Content] = 0:21-0:22 + >-< +0| when (val foo: Int = 0) {} + +[Removal] = 0:18-0:22 + >----< +0| when (val foo: Int = 0) {} + +[Leading delimiter] = 0:18-0:21 + >---< +0| when (val foo: Int = 0) {} + +[Domain] = 0:0-0:26 + >--------------------------< +0| when (val foo: Int = 0) {} + +[Insertion delimiter] = " " diff --git a/data/fixtures/scopes/kotlin/value/value.typeAlias.scope b/data/fixtures/scopes/kotlin/value/value.typeAlias.scope new file mode 100644 index 0000000000..9796df7457 --- /dev/null +++ b/data/fixtures/scopes/kotlin/value/value.typeAlias.scope @@ -0,0 +1,20 @@ +typealias Foo = Bar +--- + +[Content] = 0:16-0:19 + >---< +0| typealias Foo = Bar + +[Removal] = 0:13-0:19 + >------< +0| typealias Foo = Bar + +[Leading delimiter] = 0:13-0:16 + >---< +0| typealias Foo = Bar + +[Domain] = 0:0-0:19 + >-------------------< +0| typealias Foo = Bar + +[Insertion delimiter] = " " diff --git a/data/fixtures/scopes/kotlin/value/value.typeAlias2.scope b/data/fixtures/scopes/kotlin/value/value.typeAlias2.scope new file mode 100644 index 0000000000..61252c8a76 --- /dev/null +++ b/data/fixtures/scopes/kotlin/value/value.typeAlias2.scope @@ -0,0 +1,20 @@ +typealias Foo = Bar +--- + +[Content] = 0:19-0:22 + >---< +0| typealias Foo = Bar + +[Removal] = 0:16-0:22 + >------< +0| typealias Foo = Bar + +[Leading delimiter] = 0:16-0:19 + >---< +0| typealias Foo = Bar + +[Domain] = 0:0-0:22 + >----------------------< +0| typealias Foo = Bar + +[Insertion delimiter] = " " diff --git a/data/fixtures/scopes/kotlin/value/value.variable.scope b/data/fixtures/scopes/kotlin/value/value.variable.scope new file mode 100644 index 0000000000..06dc0be9f8 --- /dev/null +++ b/data/fixtures/scopes/kotlin/value/value.variable.scope @@ -0,0 +1,20 @@ +var foo = 0 +--- + +[Content] = 0:10-0:11 + >-< +0| var foo = 0 + +[Removal] = 0:7-0:11 + >----< +0| var foo = 0 + +[Leading delimiter] = 0:7-0:10 + >---< +0| var foo = 0 + +[Domain] = 0:0-0:11 + >-----------< +0| var foo = 0 + +[Insertion delimiter] = " " diff --git a/data/fixtures/scopes/kotlin/value/value.variable2.scope b/data/fixtures/scopes/kotlin/value/value.variable2.scope new file mode 100644 index 0000000000..4ef2ac039c --- /dev/null +++ b/data/fixtures/scopes/kotlin/value/value.variable2.scope @@ -0,0 +1,20 @@ +var foo: Int = 0 +--- + +[Content] = 0:15-0:16 + >-< +0| var foo: Int = 0 + +[Removal] = 0:12-0:16 + >----< +0| var foo: Int = 0 + +[Leading delimiter] = 0:12-0:15 + >---< +0| var foo: Int = 0 + +[Domain] = 0:0-0:16 + >----------------< +0| var foo: Int = 0 + +[Insertion delimiter] = " " diff --git a/data/fixtures/scopes/kotlin/value/value.variable3.scope b/data/fixtures/scopes/kotlin/value/value.variable3.scope new file mode 100644 index 0000000000..957dcc3e51 --- /dev/null +++ b/data/fixtures/scopes/kotlin/value/value.variable3.scope @@ -0,0 +1,20 @@ +val foo = 0 +--- + +[Content] = 0:10-0:11 + >-< +0| val foo = 0 + +[Removal] = 0:7-0:11 + >----< +0| val foo = 0 + +[Leading delimiter] = 0:7-0:10 + >---< +0| val foo = 0 + +[Domain] = 0:0-0:11 + >-----------< +0| val foo = 0 + +[Insertion delimiter] = " " diff --git a/data/fixtures/scopes/kotlin/value/value.variable4.scope b/data/fixtures/scopes/kotlin/value/value.variable4.scope new file mode 100644 index 0000000000..f7dddc78da --- /dev/null +++ b/data/fixtures/scopes/kotlin/value/value.variable4.scope @@ -0,0 +1,20 @@ +val foo: Int = 0 +--- + +[Content] = 0:15-0:16 + >-< +0| val foo: Int = 0 + +[Removal] = 0:12-0:16 + >----< +0| val foo: Int = 0 + +[Leading delimiter] = 0:12-0:15 + >---< +0| val foo: Int = 0 + +[Domain] = 0:0-0:16 + >----------------< +0| val foo: Int = 0 + +[Insertion delimiter] = " " diff --git a/data/fixtures/scopes/kotlin/value/value.variable5.scope b/data/fixtures/scopes/kotlin/value/value.variable5.scope new file mode 100644 index 0000000000..fa07c4116c --- /dev/null +++ b/data/fixtures/scopes/kotlin/value/value.variable5.scope @@ -0,0 +1,20 @@ +val foo: suspend () -> Int = { -> } +--- + +[Content] = 0:29-0:35 + >------< +0| val foo: suspend () -> Int = { -> } + +[Removal] = 0:26-0:35 + >---------< +0| val foo: suspend () -> Int = { -> } + +[Leading delimiter] = 0:26-0:29 + >---< +0| val foo: suspend () -> Int = { -> } + +[Domain] = 0:0-0:35 + >-----------------------------------< +0| val foo: suspend () -> Int = { -> } + +[Insertion delimiter] = " " diff --git a/packages/common/src/scopeSupportFacets/kotlin.ts b/packages/common/src/scopeSupportFacets/kotlin.ts index a7c1e43b7e..c4e4fa316d 100644 --- a/packages/common/src/scopeSupportFacets/kotlin.ts +++ b/packages/common/src/scopeSupportFacets/kotlin.ts @@ -1,12 +1,306 @@ import type { LanguageScopeSupportFacetMap } from "./scopeSupportFacets.types"; import { ScopeSupportFacetLevel } from "./scopeSupportFacets.types"; -const { unsupported } = ScopeSupportFacetLevel; +const { supported, unsupported, notApplicable } = ScopeSupportFacetLevel; export const kotlinScopeSupport: LanguageScopeSupportFacetMap = { - /* UNSUPPORTED */ + disqualifyDelimiter: supported, + anonymousFunction: 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.method.empty": supported, + "argumentList.actual.method.singleLine": supported, + "argumentList.actual.method.multiLine": supported, + "argumentList.actual.constructor.empty": supported, + "argumentList.actual.constructor.singleLine": supported, + "argumentList.actual.constructor.multiLine": supported, + "argumentList.formal.empty": supported, + "argumentList.formal.singleLine": supported, + "argumentList.formal.multiLine": supported, + "argumentList.formal.lambda.empty": supported, + "argumentList.formal.lambda.singleLine": supported, + "argumentList.formal.lambda.multiLine": supported, + "argumentList.formal.method.empty": supported, + "argumentList.formal.method.singleLine": supported, + "argumentList.formal.method.multiLine": supported, + "argumentList.formal.constructor.empty": supported, + "argumentList.formal.constructor.singleLine": supported, + "argumentList.formal.constructor.multiLine": supported, + + "branch.if": supported, + "branch.if.elif.else": supported, + "branch.if.else": supported, + "branch.if.iteration": supported, + "branch.try": supported, + "branch.try.iteration": supported, + "branch.switchCase": supported, + "branch.switchCase.iteration": supported, + "branch.ternary": supported, + "branch.ternary.iteration": supported, + + class: supported, + "class.iteration.document": supported, + + "comment.block": supported, + "comment.line": supported, + + "condition.doWhile": supported, + "condition.if": supported, + "condition.switchCase": supported, + "condition.switchCase.iteration": supported, + "condition.while": supported, + "condition.ternary": supported, + + functionCall: supported, + "functionCall.constructor": supported, + "functionCall.method": supported, + "functionCall.chain": supported, + functionCallee: supported, + "functionCallee.constructor": supported, + "functionCallee.method": supported, + "functionCallee.chain": supported, + + namedFunction: supported, + "namedFunction.constructor": supported, + "namedFunction.method": supported, + "namedFunction.iteration.document": supported, + "namedFunction.iteration.class": supported, + + ifStatement: supported, + + "statement.class": supported, + "statement.interface": supported, + "statement.enum": supported, + "statement.field.class": supported, + "statement.field.interface": supported, + "statement.function": supported, + "statement.constructor": supported, + "statement.method": supported, + "statement.if": supported, + "statement.try": supported, + "statement.switch": supported, + "statement.foreach": supported, + "statement.while": supported, + "statement.doWhile": supported, + "statement.variable": supported, + "statement.assignment": supported, + "statement.return": supported, + "statement.break": supported, + "statement.continue": supported, + "statement.iteration.document": supported, + "statement.iteration.class": supported, + "statement.iteration.interface": supported, + "statement.iteration.block": supported, + "statement.static": 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.formal": supported, + "name.argument.formal.iteration": supported, + "name.argument.formal.method": supported, + "name.argument.formal.method.iteration": supported, + "name.argument.formal.constructor": supported, + "name.argument.formal.constructor.iteration": supported, + "name.argument.catch": supported, + "name.argument.actual": supported, + "name.argument.actual.iteration": supported, + "name.assignment": supported, + "name.class": supported, + "name.interface": supported, + "name.enum": supported, + "name.constructor": supported, + "name.field.class": supported, + "name.field.interface": supported, + "name.field.enum": supported, + "name.foreach": supported, + "name.function": supported, + "name.method": supported, + "name.variable": supported, + "name.variable.pattern": supported, + "name.iteration.document": supported, + "name.iteration.class": supported, + "name.iteration.interface": 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.constructor": supported, + "value.argument.formal.constructor.iteration": supported, + "value.argument.formal.method": supported, + "value.argument.formal.method.iteration": supported, + "value.assignment": supported, + "value.foreach": supported, + "value.switch": supported, + "value.field.class": supported, + "value.return": supported, + "value.return.lambda": supported, + "value.variable": supported, + "value.typeAlias": supported, + "value.iteration.block": supported, + "value.iteration.class": supported, + "value.iteration.document": supported, + "value.mapPair": supported, + "value.mapPair.iteration": supported, + + "type.argument.formal": supported, + "type.argument.formal.iteration": supported, + "type.argument.formal.method": supported, + "type.argument.formal.method.iteration": supported, + "type.argument.formal.constructor": supported, + "type.argument.formal.constructor.iteration": supported, + "type.argument.catch": supported, + "type.foreach": supported, + "type.field.class": supported, + "type.field.interface": supported, + "type.return": supported, + "type.variable": supported, + "type.typeArgument": supported, + "type.typeArgument.iteration": supported, + "type.class": supported, + "type.enum": supported, + "type.interface": supported, + "type.alias": supported, + "type.iteration.block": supported, + "type.iteration.class": supported, + "type.iteration.interface": supported, + "type.iteration.document": supported, + + "interior.class": supported, + "interior.interface": supported, + "interior.enum": supported, + "interior.function": supported, + "interior.constructor": supported, + "interior.method": supported, + "interior.if": supported, + "interior.lambda": supported, + "interior.foreach": supported, + "interior.while": supported, + "interior.doWhile": supported, + "interior.switch": supported, + "interior.switchCase": supported, + "interior.try": supported, + "interior.for": supported, + "interior.static": supported, + + /* UNSUPPORTED */ fieldAccess: unsupported, /* NOT APPLICABLE */ + + // Element and tags + element: notApplicable, + tags: notApplicable, + startTag: notApplicable, + endTag: notApplicable, + "interior.element": notApplicable, + "textFragment.element": notApplicable, + attribute: notApplicable, + "key.attribute": notApplicable, + "value.attribute": notApplicable, + + // Section + section: notApplicable, + "section.iteration.document": notApplicable, + "section.iteration.parent": notApplicable, + + // Command + command: notApplicable, + "statement.command": notApplicable, + "name.command": notApplicable, + "value.command": notApplicable, + "interior.command": notApplicable, + + // Notebook cell + notebookCell: notApplicable, + "interior.cell": notApplicable, + + // Resource + "statement.resource": notApplicable, + "name.resource": notApplicable, + "name.resource.iteration": notApplicable, + "value.resource": notApplicable, + "value.resource.iteration": notApplicable, + "type.resource": notApplicable, + "type.resource.iteration": notApplicable, + "interior.resource": notApplicable, + + // Namespace + "statement.namespace": notApplicable, + "name.namespace": notApplicable, + "interior.namespace": notApplicable, + + // Branch loop + "branch.loop": notApplicable, + "branch.loop.iteration": notApplicable, + + // For loop (C-style) + "statement.for": notApplicable, + "condition.for": notApplicable, + + // Yield + "statement.yield": notApplicable, + "value.yield": notApplicable, + + // Keyword argument assignment pattern + "name.assignment.pattern": notApplicable, + + // Values in enum + "value.field.enum": notApplicable, + "value.iteration.enum": notApplicable, + + // Collection items unenclosed + "collectionItem.unenclosed.singleLine": notApplicable, + "collectionItem.unenclosed.multiLine": notApplicable, + "collectionItem.unenclosed.iteration": notApplicable, + + // Miscellaneous + environment: notApplicable, + regularExpression: notApplicable, + selector: notApplicable, + unit: notApplicable, + pairDelimiter: notApplicable, + list: notApplicable, + map: notApplicable, + "class.iteration.block": notApplicable, + "type.cast": notApplicable, + "statement.misc": notApplicable, + "value.variable.pattern": notApplicable, }; diff --git a/queries/java.scm b/queries/java.scm index 00013ce6b5..eae4d8f12f 100644 --- a/queries/java.scm +++ b/queries/java.scm @@ -641,12 +641,12 @@ operator: [ "<" - "<<" - "<<=" - "<=" ">" + "<=" ">=" + "<<" ">>" + "<<=" ">>=" ">>>" ">>>=" diff --git a/queries/kotlin.scm b/queries/kotlin.scm index 0b3b71be81..1c7f7bf35f 100644 --- a/queries/kotlin.scm +++ b/queries/kotlin.scm @@ -1,552 +1,426 @@ -;; -;; Declarations and statements -;; +;; https://github.com/fwcd/tree-sitter-kotlin/blob/main/src/grammar.json -;; Define @statement based on parent node, because a statement can be an arbitrary expression (with -;; no expression_statement parent node) and we don't want every nested expression to be a statement. +[ + (class_declaration) + (object_declaration) + (companion_object) + (function_declaration) + (secondary_constructor) + (anonymous_initializer) + (property_declaration) + (assignment) + (for_statement) + (while_statement) + (do_while_statement) + (jump_expression) + (when_expression) + (try_expression) + (import_list) + (package_header) + (getter) + (setter) + + ;; Disabled on purpose. We have a better definition of this below. + ;; (if_expression) +] @statement + +(control_structure_body + (call_expression) @statement +) (source_file - (_) @statement - (#not-type? @statement import_list) + (call_expression) @statement ) -(import_header) @statement - -(statements - (_) @statement +;; Entire document, including leading and trailing whitespace +( + (source_file) @class.iteration @statement.iteration @namedFunction.iteration + (#document-range! @class.iteration @statement.iteration @namedFunction.iteration) ) - -(control_structure_body - (_) @statement - (#not-type? @statement statements) +( + (source_file) @name.iteration @value.iteration @type.iteration + (#document-range! @name.iteration @value.iteration @type.iteration) ) -(class_body - (_) @statement +;;!! { } +;;! ^ +(_ + "{" @statement.iteration.start.endOf @namedFunction.iteration.start.endOf + "}" @statement.iteration.end.startOf @namedFunction.iteration.end.startOf ) - -(enum_class_body - (_) @statement +(_ + "{" @name.iteration.start.endOf @value.iteration.start.endOf @type.iteration.start.endOf + "}" @name.iteration.end.startOf @value.iteration.end.startOf @type.iteration.end.startOf ) -(class_declaration - (type_identifier) @name -) @class @_.domain - -(object_declaration - (type_identifier) @name -) @class @_.domain - -(companion_object - (type_identifier) @name -) @class @_.domain +;;!! { } +;;! ^ +(_ + "{" @interior.start.endOf + "}" @interior.end.startOf +) +;;!! fun foo(): Int {} +;;! ^^^ +;;! ^^^ (function_declaration (simple_identifier) @name + (function_value_parameters) @type.leading.endOf @value.leading.start.endOf + (type_modifiers)? @type.start + (user_type)? @type.end @value.leading.start.endOf + (function_body + "=" + (_) @value + )? ) @namedFunction @_.domain -(secondary_constructor) @namedFunction - -(if_expression) @ifStatement - -;; -;; Literals and comments -;; +;;!! constructor() {} +(secondary_constructor + "constructor" @name +) @namedFunction @name.domain -(anonymous_function) @anonymousFunction +;;!! fun() {} +(anonymous_function + (function_value_parameters) @type.leading.endOf + (user_type)? @type +) @anonymousFunction @type.domain -(lambda_literal) @anonymousFunction +;;!! {x -> 0} +(lambda_literal + (statements)? @value +) @anonymousFunction @value.domain -(string_literal) @string @textFragment +;;!! "Hello world" +(string_literal + (string_content) @textFragment +) @string [ + ;;!! // Hello world (line_comment) + ;;!! /* Hello world */ (multiline_comment) ] @comment @textFragment -;; -;; Branches and conditions -;; - -(when_entry) @branch - -(when_entry - [ - (when_condition) - "else" - ] @condition - (#allow-multiple! @condition) -) @_.domain - -(when_expression) @branch.iteration @condition.iteration - -(if_expression - "if" - . - "(" - . - (_) @condition - . - ")" -) @_.domain +;; Top level if statement +( + (_ + (if_expression) @ifStatement @statement @branch.iteration + ) @_dummy + (#not-parent-type? @_dummy if_expression) +) -;; If branch -(if_expression - "if" @branch.start @branch.removal.start - . - "(" - . - (_) - . - ")" - . - (control_structure_body) @branch.end @branch.removal.end - ( - "else" - (control_structure_body) @branch.removal.end.startOf - )? +( + (_ + (if_expression + "if" @branch.start @branch.removal.start.startOf + condition: (_) @condition + consequence: (_)? @branch.end @branch.removal.end.endOf + "else"? @branch.removal.end.startOf + alternative: (control_structure_body + . + (if_expression) @branch.removal.end.startOf + )? + ) @condition.domain + ) @_dummy + (#not-parent-type? @_dummy if_expression) ) -;; Else-if branch +;;!! else if (true) {} (if_expression - "else" @branch.start @condition.domain.start + "else" @condition.domain.start @branch.start (control_structure_body (if_expression - "if" - . - "(" - . - (_) @condition - . - ")" - . - (control_structure_body) @branch.end @condition.domain.end + condition: (_) @condition + consequence: (_) @condition.domain.end @branch.end ) ) ) -;; Else branch +;;!! else {} (if_expression "else" @branch.start - (control_structure_body) @branch.end + (control_structure_body + "{" + ) @branch.end ) -(while_statement - "while" - . - "(" - . - (_) @condition - . - ")" -) @_.domain - -(do_while_statement - "(" - . - (_) @condition - . - ")" - . -) @_.domain - -(when_expression - (when_subject) @value - (#child-range! @value 0 -1 true true) -) @_.domain - -;; -;; Name, value, type, and key -;; - -(type_alias - "typealias" - . - (_) @name.start - (_)? @name.end - . - "=" - . - (_) @value.start @type.start -) @value.end.endOf @type.end.endOf @_.domain - -(class_parameter - (simple_identifier) @name -) @_.domain +;;!! if (true) 0 else 1 +;;! ^^^^^^ +(if_expression + "else" @branch.start + (control_structure_body + . + (_) @_dummy + ) @branch.end + (#not-type? @_dummy if_expression) +) -(class_parameter - ":" - . - (_) @type.start - (_)? @type.end - . - "=" - (_) @value -) @_.domain +;;!! try {} catch {} +(try_expression + "try" @branch.start + "}" @branch.end +) @branch.iteration -;; Known issue: this won't work with multiple-node types. -(class_parameter +;;!! catch (e: Exception) {} +;;! ^^^^^^^^^^^^ +(catch_block + (simple_identifier) @argumentOrParameter.start ":" - . - (_) @type - . -) @_.domain + (user_type) @argumentOrParameter.end +) @branch -;; Function declarations with type constraints -(function_declaration +;;!! catch (e: Exception) {} +;;! ^ +(catch_block + (simple_identifier) @name @name.domain.start ":" - . - (_) @type.start - (_)? @type.end - . - (type_constraints) -) @_.domain - -;; Function declarations with no type constraints but with body -( - (function_declaration - ":" - . - (_) @type - . - (function_body) - ) @_.domain -) -( - (function_declaration - ":" - . - (_) @type.start - (_) @type.end - . - (function_body) - ) @_.domain - (#not-type? @type.end "type_constraints") + (user_type) @name.domain.end ) -;; Function declaration without body or type constraints -( - (function_declaration - ":" - . - (_) @type - . - ) @_.domain -) -( - (function_declaration - ":" - . - (_) @type.start - (_) @type.end - . - ) @_.domain - (#not-type? @type.end "function_body") - (#not-type? @type.end "type_constraints") +;;!! catch (e: Exception) {} +;;! ^^^^^^^^^ +(catch_block + (simple_identifier) @type.domain.start @type.leading.endOf + ":" + (user_type) @type @type.domain.end ) -(variable_declaration - (simple_identifier) @name -) @_.domain +;;!! finally {} +(finally_block) @branch -(variable_declaration - ":" - . - (_) @type.start -) @type.end.endOf @_.domain - -(multi_variable_declaration) @name.iteration @type.iteration +;;!! when (true) { } +;;! ^ +(when_expression + "{" @branch.iteration.start.endOf @condition.iteration.start.endOf + "}" @branch.iteration.end.startOf @condition.iteration.end.startOf +) @branch.iteration.domain @condition.iteration.domain -(property_declaration - (variable_declaration - (simple_identifier) @name +;;!! when (true) {} +;;! ^^^ +(when_expression + (when_subject + . + (_) @value + . ) -) @_.domain - -(property_declaration - "=" - . - (_) @value -) @_.domain +) @value.domain -(property_declaration - (property_delegate +;;!! when (foo) {} +;;! ^^^ +(when_expression + (when_subject + (variable_declaration + (simple_identifier) @name + (user_type)? @type + ) @value.leading.endOf + "=" (_) @value ) ) @_.domain -(property_declaration - (variable_declaration - ":" +;;!! 0 -> break +(when_entry) @branch + +;;!! 0, 1 -> break +;;! ^ ^ +(when_entry + [ + (when_condition) + "else" + ] @condition + (#allow-multiple! @condition) +) @condition.domain + +;;!! 0 -> break +;;! ^^^^^^ +(when_entry + "->" @interior.start.endOf + (control_structure_body . - (_) @type.start - ) @type.end.endOf -) @_.domain + (_) + ) @interior.end.endOf +) @interior.domain -(property_declaration - (multi_variable_declaration) @name.iteration @type.iteration -) @name.iteration.domain @type.iteration.domain +;;!! while (true) {} +;;! ^^^^ +(while_statement + "while" + "(" + (_) @condition + ")" +) @condition.domain -(for_statement - (variable_declaration - (simple_identifier) @name - ) -) @_.domain +;;!! do {} while (true) +;;! ^^^^ +(do_while_statement + "(" + (_) @condition + ")" +) @condition.domain -(for_statement - "in" - . - (_) @value -) @_.domain +;;!! class Foo {} +(class_declaration + (type_identifier) @name +) @class @type @name.domain -(for_statement - (variable_declaration - ":" - . - (_) @type.start - ) @type.end.endOf -) @_.domain +;;!! object Foo {} +(object_declaration + (type_identifier) @name +) @class @type @name.domain -(for_statement - (multi_variable_declaration) @name.iteration @type.iteration -) @name.iteration.domain @type.iteration.domain +;;!! companion object Foo {} +(companion_object + (type_identifier) @name +) @class @type @name.domain -(when_subject +;;!! val foo: Int = 0 +;;! ^^^ +;;! ^^^ +;;! ^ +(property_declaration (variable_declaration - (simple_identifier) @name - ) + (simple_identifier) @name @type.leading.endOf + (type_modifiers)? @type.start + [ + (user_type) + (function_type) + ] ? @type.end + ) @value.leading.endOf + ( + "=" + (_) @value + )? ) @_.domain -(when_subject - "=" - . +;;!! val (foo: Int, bar: Int) = baz +;;! ^^^^^^^^^^^^^^^^^^ +;;! ^^^ +(property_declaration + (multi_variable_declaration) @name.iteration @type.iteration @value.leading.endOf (_) @value -) @_.domain - -(when_subject - (variable_declaration - ":" - . - (_) @type.start - ) @type.end.endOf -) @_.domain +) @value.domain @name.iteration.domain @type.iteration.domain -(getter - ":" - . - (_) @type.start - (_)? @type.end - (function_body) -) @_.domain +;;!! val (foo: Int, bar: Int) = baz +;;! ^^^ ^^^ +;;! ^^^ ^^^ +(property_declaration + (multi_variable_declaration + (variable_declaration + (simple_identifier) @name @type.leading.endOf + (user_type)? @type + ) @_.domain + ) +) -(setter - ":" +;;!! foo = 0 +;;! ^^^ +;;! ^ +(assignment + (directly_assignable_expression) @name @value.leading.endOf + (_) @value . - (_) @type.start - (_)? @type.end - (function_body) ) @_.domain -(parameter_with_optional_type - (simple_identifier) @name -) @_.domain - -(parameter_with_optional_type - ":" - . - (_) @type.start -) @type.end.endOf @_.domain - -;; Function parameter without default -(function_value_parameters - (parameter - (simple_identifier) @name - ":" - . - (_) @type.start - ) @type.end.endOf @_.domain -) - -;; Function parameter with default -(function_value_parameters - (parameter - (simple_identifier) @name - ":" - . - (_) @type.start - ) @type.end.endOf @_.domain.start +;;!! typealias Foo = Bar +;;! ^^^ +;;! ^^^ +(type_alias + (type_identifier) @name @value.leading.endOf . "=" - . - (_) @value @_.domain.end -) - -(type_arguments - (type_projection) @type -) -(type_arguments - "<" @type.iteration.start.endOf - ">" @type.iteration.end.startOf -) - -(anonymous_function - ":" - . - (_) @type.start - (_)? @type.end - . - (function_body) -) @_.domain + (_) @value +) @type @_.domain -( - (anonymous_function - ":" - . - (_) @type - . - ) @_.domain -) -( - (anonymous_function - ":" - . - (_) @type.start - (_) @type.end - . - ) @_.domain - (#not-type? @type.end "function_body") -) +;;!! typealias Foo = Bar +;;! ^^^^^^ +;;! ^^^ +(type_alias + (type_identifier) @name.start + (type_parameters) @name.end @value.leading.endOf + "=" + (_) @value +) @type @_.domain -(catch_block - (simple_identifier) @name - ":" - . - (_) @type.start - (_)? @type.end +;;!! for (v: Int in values) {} +;;! ^ +;;! ^^^ +(for_statement + [ + (variable_declaration + (simple_identifier) @name @type.leading.endOf + (user_type)? @type + ) + (multi_variable_declaration) @name + ] + "in" . - ")" + (_) @value ) @_.domain +;;!! return 0 +;;! ^ (jump_expression [ "return" "throw" ] - . (_) @value -) @_.domain - -(jump_expression - "return@" - . - (label) - . - (_) @value -) @_.domain - -(_ - (function_body - "=" - . - (_) @value - ) -) @_.domain - -(assignment - (directly_assignable_expression) @name - (_) @value - . -) @_.domain - -(value_argument - (simple_identifier) @name - "=" - . - (_) @value.start -) @value.end.endOf @_.domain +) @value.domain +;;!! aaa to 0 +;;! ^^^ +;;! ^ (infix_expression - (_) @collectionKey + (_) @collectionKey @value.leading.endOf (simple_identifier) @_dummy - (#eq? @_dummy "to") (_) @value + (#eq? @_dummy "to") ) @_.domain -;; -;; Function call, callee, arguments, and parameters -;; - -[ - (call_expression) - (constructor_invocation) - (constructor_delegation_call) - (enum_entry - (value_arguments) - ) -] @functionCall - -( - (value_arguments - (_)? @_.leading.endOf - . - (value_argument) @argumentOrParameter - . - (_)? @_.trailing.startOf - ) @_dummy - (#single-or-multi-line-delimiter! @argumentOrParameter @_dummy ", " ",\n") -) - +;;!! mapOf( ) +;;! ^ (call_expression - (_) @functionCallee.start + (simple_identifier) @_dummy (call_suffix - (type_arguments)? @functionCallee.end + (value_arguments + "(" @collectionKey.iteration.start.endOf + ")" @collectionKey.iteration.end.startOf + ) ) -) @_.domain.start - -(call_suffix - (annotated_lambda) @argumentOrParameter + (#eq? @_dummy "mapOf") ) +;;!! foo() +;;! ^^^^^^^^ +;;! ^^^^^^ (call_expression - (call_suffix) @argumentOrParameter.iteration -) @argumentOrParameter.iteration.domain - -(constructor_invocation - (user_type) @functionCallee -) @_.domain - -(constructor_invocation - (value_arguments - "(" @argumentOrParameter.iteration.start.endOf - ")" @argumentOrParameter.iteration.end.startOf - ) -) @argumentOrParameter.iteration.domain - -(constructor_delegation_call [ - "this" - "super" - ] @functionCallee -) @_.domain - -(constructor_delegation_call - (value_arguments - "(" @argumentOrParameter.iteration.start.endOf - ")" @argumentOrParameter.iteration.end.startOf - ) -) @argumentOrParameter.iteration.domain + (simple_identifier) + (navigation_expression) + ] @functionCallee.start + (call_suffix + (type_arguments) @functionCallee.end + )? +) @functionCall @functionCallee.domain -(enum_entry - (simple_identifier) @functionCallee - (value_arguments) -) @_.domain +;;!! fun foo(aaa: Int, bbb: Int) {} +;;! ^^^^^^^^^^^^^^^^^^ +(_ + (function_value_parameters + "(" @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 -(enum_entry - (value_arguments - "(" @argumentOrParameter.iteration.start.endOf - ")" @argumentOrParameter.iteration.end.startOf - ) -) @argumentOrParameter.iteration.domain +(function_value_parameters + "(" @name.iteration.start.endOf @value.iteration.start.endOf @type.iteration.start.endOf + ")" @name.iteration.end.startOf @value.iteration.end.startOf @type.iteration.end.startOf +) +;;!! foo: Int +;;!! vararg foo: Int ( (function_value_parameters (_)? @_.leading.endOf @@ -580,6 +454,31 @@ (#single-or-multi-line-delimiter! @argumentOrParameter.end @_dummy ", " ",\n") ) +( + (function_value_parameters + (_)? @_dummy + . + [ + "," + "(" + ] + . + (parameter_modifiers)? @_.domain.start + . + (parameter + (simple_identifier) @name @type.leading.endOf + (user_type) @type + ) @_.domain.end + . + [ + "," + ")" + ] + ) +) + +;; !! foo: Int = 0 +;; !! vararg foo: Int = 0 ( (function_value_parameters (_)? @_.leading.endOf @@ -599,7 +498,7 @@ (parameter) @argumentOrParameter.start . (_) @argumentOrParameter.end - (#not-type? @argumentOrParameter.end "parameter" "parameter_modifiers") + (#not-type? @argumentOrParameter.end parameter parameter_modifiers) . [ (line_comment) @@ -616,46 +515,237 @@ (#single-or-multi-line-delimiter! @argumentOrParameter.end @_dummy ", " ",\n") ) -(_ - (function_value_parameters) @argumentOrParameter.iteration -) @argumentOrParameter.iteration.domain +(function_value_parameters + (_)? @_dummy + . + [ + "," + "(" + ] + . + (parameter_modifiers)? @_.domain.start + . + (parameter + (simple_identifier) @name @type.leading.endOf + (user_type) @type + ) @_.domain.start @value.leading.endOf + . + (_) @value @_.domain.end + (#not-type? @_.domain.end parameter parameter_modifiers) + . + [ + "," + ")" + ] +) + +;;!! foo() { -> } +;;! ^^^^^^ +(call_suffix + (annotated_lambda) @argumentOrParameter +) + +;;!! { aaa, bbb -> } +;;! ^^^^^^^^ +(lambda_literal + (lambda_parameters) @argumentList @argumentOrParameter.iteration + (#empty-single-multi-delimiter! @argumentList @argumentList "" ", " ",\n") +) @argumentList.domain @argumentOrParameter.iteration.domain + +;;!! { -> } +(lambda_literal + "{" @argumentList.start.endOf @argumentList.removal.start.endOf + . + [ + (statements) + "->" + "}" + ] +) @argumentList.domain + +;;!! { aaa: Int, bbb: Int -> } +;;! ^^^ ^^^ +;;! ^^^ ^^^ +(lambda_parameters + (variable_declaration + (simple_identifier) @name @type.leading.endOf + (user_type)? @type + ) @_.domain +) ( - (primary_constructor + (lambda_parameters (_)? @_.leading.endOf . - (class_parameter) @argumentOrParameter + (_) @argumentOrParameter . (_)? @_.trailing.startOf ) @_dummy (#single-or-multi-line-delimiter! @argumentOrParameter @_dummy ", " ",\n") ) +;;!! class Foo(aaa: Int, bbb: Int) {} +;;! ^^^^^^^^^^^^^^^^^^ (class_declaration - (primary_constructor) @argumentOrParameter.iteration -) @argumentOrParameter.iteration.domain + (primary_constructor + "(" @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 + +(primary_constructor + "(" @name.iteration.start.endOf @value.iteration.start.endOf @type.iteration.start.endOf + ")" @name.iteration.end.startOf @value.iteration.end.startOf @type.iteration.end.startOf +) -(parameter_with_optional_type) @argumentOrParameter +( + (primary_constructor + (_)? @_.leading.endOf + . + (_) @argumentOrParameter + . + (_)? @_.trailing.startOf + ) @_dummy + (#single-or-multi-line-delimiter! @argumentOrParameter @_dummy ", " ",\n") +) -;; There is only one parameter allowed, but we treat it as iterable for consistency. -(setter - (parameter_with_optional_type) @argumentOrParameter.iteration -) @argumentOrParameter.iteration.domain +;;!! foo(aaa, bbb) +;;! ^^^^^^^^ +;;!! class Foo: Bar(aaa, bbb) +;;! ^^^^^^^^ +(_ + (_ + (value_arguments + "(" @argumentList.removal.start.endOf @argumentOrParameter.iteration.start.endOf + ")" @argumentList.removal.end.startOf @argumentOrParameter.iteration.end.startOf + ) @argumentList + (#empty-single-multi-delimiter! @argumentList @argumentList "" ", " ",\n") + (#child-range! @argumentList 1 -2) + ) +) @argumentList.domain @argumentOrParameter.iteration.domain + +(value_arguments + "(" @name.iteration.start.endOf @value.iteration.start.endOf @type.iteration.start.endOf + ")" @name.iteration.end.startOf @value.iteration.end.startOf @type.iteration.end.startOf +) ( - (lambda_parameters + (value_arguments (_)? @_.leading.endOf . - [ - (variable_declaration) - (multi_variable_declaration) - ] @argumentOrParameter + (_) @argumentOrParameter . (_)? @_.trailing.startOf ) @_dummy (#single-or-multi-line-delimiter! @argumentOrParameter @_dummy ", " ",\n") ) +;;!! foo(aaa = 0) +;;! ^^^ +;;! ^ +(value_argument + (simple_identifier) @name @value.leading.endOf + "=" + (_) @value +) @_.domain + +;;!! var foo: Map +;;! ^^^^^^^^ +(type_arguments + "<" @type.iteration.start.endOf + ">" @type.iteration.end.startOf +) + +;;!! var foo: Map +;;! ^^^ ^^^ +( + (type_arguments + (_)? @_.leading.endOf + . + (_) @type + . + (_)? @_.trailing.startOf + ) @_dummy + (#single-or-multi-line-delimiter! @type @_dummy ", " ",\n") +) + +;;!! class Foo(aaa: Int = 0) {} +;;! ^^^ +;;! ^^^ +;;! ^ +(class_parameter + (simple_identifier) @name @type.leading.endOf + (user_type) @type @value.leading.endOf + ( + "=" + (_) @value + )? +) @_.domain + +;;!! get(): Int {} +(getter + ")" @type.leading.endOf + (user_type) @type +) @namedFunction @type.domain + +;;!! set(aaa: Int) {} +;;! ^^^^^^^^ +(setter + (parameter_with_optional_type + (simple_identifier) @name @type.leading.endOf + (user_type) @type + ) @argumentOrParameter @_.domain +) + +;;!! set(aaa: Int): Unit {} +;;! ^^^^^^^^ +;;! ^^^^ +;; There is only one parameter allowed, but we treat it as iterable for consistency. +(setter + (parameter_with_optional_type) @argumentOrParameter.iteration + ")" @type.leading.endOf + (user_type)? @type +) @namedFunction @type.domain @argumentOrParameter.iteration.domain + +;;!! BAR, +(enum_entry + (simple_identifier) @name +) @name.domain + +;;!! BAR() +(enum_entry + (simple_identifier) @functionCallee + (value_arguments) +) @functionCall @functionCallee.domain + +;;!! class Foo: Bar() +;;! ^^^^^ +(constructor_invocation + (user_type) @functionCallee +) @functionCall @functionCallee.domain + +;;!! constructor(): this() +;;! ^^^^^^ +(constructor_delegation_call + [ + "this" + "super" + ] @functionCallee +) @functionCall @functionCallee.domain + +(comparison_expression + [ + "<" + ">" + "<=" + ">=" + ] @disqualifyDelimiter +) (lambda_literal - (lambda_parameters) @argumentOrParameter.iteration -) @argumentOrParameter.iteration.domain + "->" @disqualifyDelimiter +) +(when_entry + "->" @disqualifyDelimiter +)