From cf3d225687caa4857d2a7b2822b11ad1e1115150 Mon Sep 17 00:00:00 2001 From: Andreas Arvidsson Date: Tue, 10 Jun 2025 08:20:29 +0200 Subject: [PATCH 01/13] js --- ...entList.actual.constructor.multiLine.scope | 11 ++++++- ...argumentList.actual.method.multiLine.scope | 11 ++++++- .../argumentList.actual.multiLine.scope | 11 ++++++- ...entList.formal.constructor.multiLine.scope | 11 ++++++- ...argumentList.formal.lambda.multiLine.scope | 11 ++++++- ...rgumentList.formal.lambda.multiLine2.scope | 11 ++++++- ...argumentList.formal.method.multiLine.scope | 11 ++++++- .../argumentList.formal.multiLine.scope | 11 ++++++- queries/javascript.core.scm | 30 +++++++++++-------- 9 files changed, 98 insertions(+), 20 deletions(-) diff --git a/data/fixtures/scopes/javascript.core/argumentList/argumentList.actual.constructor.multiLine.scope b/data/fixtures/scopes/javascript.core/argumentList/argumentList.actual.constructor.multiLine.scope index 1e75197cb8..ccde799094 100644 --- a/data/fixtures/scopes/javascript.core/argumentList/argumentList.actual.constructor.multiLine.scope +++ b/data/fixtures/scopes/javascript.core/argumentList/argumentList.actual.constructor.multiLine.scope @@ -4,7 +4,12 @@ new Foo( ); --- -[Content] = +[Content] = 1:4-2:7 + >---- +1| aaa, +2| bbb + -------< + [Removal] = 0:8-3:0 > 0| new Foo( @@ -13,6 +18,10 @@ new Foo( 3| ); < +[Leading delimiter] = 1:0-1:4 + >----< +1| aaa, + [Domain] = 0:0-3:1 >-------- 0| new Foo( diff --git a/data/fixtures/scopes/javascript.core/argumentList/argumentList.actual.method.multiLine.scope b/data/fixtures/scopes/javascript.core/argumentList/argumentList.actual.method.multiLine.scope index 11b4a17bb1..8b52ebf6c7 100644 --- a/data/fixtures/scopes/javascript.core/argumentList/argumentList.actual.method.multiLine.scope +++ b/data/fixtures/scopes/javascript.core/argumentList/argumentList.actual.method.multiLine.scope @@ -4,7 +4,12 @@ foo.bar( ); --- -[Content] = +[Content] = 1:4-2:7 + >---- +1| aaa, +2| bbb + -------< + [Removal] = 0:8-3:0 > 0| foo.bar( @@ -13,6 +18,10 @@ foo.bar( 3| ); < +[Leading delimiter] = 1:0-1:4 + >----< +1| aaa, + [Domain] = 0:0-3:1 >-------- 0| foo.bar( diff --git a/data/fixtures/scopes/javascript.core/argumentList/argumentList.actual.multiLine.scope b/data/fixtures/scopes/javascript.core/argumentList/argumentList.actual.multiLine.scope index 52ce5e54b4..419764ac56 100644 --- a/data/fixtures/scopes/javascript.core/argumentList/argumentList.actual.multiLine.scope +++ b/data/fixtures/scopes/javascript.core/argumentList/argumentList.actual.multiLine.scope @@ -4,7 +4,12 @@ foo( ); --- -[Content] = +[Content] = 1:4-2:7 + >---- +1| aaa, +2| bbb + -------< + [Removal] = 0:4-3:0 > 0| foo( @@ -13,6 +18,10 @@ foo( 3| ); < +[Leading delimiter] = 1:0-1:4 + >----< +1| aaa, + [Domain] = 0:0-3:1 >---- 0| foo( diff --git a/data/fixtures/scopes/javascript.core/argumentList/argumentList.formal.constructor.multiLine.scope b/data/fixtures/scopes/javascript.core/argumentList/argumentList.formal.constructor.multiLine.scope index 3d87ffa5f0..8a27ae367d 100644 --- a/data/fixtures/scopes/javascript.core/argumentList/argumentList.formal.constructor.multiLine.scope +++ b/data/fixtures/scopes/javascript.core/argumentList/argumentList.formal.constructor.multiLine.scope @@ -6,7 +6,12 @@ class MyClass { } --- -[Content] = +[Content] = 2:4-3:7 + >---- +2| aaa, +3| bbb + -------< + [Removal] = 1:14-4:2 > 1| constructor( @@ -15,6 +20,10 @@ class MyClass { 4| ) { } --< +[Leading delimiter] = 2:0-2:4 + >----< +2| aaa, + [Domain] = 1:2-4:7 >------------ 1| constructor( diff --git a/data/fixtures/scopes/javascript.core/argumentList/argumentList.formal.lambda.multiLine.scope b/data/fixtures/scopes/javascript.core/argumentList/argumentList.formal.lambda.multiLine.scope index b2fae2bb40..7bb02ab152 100644 --- a/data/fixtures/scopes/javascript.core/argumentList/argumentList.formal.lambda.multiLine.scope +++ b/data/fixtures/scopes/javascript.core/argumentList/argumentList.formal.lambda.multiLine.scope @@ -4,7 +4,12 @@ ) => { } --- -[Content] = +[Content] = 1:2-2:5 + >---- +1| aaa, +2| bbb + -----< + [Removal] = 0:1-3:0 > 0| ( @@ -13,6 +18,10 @@ 3| ) => { } < +[Leading delimiter] = 1:0-1:2 + >--< +1| aaa, + [Domain] = 0:0-3:8 >- 0| ( diff --git a/data/fixtures/scopes/javascript.core/argumentList/argumentList.formal.lambda.multiLine2.scope b/data/fixtures/scopes/javascript.core/argumentList/argumentList.formal.lambda.multiLine2.scope index 0a389a608a..b5bd54810e 100644 --- a/data/fixtures/scopes/javascript.core/argumentList/argumentList.formal.lambda.multiLine2.scope +++ b/data/fixtures/scopes/javascript.core/argumentList/argumentList.formal.lambda.multiLine2.scope @@ -4,7 +4,12 @@ function ( ) { } --- -[Content] = +[Content] = 1:2-2:5 + >---- +1| aaa, +2| bbb + -----< + [Removal] = 0:10-3:0 > 0| function ( @@ -13,6 +18,10 @@ function ( 3| ) { } < +[Leading delimiter] = 1:0-1:2 + >--< +1| aaa, + [Domain] = 0:0-3:5 >---------- 0| function ( diff --git a/data/fixtures/scopes/javascript.core/argumentList/argumentList.formal.method.multiLine.scope b/data/fixtures/scopes/javascript.core/argumentList/argumentList.formal.method.multiLine.scope index 79e7255d39..a3686fef5d 100644 --- a/data/fixtures/scopes/javascript.core/argumentList/argumentList.formal.method.multiLine.scope +++ b/data/fixtures/scopes/javascript.core/argumentList/argumentList.formal.method.multiLine.scope @@ -6,7 +6,12 @@ class MyClass { } --- -[Content] = +[Content] = 2:4-3:7 + >---- +2| aaa, +3| bbb + -------< + [Removal] = 1:9-4:2 > 1| myFunk( @@ -15,6 +20,10 @@ class MyClass { 4| ) { } --< +[Leading delimiter] = 2:0-2:4 + >----< +2| aaa, + [Domain] = 1:2-4:7 >------- 1| myFunk( diff --git a/data/fixtures/scopes/javascript.core/argumentList/argumentList.formal.multiLine.scope b/data/fixtures/scopes/javascript.core/argumentList/argumentList.formal.multiLine.scope index 243c69de07..c6f1d34563 100644 --- a/data/fixtures/scopes/javascript.core/argumentList/argumentList.formal.multiLine.scope +++ b/data/fixtures/scopes/javascript.core/argumentList/argumentList.formal.multiLine.scope @@ -4,7 +4,12 @@ function myFunk( ) { } --- -[Content] = +[Content] = 1:4-2:7 + >---- +1| aaa, +2| bbb + -------< + [Removal] = 0:16-3:0 > 0| function myFunk( @@ -13,6 +18,10 @@ function myFunk( 3| ) { } < +[Leading delimiter] = 1:0-1:4 + >----< +1| aaa, + [Domain] = 0:0-3:5 >---------------- 0| function myFunk( diff --git a/queries/javascript.core.scm b/queries/javascript.core.scm index 4256725581..888f701789 100644 --- a/queries/javascript.core.scm +++ b/queries/javascript.core.scm @@ -751,8 +751,8 @@ "}" @statement.iteration.end.startOf ) -;;!! foo(name) {} -;;! ^^^^ +;;!! function foo(aaa, bbb) {} +;;! ^^^ ^^^ ( (formal_parameters (_)? @_.leading.endOf @@ -765,8 +765,8 @@ (#single-or-multi-line-delimiter! @argumentOrParameter @_dummy ", " ",\n") ) -;;!! foo("bar") -;;! ^^^^^ +;;!! foo(aaa, bbb) +;;! ^^^ ^^^ ( (arguments (_)? @_.leading.endOf @@ -779,12 +779,15 @@ (#single-or-multi-line-delimiter! @argumentOrParameter @_dummy ", " ",\n") ) +;;!! function foo(aaa, bbb) {} +;;! ^^^^^^^^ (_ (formal_parameters - "(" @argumentList.start.endOf @argumentOrParameter.iteration.start.endOf - ")" @argumentList.end.startOf @argumentOrParameter.iteration.end.startOf - ) @_dummy - (#empty-single-multi-delimiter! @argumentList.start.endOf @_dummy "" ", " ",\n") + "(" @argumentList.removal.start.endOf @argumentOrParameter.iteration.start.endOf + ")" @argumentList.removal.end.startOf @argumentOrParameter.iteration.end.startOf + ) @argumentList + (#child-range! @argumentList 1 -2) + (#empty-single-multi-delimiter! @argumentList @argumentList "" ", " ",\n") ) @argumentList.domain @argumentOrParameter.iteration.domain (formal_parameters @@ -792,12 +795,15 @@ ")" @name.iteration.end.startOf @value.iteration.end.startOf @type.iteration.end.startOf ) +;;!! foo(aaa, bbb) +;;! ^^^^^^^^ (_ (arguments - "(" @argumentList.start.endOf @argumentOrParameter.iteration.start.endOf - ")" @argumentList.end.startOf @argumentOrParameter.iteration.end.startOf - ) @_dummy - (#empty-single-multi-delimiter! @argumentList.start.endOf @_dummy "" ", " ",\n") + "(" @argumentList.removal.start.endOf @argumentOrParameter.iteration.start.endOf + ")" @argumentList.removal.end.startOf @argumentOrParameter.iteration.end.startOf + ) @argumentList + (#child-range! @argumentList 1 -2) + (#empty-single-multi-delimiter! @argumentList @argumentList "" ", " ",\n") ) @argumentList.domain @argumentOrParameter.iteration.domain operator: [ From 2bb896f20931963ff85d3aa8b66ee3a5101b31d3 Mon Sep 17 00:00:00 2001 From: Andreas Arvidsson Date: Tue, 10 Jun 2025 08:41:12 +0200 Subject: [PATCH 02/13] c --- .../argumentList.actual.method.multiLine.scope | 11 ++++++++++- .../c/argumentList.actual.multiLine.scope | 11 ++++++++++- .../c/argumentList.formal.multiLine.scope | 11 ++++++++++- ...mentList.actual.constructor.multiLine.scope | 11 ++++++++++- ...mentList.formal.constructor.multiLine.scope | 11 ++++++++++- .../argumentList.formal.lambda.multiLine.scope | 11 ++++++++++- .../argumentList.formal.method.multiLine.scope | 11 ++++++++++- queries/c.scm | 18 ++++++++++-------- 8 files changed, 80 insertions(+), 15 deletions(-) diff --git a/data/fixtures/scopes/c/argumentList.actual.method.multiLine.scope b/data/fixtures/scopes/c/argumentList.actual.method.multiLine.scope index 7737c24c37..655292f3dc 100644 --- a/data/fixtures/scopes/c/argumentList.actual.method.multiLine.scope +++ b/data/fixtures/scopes/c/argumentList.actual.method.multiLine.scope @@ -4,7 +4,12 @@ foo.bar( ); --- -[Content] = +[Content] = 1:4-2:11 + >-------- +1| int aaa, +2| int bbb + -----------< + [Removal] = 0:8-3:0 > 0| foo.bar( @@ -13,6 +18,10 @@ foo.bar( 3| ); < +[Leading delimiter] = 1:0-1:4 + >----< +1| int aaa, + [Domain] = 0:0-3:1 >-------- 0| foo.bar( diff --git a/data/fixtures/scopes/c/argumentList.actual.multiLine.scope b/data/fixtures/scopes/c/argumentList.actual.multiLine.scope index 52ce5e54b4..419764ac56 100644 --- a/data/fixtures/scopes/c/argumentList.actual.multiLine.scope +++ b/data/fixtures/scopes/c/argumentList.actual.multiLine.scope @@ -4,7 +4,12 @@ foo( ); --- -[Content] = +[Content] = 1:4-2:7 + >---- +1| aaa, +2| bbb + -------< + [Removal] = 0:4-3:0 > 0| foo( @@ -13,6 +18,10 @@ foo( 3| ); < +[Leading delimiter] = 1:0-1:4 + >----< +1| aaa, + [Domain] = 0:0-3:1 >---- 0| foo( diff --git a/data/fixtures/scopes/c/argumentList.formal.multiLine.scope b/data/fixtures/scopes/c/argumentList.formal.multiLine.scope index ec777f93f9..5e85ab7140 100644 --- a/data/fixtures/scopes/c/argumentList.formal.multiLine.scope +++ b/data/fixtures/scopes/c/argumentList.formal.multiLine.scope @@ -4,7 +4,12 @@ void foo( ) {} --- -[Content] = +[Content] = 1:4-2:11 + >-------- +1| int aaa, +2| int bbb + -----------< + [Removal] = 0:9-3:0 > 0| void foo( @@ -13,6 +18,10 @@ void foo( 3| ) {} < +[Leading delimiter] = 1:0-1:4 + >----< +1| int aaa, + [Domain] = 0:0-3:4 >--------- 0| void foo( diff --git a/data/fixtures/scopes/cpp/argumentList.actual.constructor.multiLine.scope b/data/fixtures/scopes/cpp/argumentList.actual.constructor.multiLine.scope index b2310d5500..5fa369312d 100644 --- a/data/fixtures/scopes/cpp/argumentList.actual.constructor.multiLine.scope +++ b/data/fixtures/scopes/cpp/argumentList.actual.constructor.multiLine.scope @@ -4,7 +4,12 @@ new Foo( ); --- -[Content] = +[Content] = 1:4-2:11 + >-------- +1| int aaa, +2| int bbb + -----------< + [Removal] = 0:8-3:0 > 0| new Foo( @@ -13,6 +18,10 @@ new Foo( 3| ); < +[Leading delimiter] = 1:0-1:4 + >----< +1| int aaa, + [Domain] = 0:0-3:1 >-------- 0| new Foo( diff --git a/data/fixtures/scopes/cpp/argumentList.formal.constructor.multiLine.scope b/data/fixtures/scopes/cpp/argumentList.formal.constructor.multiLine.scope index f6f61f1d52..a0153d3643 100644 --- a/data/fixtures/scopes/cpp/argumentList.formal.constructor.multiLine.scope +++ b/data/fixtures/scopes/cpp/argumentList.formal.constructor.multiLine.scope @@ -6,7 +6,12 @@ class MyClass { } --- -[Content] = +[Content] = 2:8-3:15 + >-------- +2| int aaa, +3| int bbb + ---------------< + [Removal] = 1:12-4:4 > 1| MyClass( @@ -15,6 +20,10 @@ class MyClass { 4| ) {} ----< +[Leading delimiter] = 2:0-2:8 + >--------< +2| int aaa, + [Domain] = 1:4-4:8 >-------- 1| MyClass( diff --git a/data/fixtures/scopes/cpp/argumentList.formal.lambda.multiLine.scope b/data/fixtures/scopes/cpp/argumentList.formal.lambda.multiLine.scope index 38ec6cb1eb..5811f6e13e 100644 --- a/data/fixtures/scopes/cpp/argumentList.formal.lambda.multiLine.scope +++ b/data/fixtures/scopes/cpp/argumentList.formal.lambda.multiLine.scope @@ -4,7 +4,12 @@ ) {} --- -[Content] = +[Content] = 1:4-2:11 + >-------- +1| int aaa, +2| int bbb + -----------< + [Removal] = 0:3-3:0 > 0| []( @@ -13,6 +18,10 @@ 3| ) {} < +[Leading delimiter] = 1:0-1:4 + >----< +1| int aaa, + [Domain] = 0:0-3:4 >--- 0| []( diff --git a/data/fixtures/scopes/cpp/argumentList.formal.method.multiLine.scope b/data/fixtures/scopes/cpp/argumentList.formal.method.multiLine.scope index f4d2f4ebcf..9a5c82d2dc 100644 --- a/data/fixtures/scopes/cpp/argumentList.formal.method.multiLine.scope +++ b/data/fixtures/scopes/cpp/argumentList.formal.method.multiLine.scope @@ -6,7 +6,12 @@ class MyClass { } --- -[Content] = +[Content] = 2:8-3:15 + >-------- +2| int aaa, +3| int bbb + ---------------< + [Removal] = 1:13-4:4 > 1| void foo( @@ -15,6 +20,10 @@ class MyClass { 4| ) {} ----< +[Leading delimiter] = 2:0-2:8 + >--------< +2| int aaa, + [Domain] = 1:4-4:8 >--------- 1| void foo( diff --git a/queries/c.scm b/queries/c.scm index 5000ae8a22..8b5dfd76c7 100644 --- a/queries/c.scm +++ b/queries/c.scm @@ -266,11 +266,12 @@ (_ declarator: (_ (parameter_list - "(" @argumentList.start.endOf @argumentOrParameter.iteration.start.endOf - ")" @argumentList.end.startOf @argumentOrParameter.iteration.end.startOf - ) @_dummy + "(" @argumentList.removal.start.endOf @argumentOrParameter.iteration.start.endOf + ")" @argumentList.removal.end.startOf @argumentOrParameter.iteration.end.startOf + ) @argumentList ) - (#empty-single-multi-delimiter! @argumentList.start.endOf @_dummy "" ", " ",\n") + (#child-range! @argumentList 1 -2) + (#empty-single-multi-delimiter! @argumentList @argumentList "" ", " ",\n") ) @argumentList.domain @argumentOrParameter.iteration.domain (parameter_list @@ -282,10 +283,11 @@ ;;! ^^^^^^^^ (_ (argument_list - "(" @argumentList.start.endOf @argumentOrParameter.iteration.start.endOf - ")" @argumentList.end.startOf @argumentOrParameter.iteration.end.startOf - ) @_dummy - (#empty-single-multi-delimiter! @argumentList.start.endOf @_dummy "" ", " ",\n") + "(" @argumentList.removal.start.endOf @argumentOrParameter.iteration.start.endOf + ")" @argumentList.removal.end.startOf @argumentOrParameter.iteration.end.startOf + ) @argumentList + (#child-range! @argumentList 1 -2) + (#empty-single-multi-delimiter! @argumentList @argumentList "" ", " ",\n") ) @argumentList.domain @argumentOrParameter.iteration.domain ;;!! if () {} From c485db89d191f329adf83acda2bb8c4708c95572 Mon Sep 17 00:00:00 2001 From: Andreas Arvidsson Date: Tue, 10 Jun 2025 08:45:00 +0200 Subject: [PATCH 03/13] csharp --- ...entList.actual.constructor.multiLine.scope | 11 ++++++- ...argumentList.actual.method.multiLine.scope | 11 ++++++- .../argumentList.actual.multiLine.scope | 11 ++++++- ...entList.formal.constructor.multiLine.scope | 11 ++++++- ...argumentList.formal.lambda.multiLine.scope | 11 ++++++- ...argumentList.formal.method.multiLine.scope | 11 ++++++- .../argumentList.formal.multiLine.scope | 11 ++++++- queries/csharp.scm | 30 ++++++++++--------- 8 files changed, 86 insertions(+), 21 deletions(-) diff --git a/data/fixtures/scopes/csharp/argumentList/argumentList.actual.constructor.multiLine.scope b/data/fixtures/scopes/csharp/argumentList/argumentList.actual.constructor.multiLine.scope index 1e75197cb8..ccde799094 100644 --- a/data/fixtures/scopes/csharp/argumentList/argumentList.actual.constructor.multiLine.scope +++ b/data/fixtures/scopes/csharp/argumentList/argumentList.actual.constructor.multiLine.scope @@ -4,7 +4,12 @@ new Foo( ); --- -[Content] = +[Content] = 1:4-2:7 + >---- +1| aaa, +2| bbb + -------< + [Removal] = 0:8-3:0 > 0| new Foo( @@ -13,6 +18,10 @@ new Foo( 3| ); < +[Leading delimiter] = 1:0-1:4 + >----< +1| aaa, + [Domain] = 0:0-3:1 >-------- 0| new Foo( diff --git a/data/fixtures/scopes/csharp/argumentList/argumentList.actual.method.multiLine.scope b/data/fixtures/scopes/csharp/argumentList/argumentList.actual.method.multiLine.scope index 11b4a17bb1..8b52ebf6c7 100644 --- a/data/fixtures/scopes/csharp/argumentList/argumentList.actual.method.multiLine.scope +++ b/data/fixtures/scopes/csharp/argumentList/argumentList.actual.method.multiLine.scope @@ -4,7 +4,12 @@ foo.bar( ); --- -[Content] = +[Content] = 1:4-2:7 + >---- +1| aaa, +2| bbb + -------< + [Removal] = 0:8-3:0 > 0| foo.bar( @@ -13,6 +18,10 @@ foo.bar( 3| ); < +[Leading delimiter] = 1:0-1:4 + >----< +1| aaa, + [Domain] = 0:0-3:1 >-------- 0| foo.bar( diff --git a/data/fixtures/scopes/csharp/argumentList/argumentList.actual.multiLine.scope b/data/fixtures/scopes/csharp/argumentList/argumentList.actual.multiLine.scope index 52ce5e54b4..419764ac56 100644 --- a/data/fixtures/scopes/csharp/argumentList/argumentList.actual.multiLine.scope +++ b/data/fixtures/scopes/csharp/argumentList/argumentList.actual.multiLine.scope @@ -4,7 +4,12 @@ foo( ); --- -[Content] = +[Content] = 1:4-2:7 + >---- +1| aaa, +2| bbb + -------< + [Removal] = 0:4-3:0 > 0| foo( @@ -13,6 +18,10 @@ foo( 3| ); < +[Leading delimiter] = 1:0-1:4 + >----< +1| aaa, + [Domain] = 0:0-3:1 >---- 0| foo( diff --git a/data/fixtures/scopes/csharp/argumentList/argumentList.formal.constructor.multiLine.scope b/data/fixtures/scopes/csharp/argumentList/argumentList.formal.constructor.multiLine.scope index f6f61f1d52..a0153d3643 100644 --- a/data/fixtures/scopes/csharp/argumentList/argumentList.formal.constructor.multiLine.scope +++ b/data/fixtures/scopes/csharp/argumentList/argumentList.formal.constructor.multiLine.scope @@ -6,7 +6,12 @@ class MyClass { } --- -[Content] = +[Content] = 2:8-3:15 + >-------- +2| int aaa, +3| int bbb + ---------------< + [Removal] = 1:12-4:4 > 1| MyClass( @@ -15,6 +20,10 @@ class MyClass { 4| ) {} ----< +[Leading delimiter] = 2:0-2:8 + >--------< +2| int aaa, + [Domain] = 1:4-4:8 >-------- 1| MyClass( diff --git a/data/fixtures/scopes/csharp/argumentList/argumentList.formal.lambda.multiLine.scope b/data/fixtures/scopes/csharp/argumentList/argumentList.formal.lambda.multiLine.scope index a078e7ba52..a3aa38bd3e 100644 --- a/data/fixtures/scopes/csharp/argumentList/argumentList.formal.lambda.multiLine.scope +++ b/data/fixtures/scopes/csharp/argumentList/argumentList.formal.lambda.multiLine.scope @@ -4,7 +4,12 @@ ) => {}; --- -[Content] = +[Content] = 1:4-2:7 + >---- +1| aaa, +2| bbb + -------< + [Removal] = 0:1-3:0 > 0| ( @@ -13,6 +18,10 @@ 3| ) => {}; < +[Leading delimiter] = 1:0-1:4 + >----< +1| aaa, + [Domain] = 0:0-3:7 >- 0| ( diff --git a/data/fixtures/scopes/csharp/argumentList/argumentList.formal.method.multiLine.scope b/data/fixtures/scopes/csharp/argumentList/argumentList.formal.method.multiLine.scope index f4d2f4ebcf..9a5c82d2dc 100644 --- a/data/fixtures/scopes/csharp/argumentList/argumentList.formal.method.multiLine.scope +++ b/data/fixtures/scopes/csharp/argumentList/argumentList.formal.method.multiLine.scope @@ -6,7 +6,12 @@ class MyClass { } --- -[Content] = +[Content] = 2:8-3:15 + >-------- +2| int aaa, +3| int bbb + ---------------< + [Removal] = 1:13-4:4 > 1| void foo( @@ -15,6 +20,10 @@ class MyClass { 4| ) {} ----< +[Leading delimiter] = 2:0-2:8 + >--------< +2| int aaa, + [Domain] = 1:4-4:8 >--------- 1| void foo( diff --git a/data/fixtures/scopes/csharp/argumentList/argumentList.formal.multiLine.scope b/data/fixtures/scopes/csharp/argumentList/argumentList.formal.multiLine.scope index 2b09682567..05885b233c 100644 --- a/data/fixtures/scopes/csharp/argumentList/argumentList.formal.multiLine.scope +++ b/data/fixtures/scopes/csharp/argumentList/argumentList.formal.multiLine.scope @@ -4,7 +4,12 @@ void foo( ) {} --- -[Content] = +[Content] = 1:4-2:7 + >---- +1| aaa, +2| bbb + -------< + [Removal] = 0:9-3:0 > 0| void foo( @@ -13,6 +18,10 @@ void foo( 3| ) {} < +[Leading delimiter] = 1:0-1:4 + >----< +1| aaa, + [Domain] = 0:0-3:4 >--------- 0| void foo( diff --git a/queries/csharp.scm b/queries/csharp.scm index d739eb687b..6c5f1a49aa 100644 --- a/queries/csharp.scm +++ b/queries/csharp.scm @@ -401,7 +401,7 @@ ">" @type.iteration.end.startOf ) -;;!! int value = 5 +;;!! int value = 0; ;;! ^ (parameter name: (_) @value.leading.endOf @@ -410,8 +410,8 @@ ) ) @_.domain -;; !! foo(a, b) -;; ! ^ ^ +;; !! foo(aaa, bbb) +;; ! ^^^ ^^^ ( (argument_list (_)? @_.leading.endOf @@ -424,14 +424,15 @@ (#single-or-multi-line-delimiter! @argumentOrParameter @_dummy ", " ",\n") ) -;; !! foo(a, b) -;; ! ^^^^ +;; !! foo(aaa, bbb) +;; ! ^^^^^^^^ (_ (argument_list - "(" @argumentList.start.endOf @argumentOrParameter.iteration.start.endOf - ")" @argumentList.end.startOf @argumentOrParameter.iteration.end.startOf - ) @_dummy - (#empty-single-multi-delimiter! @argumentList.start.endOf @_dummy "" ", " ",\n") + "(" @argumentList.removal.start.endOf @argumentOrParameter.iteration.start.endOf + ")" @argumentList.removal.end.startOf @argumentOrParameter.iteration.end.startOf + ) @argumentList + (#child-range! @argumentList 1 -2) + (#empty-single-multi-delimiter! @argumentList @argumentList "" ", " ",\n") ) @argumentList.domain @argumentOrParameter.iteration.domain ;; !! void foo(int a, int b) @@ -452,10 +453,11 @@ ;; ! ^^^^^^^^^^^^ (_ (parameter_list - "(" @argumentList.start.endOf @argumentOrParameter.iteration.start.endOf - ")" @argumentList.end.startOf @argumentOrParameter.iteration.end.startOf - ) @_dummy - (#empty-single-multi-delimiter! @argumentList.start.endOf @_dummy "" ", " ",\n") + "(" @argumentList.removal.start.endOf @argumentOrParameter.iteration.start.endOf + ")" @argumentList.removal.end.startOf @argumentOrParameter.iteration.end.startOf + ) @argumentList + (#child-range! @argumentList 1 -2) + (#empty-single-multi-delimiter! @argumentList @argumentList "" ", " ",\n") ) @argumentList.domain @argumentOrParameter.iteration.domain (parameter_list @@ -465,7 +467,7 @@ ;; Treat interior of all bodies as iteration scopes for `name`, eg ;;!! void foo() { } -;;! *** +;;! ^^^ (_ body: (_ "{" @name.iteration.start.endOf @value.iteration.start.endOf @type.iteration.start.endOf From 273dcb723511b65956dfa76c189de489f985e3f6 Mon Sep 17 00:00:00 2001 From: Andreas Arvidsson Date: Tue, 10 Jun 2025 08:51:14 +0200 Subject: [PATCH 04/13] css --- .../css/argumentList.actual.multiLine.scope | 35 +++++++++++++++++++ packages/common/src/scopeSupportFacets/css.ts | 2 +- queries/css.scm | 11 +++--- 3 files changed, 43 insertions(+), 5 deletions(-) create mode 100644 data/fixtures/scopes/css/argumentList.actual.multiLine.scope diff --git a/data/fixtures/scopes/css/argumentList.actual.multiLine.scope b/data/fixtures/scopes/css/argumentList.actual.multiLine.scope new file mode 100644 index 0000000000..0eaa8e21df --- /dev/null +++ b/data/fixtures/scopes/css/argumentList.actual.multiLine.scope @@ -0,0 +1,35 @@ +* { + clip-path: polygon( + 50% 0%, + 60% 40% + ); +} +--- + +[Content] = 2:4-3:11 + >------- +2| 50% 0%, +3| 60% 40% + -----------< + +[Removal] = 1:21-4:2 + > +1| clip-path: polygon( +2| 50% 0%, +3| 60% 40% +4| ); + --< + +[Leading delimiter] = 2:0-2:4 + >----< +2| 50% 0%, + +[Domain] = 1:13-4:3 + >-------- +1| clip-path: polygon( +2| 50% 0%, +3| 60% 40% +4| ); + ---< + +[Insertion delimiter] = ",\n" diff --git a/packages/common/src/scopeSupportFacets/css.ts b/packages/common/src/scopeSupportFacets/css.ts index 50dee083e0..93312a6cd5 100644 --- a/packages/common/src/scopeSupportFacets/css.ts +++ b/packages/common/src/scopeSupportFacets/css.ts @@ -17,6 +17,7 @@ export const cssScopeSupport: LanguageScopeSupportFacetMap = { "argumentList.actual.empty": supported, "argumentList.actual.singleLine": supported, + "argumentList.actual.multiLine": supported, "name.iteration.document": supported, "name.iteration.block": supported, @@ -51,7 +52,6 @@ export const cssScopeSupport: LanguageScopeSupportFacetMap = { "argument.formal": notApplicable, "argument.formal.lambda": notApplicable, "argument.formal.lambda.iteration": notApplicable, - "argumentList.actual.multiLine": notApplicable, "argumentList.actual.method.empty": notApplicable, "argumentList.actual.method.singleLine": notApplicable, "argumentList.actual.method.multiLine": notApplicable, diff --git a/queries/css.scm b/queries/css.scm index e81086a206..c30344a585 100644 --- a/queries/css.scm +++ b/queries/css.scm @@ -88,12 +88,15 @@ (#insertion-delimiter! @argumentOrParameter ", ") ) +;;!! translate(-50%, -50%) +;;! ^^^^^^^^^^ (_ (arguments - "(" @argumentList.start.endOf @argumentOrParameter.iteration.start.endOf - ")" @argumentList.end.startOf @argumentOrParameter.iteration.end.startOf - ) @_dummy - (#empty-single-multi-delimiter! @argumentList.start.endOf @_dummy "" ", " ",\n") + "(" @argumentList.removal.start.endOf @argumentOrParameter.iteration.start.endOf + ")" @argumentList.removal.end.startOf @argumentOrParameter.iteration.end.startOf + ) @argumentList + (#child-range! @argumentList 1 -2) + (#empty-single-multi-delimiter! @argumentList @argumentList "" ", " ",\n") ) @argumentList.domain @argumentOrParameter.iteration.domain ;; Entire file From 40c606b48ccf942f37c6a24f5210156c59488cc8 Mon Sep 17 00:00:00 2001 From: Andreas Arvidsson Date: Tue, 10 Jun 2025 08:53:36 +0200 Subject: [PATCH 05/13] java --- .../argumentList.formal.constructor.multiLine.scope | 11 ++++++++++- .../argumentList.formal.lambda.multiLine.scope | 11 ++++++++++- .../argumentList.formal.method.multiLine.scope | 11 ++++++++++- queries/java.scm | 9 +++++---- 4 files changed, 35 insertions(+), 7 deletions(-) diff --git a/data/fixtures/scopes/java/argumentList/argumentList.formal.constructor.multiLine.scope b/data/fixtures/scopes/java/argumentList/argumentList.formal.constructor.multiLine.scope index 7a54ce0cca..31055654b3 100644 --- a/data/fixtures/scopes/java/argumentList/argumentList.formal.constructor.multiLine.scope +++ b/data/fixtures/scopes/java/argumentList/argumentList.formal.constructor.multiLine.scope @@ -6,7 +6,12 @@ public class MyClass { } --- -[Content] = +[Content] = 2:8-3:15 + >-------- +2| int aaa, +3| int bbb + ---------------< + [Removal] = 1:19-4:4 > 1| public MyClass( @@ -15,6 +20,10 @@ public class MyClass { 4| ) {} ----< +[Leading delimiter] = 2:0-2:8 + >--------< +2| int aaa, + [Domain] = 1:4-4:8 >--------------- 1| public MyClass( diff --git a/data/fixtures/scopes/java/argumentList/argumentList.formal.lambda.multiLine.scope b/data/fixtures/scopes/java/argumentList/argumentList.formal.lambda.multiLine.scope index e6ecc66df1..aaad5c108f 100644 --- a/data/fixtures/scopes/java/argumentList/argumentList.formal.lambda.multiLine.scope +++ b/data/fixtures/scopes/java/argumentList/argumentList.formal.lambda.multiLine.scope @@ -4,7 +4,12 @@ ) -> { }; --- -[Content] = +[Content] = 1:4-2:7 + >---- +1| aaa, +2| bbb + -------< + [Removal] = 0:1-3:0 > 0| ( @@ -13,6 +18,10 @@ 3| ) -> { }; < +[Leading delimiter] = 1:0-1:4 + >----< +1| aaa, + [Domain] = 0:0-3:8 >- 0| ( diff --git a/data/fixtures/scopes/java/argumentList/argumentList.formal.method.multiLine.scope b/data/fixtures/scopes/java/argumentList/argumentList.formal.method.multiLine.scope index 9da0856aa5..249a4c3109 100644 --- a/data/fixtures/scopes/java/argumentList/argumentList.formal.method.multiLine.scope +++ b/data/fixtures/scopes/java/argumentList/argumentList.formal.method.multiLine.scope @@ -6,7 +6,12 @@ public class MyClass { } --- -[Content] = +[Content] = 2:8-3:15 + >-------- +2| int aaa, +3| int bbb + ---------------< + [Removal] = 1:20-4:4 > 1| public void foo( @@ -15,6 +20,10 @@ public class MyClass { 4| ) {} ----< +[Leading delimiter] = 2:0-2:8 + >--------< +2| int aaa, + [Domain] = 1:4-4:8 >---------------- 1| public void foo( diff --git a/queries/java.scm b/queries/java.scm index d079c7e07f..ec83a9c70f 100644 --- a/queries/java.scm +++ b/queries/java.scm @@ -519,10 +519,11 @@ ;;! ^^^^^^^^^^^^^^^^ (_ parameters: (_ - "(" @argumentList.start.endOf @argumentOrParameter.iteration.start.endOf - ")" @argumentList.end.startOf @argumentOrParameter.iteration.end.startOf - ) @_dummy - (#empty-single-multi-delimiter! @argumentList.start.endOf @_dummy "" ", " ",\n") + "(" @argumentList.removal.start.endOf @argumentOrParameter.iteration.start.endOf + ")" @argumentList.removal.end.startOf @argumentOrParameter.iteration.end.startOf + ) @argumentList + (#child-range! @argumentList 1 -2) + (#empty-single-multi-delimiter! @argumentList @argumentList "" ", " ",\n") ) @argumentList.domain @argumentOrParameter.iteration.domain ;;!! foo(aaa, bbb); From 9512e3da5de028634f902d631bad881037066211 Mon Sep 17 00:00:00 2001 From: Andreas Arvidsson Date: Tue, 10 Jun 2025 08:55:01 +0200 Subject: [PATCH 06/13] java2 --- .../argumentList.actual.constructor.multiLine.scope | 11 ++++++++++- .../argumentList.actual.method.multiLine.scope | 11 ++++++++++- .../argumentList/argumentList.actual.multiLine.scope | 11 ++++++++++- queries/java.scm | 9 +++++---- 4 files changed, 35 insertions(+), 7 deletions(-) diff --git a/data/fixtures/scopes/java/argumentList/argumentList.actual.constructor.multiLine.scope b/data/fixtures/scopes/java/argumentList/argumentList.actual.constructor.multiLine.scope index 1e75197cb8..ccde799094 100644 --- a/data/fixtures/scopes/java/argumentList/argumentList.actual.constructor.multiLine.scope +++ b/data/fixtures/scopes/java/argumentList/argumentList.actual.constructor.multiLine.scope @@ -4,7 +4,12 @@ new Foo( ); --- -[Content] = +[Content] = 1:4-2:7 + >---- +1| aaa, +2| bbb + -------< + [Removal] = 0:8-3:0 > 0| new Foo( @@ -13,6 +18,10 @@ new Foo( 3| ); < +[Leading delimiter] = 1:0-1:4 + >----< +1| aaa, + [Domain] = 0:0-3:1 >-------- 0| new Foo( diff --git a/data/fixtures/scopes/java/argumentList/argumentList.actual.method.multiLine.scope b/data/fixtures/scopes/java/argumentList/argumentList.actual.method.multiLine.scope index 11b4a17bb1..8b52ebf6c7 100644 --- a/data/fixtures/scopes/java/argumentList/argumentList.actual.method.multiLine.scope +++ b/data/fixtures/scopes/java/argumentList/argumentList.actual.method.multiLine.scope @@ -4,7 +4,12 @@ foo.bar( ); --- -[Content] = +[Content] = 1:4-2:7 + >---- +1| aaa, +2| bbb + -------< + [Removal] = 0:8-3:0 > 0| foo.bar( @@ -13,6 +18,10 @@ foo.bar( 3| ); < +[Leading delimiter] = 1:0-1:4 + >----< +1| aaa, + [Domain] = 0:0-3:1 >-------- 0| foo.bar( diff --git a/data/fixtures/scopes/java/argumentList/argumentList.actual.multiLine.scope b/data/fixtures/scopes/java/argumentList/argumentList.actual.multiLine.scope index 52ce5e54b4..419764ac56 100644 --- a/data/fixtures/scopes/java/argumentList/argumentList.actual.multiLine.scope +++ b/data/fixtures/scopes/java/argumentList/argumentList.actual.multiLine.scope @@ -4,7 +4,12 @@ foo( ); --- -[Content] = +[Content] = 1:4-2:7 + >---- +1| aaa, +2| bbb + -------< + [Removal] = 0:4-3:0 > 0| foo( @@ -13,6 +18,10 @@ foo( 3| ); < +[Leading delimiter] = 1:0-1:4 + >----< +1| aaa, + [Domain] = 0:0-3:1 >---- 0| foo( diff --git a/queries/java.scm b/queries/java.scm index ec83a9c70f..6205417f94 100644 --- a/queries/java.scm +++ b/queries/java.scm @@ -530,10 +530,11 @@ ;;! ^^^^^^^^ (_ (argument_list - "(" @argumentList.start.endOf @argumentOrParameter.iteration.start.endOf - ")" @argumentList.end.startOf @argumentOrParameter.iteration.end.startOf - ) @_dummy - (#empty-single-multi-delimiter! @argumentList.start.endOf @_dummy "" ", " ",\n") + "(" @argumentList.removal.start.endOf @argumentOrParameter.iteration.start.endOf + ")" @argumentList.removal.end.startOf @argumentOrParameter.iteration.end.startOf + ) @argumentList + (#child-range! @argumentList 1 -2) + (#empty-single-multi-delimiter! @argumentList @argumentList "" ", " ",\n") ) @argumentList.domain @argumentOrParameter.iteration.domain ;;!! try (PrintWriter writer = create()) { } From 97e6250190eee3c2cec417ec09e3246e0c09d6b6 Mon Sep 17 00:00:00 2001 From: Andreas Arvidsson Date: Tue, 10 Jun 2025 09:02:01 +0200 Subject: [PATCH 07/13] python --- ...entList.actual.constructor.multiLine.scope | 11 ++++- ...argumentList.actual.method.multiLine.scope | 11 ++++- .../argumentList.actual.multiLine.scope | 11 ++++- ...entList.formal.constructor.multiLine.scope | 12 ++++- ...argumentList.formal.method.multiLine.scope | 11 ++++- .../argumentList.formal.multiLine.scope | 11 ++++- queries/python.scm | 46 ++++++++++--------- 7 files changed, 86 insertions(+), 27 deletions(-) diff --git a/data/fixtures/scopes/python/argumentList.actual.constructor.multiLine.scope b/data/fixtures/scopes/python/argumentList.actual.constructor.multiLine.scope index 619899cf0e..06616a6faf 100644 --- a/data/fixtures/scopes/python/argumentList.actual.constructor.multiLine.scope +++ b/data/fixtures/scopes/python/argumentList.actual.constructor.multiLine.scope @@ -4,7 +4,12 @@ Foo( ) --- -[Content] = +[Content] = 1:4-2:7 + >---- +1| aaa, +2| bbb + -------< + [Removal] = 0:4-3:0 > 0| Foo( @@ -13,6 +18,10 @@ Foo( 3| ) < +[Leading delimiter] = 1:0-1:4 + >----< +1| aaa, + [Domain] = 0:0-3:1 >---- 0| Foo( diff --git a/data/fixtures/scopes/python/argumentList.actual.method.multiLine.scope b/data/fixtures/scopes/python/argumentList.actual.method.multiLine.scope index 7ce467aedb..fbf6ce60c0 100644 --- a/data/fixtures/scopes/python/argumentList.actual.method.multiLine.scope +++ b/data/fixtures/scopes/python/argumentList.actual.method.multiLine.scope @@ -4,7 +4,12 @@ foo.bar( ) --- -[Content] = +[Content] = 1:4-2:7 + >---- +1| aaa, +2| bbb + -------< + [Removal] = 0:8-3:0 > 0| foo.bar( @@ -13,6 +18,10 @@ foo.bar( 3| ) < +[Leading delimiter] = 1:0-1:4 + >----< +1| aaa, + [Domain] = 0:0-3:1 >-------- 0| foo.bar( diff --git a/data/fixtures/scopes/python/argumentList.actual.multiLine.scope b/data/fixtures/scopes/python/argumentList.actual.multiLine.scope index b297b5b686..642614d02e 100644 --- a/data/fixtures/scopes/python/argumentList.actual.multiLine.scope +++ b/data/fixtures/scopes/python/argumentList.actual.multiLine.scope @@ -4,7 +4,12 @@ foo( ) --- -[Content] = +[Content] = 1:4-2:7 + >---- +1| aaa, +2| bbb + -------< + [Removal] = 0:4-3:0 > 0| foo( @@ -13,6 +18,10 @@ foo( 3| ) < +[Leading delimiter] = 1:0-1:4 + >----< +1| aaa, + [Domain] = 0:0-3:1 >---- 0| foo( diff --git a/data/fixtures/scopes/python/argumentList/argumentList.formal.constructor.multiLine.scope b/data/fixtures/scopes/python/argumentList/argumentList.formal.constructor.multiLine.scope index 35e43de29e..4f68c32e2a 100644 --- a/data/fixtures/scopes/python/argumentList/argumentList.formal.constructor.multiLine.scope +++ b/data/fixtures/scopes/python/argumentList/argumentList.formal.constructor.multiLine.scope @@ -7,7 +7,13 @@ class Foo: pass --- -[Content] = +[Content] = 2:8-4:16 + >----- +2| self, +3| aaa: str, +4| bbb: int + ----------------< + [Removal] = 1:17-5:4 > 1| def __init__( @@ -17,6 +23,10 @@ class Foo: 5| ): ----< +[Leading delimiter] = 2:0-2:8 + >--------< +2| self, + [Domain] = 1:4-6:12 >------------- 1| def __init__( diff --git a/data/fixtures/scopes/python/argumentList/argumentList.formal.method.multiLine.scope b/data/fixtures/scopes/python/argumentList/argumentList.formal.method.multiLine.scope index 9f9c431dbd..e4e7fd1b45 100644 --- a/data/fixtures/scopes/python/argumentList/argumentList.formal.method.multiLine.scope +++ b/data/fixtures/scopes/python/argumentList/argumentList.formal.method.multiLine.scope @@ -6,7 +6,12 @@ class Foo: pass --- -[Content] = +[Content] = 2:8-3:16 + >--------- +2| aaa: str, +3| bbb: int + ----------------< + [Removal] = 1:12-4:4 > 1| def bar( @@ -15,6 +20,10 @@ class Foo: 4| ): ----< +[Leading delimiter] = 2:0-2:8 + >--------< +2| aaa: str, + [Domain] = 1:4-5:12 >-------- 1| def bar( diff --git a/data/fixtures/scopes/python/argumentList/argumentList.formal.multiLine.scope b/data/fixtures/scopes/python/argumentList/argumentList.formal.multiLine.scope index 57c31fa7b9..a5b62ccde6 100644 --- a/data/fixtures/scopes/python/argumentList/argumentList.formal.multiLine.scope +++ b/data/fixtures/scopes/python/argumentList/argumentList.formal.multiLine.scope @@ -5,7 +5,12 @@ def foo( pass --- -[Content] = +[Content] = 1:4-2:13 + >--------- +1| aaa: str, +2| bbb: int, + -------------< + [Removal] = 0:8-3:0 > 0| def foo( @@ -14,6 +19,10 @@ def foo( 3| ): < +[Leading delimiter] = 1:0-1:4 + >----< +1| aaa: str, + [Domain] = 0:0-4:8 >-------- 0| def foo( diff --git a/queries/python.scm b/queries/python.scm index 95b5882095..e2255f80a1 100644 --- a/queries/python.scm +++ b/queries/python.scm @@ -646,8 +646,8 @@ (pattern_list) @collectionItem.iteration -;;!! def foo(name) {} -;;! ^^^^ +;;!! def foo(aaa, bbb) {} +;;! ^^^ ^^^ (_ parameters: (_ (_)? @_.leading.endOf @@ -662,8 +662,8 @@ (#single-or-multi-line-delimiter! @argumentOrParameter @_dummy ", " ",\n") ) -;;!! foo("bar") -;;! ^^^^^ +;;!! foo(aaa, bbb) +;;! ^^^ ^^^ ( (argument_list (_)? @_.leading.endOf @@ -703,30 +703,34 @@ (#insertion-delimiter! @argumentList.start.endOf " ") ) @argumentList.domain -;;!! def (a, b): pass -;;! ^^^^ +;;!! def foo(aaa, bbb): pass +;;! ^^^^^^^^ (_ (parameters - "(" @argumentList.start.endOf @argumentOrParameter.iteration.start.endOf - ")" @argumentList.end.startOf @argumentOrParameter.iteration.end.startOf - ) @_dummy - (#empty-single-multi-delimiter! @argumentList.start.endOf @_dummy "" ", " ",\n") + "(" @argumentList.removal.start.endOf @argumentOrParameter.iteration.start.endOf + ")" @argumentList.removal.end.startOf @argumentOrParameter.iteration.end.startOf + ) @argumentList + (#child-range! @argumentList 1 -2) + (#empty-single-multi-delimiter! @argumentList @argumentList "" ", " ",\n") ) @argumentList.domain @argumentOrParameter.iteration.domain +;;!! foo (aaa, bbb) +;;! ^^^^^^^^ (_ (argument_list - "(" @argumentOrParameter.iteration.start.endOf @name.iteration.start.endOf @value.iteration.start.endOf - ")" @argumentOrParameter.iteration.end.startOf @name.iteration.end.startOf @value.iteration.end.startOf - ) @name.iteration.domain @value.iteration.domain -) @argumentOrParameter.iteration.domain + "(" @argumentList.removal.start.endOf @argumentOrParameter.iteration.start.endOf + ")" @argumentList.removal.end.startOf @argumentOrParameter.iteration.end.startOf + ) @argumentList + (#child-range! @argumentList 1 -2) + (#empty-single-multi-delimiter! @argumentList @argumentList "" ", " ",\n") +) @argumentList.domain @argumentOrParameter.iteration.domain -(_ - (argument_list - "(" @argumentList.start.endOf - ")" @argumentList.end.startOf - ) @_dummy - (#empty-single-multi-delimiter! @argumentList.start.endOf @_dummy "" ", " ",\n") -) @argumentList.domain +;;!! foo (aaa=1, bbb=2) +;;! ^^^^^^^^^^^^ +(argument_list + "(" @name.iteration.start.endOf @value.iteration.start.endOf + ")" @name.iteration.end.startOf @value.iteration.end.startOf +) @name.iteration.domain @value.iteration.domain (call (generator_expression From 13bb4800ace5f2f1586fd00d8a7c94f6566f7104 Mon Sep 17 00:00:00 2001 From: Andreas Arvidsson Date: Tue, 10 Jun 2025 09:12:28 +0200 Subject: [PATCH 08/13] python2 --- .../argumentList.actual.singleLine2.scope | 13 +++++++++++++ queries/python.scm | 17 ++++++++++------- 2 files changed, 23 insertions(+), 7 deletions(-) create mode 100644 data/fixtures/scopes/python/argumentList.actual.singleLine2.scope diff --git a/data/fixtures/scopes/python/argumentList.actual.singleLine2.scope b/data/fixtures/scopes/python/argumentList.actual.singleLine2.scope new file mode 100644 index 0000000000..daeddc0ac7 --- /dev/null +++ b/data/fixtures/scopes/python/argumentList.actual.singleLine2.scope @@ -0,0 +1,13 @@ +" ".join(word for word in word_list) +--- + +[Content] = +[Removal] = 0:9-0:35 + >--------------------------< +0| " ".join(word for word in word_list) + +[Domain] = 0:0-0:36 + >------------------------------------< +0| " ".join(word for word in word_list) + +[Insertion delimiter] = " " diff --git a/queries/python.scm b/queries/python.scm index e2255f80a1..d0e75f1346 100644 --- a/queries/python.scm +++ b/queries/python.scm @@ -687,6 +687,16 @@ ) ) +;;!! " ".join(word for word in word_list) +;;!! ^^^^^^^^^^^^^^^^^^^^^^^^^^ +(call + (generator_expression + "(" @argumentOrParameter.iteration.start.endOf + ")" @argumentOrParameter.iteration.end.startOf + ) @argumentList + (#child-range! @argumentList 1 -2) +) @argumentList.domain @argumentOrParameter.iteration.domain + ;;!! lambda a, b: pass ;;! ^^^^ (lambda @@ -732,13 +742,6 @@ ")" @name.iteration.end.startOf @value.iteration.end.startOf ) @name.iteration.domain @value.iteration.domain -(call - (generator_expression - "(" @argumentOrParameter.iteration.start.endOf - ")" @argumentOrParameter.iteration.end.startOf - ) -) @argumentOrParameter.iteration.domain - operators: [ "<" "<=" From 12bc3365603659c190a43c2e545970c7786ea083 Mon Sep 17 00:00:00 2001 From: Andreas Arvidsson Date: Tue, 10 Jun 2025 09:15:19 +0200 Subject: [PATCH 09/13] r --- ...argumentList.actual.method.multiLine.scope | 11 +++++++- .../argumentList.actual.multiLine.scope | 11 +++++++- ...argumentList.formal.lambda.multiLine.scope | 11 +++++++- .../argumentList.formal.multiLine.scope | 11 +++++++- queries/r.scm | 27 ++++++++++--------- 5 files changed, 55 insertions(+), 16 deletions(-) diff --git a/data/fixtures/scopes/r/argumentList/argumentList.actual.method.multiLine.scope b/data/fixtures/scopes/r/argumentList/argumentList.actual.method.multiLine.scope index 7ce467aedb..fbf6ce60c0 100644 --- a/data/fixtures/scopes/r/argumentList/argumentList.actual.method.multiLine.scope +++ b/data/fixtures/scopes/r/argumentList/argumentList.actual.method.multiLine.scope @@ -4,7 +4,12 @@ foo.bar( ) --- -[Content] = +[Content] = 1:4-2:7 + >---- +1| aaa, +2| bbb + -------< + [Removal] = 0:8-3:0 > 0| foo.bar( @@ -13,6 +18,10 @@ foo.bar( 3| ) < +[Leading delimiter] = 1:0-1:4 + >----< +1| aaa, + [Domain] = 0:0-3:1 >-------- 0| foo.bar( diff --git a/data/fixtures/scopes/r/argumentList/argumentList.actual.multiLine.scope b/data/fixtures/scopes/r/argumentList/argumentList.actual.multiLine.scope index b297b5b686..642614d02e 100644 --- a/data/fixtures/scopes/r/argumentList/argumentList.actual.multiLine.scope +++ b/data/fixtures/scopes/r/argumentList/argumentList.actual.multiLine.scope @@ -4,7 +4,12 @@ foo( ) --- -[Content] = +[Content] = 1:4-2:7 + >---- +1| aaa, +2| bbb + -------< + [Removal] = 0:4-3:0 > 0| foo( @@ -13,6 +18,10 @@ foo( 3| ) < +[Leading delimiter] = 1:0-1:4 + >----< +1| aaa, + [Domain] = 0:0-3:1 >---- 0| foo( diff --git a/data/fixtures/scopes/r/argumentList/argumentList.formal.lambda.multiLine.scope b/data/fixtures/scopes/r/argumentList/argumentList.formal.lambda.multiLine.scope index c92432b568..c2dad72b52 100644 --- a/data/fixtures/scopes/r/argumentList/argumentList.formal.lambda.multiLine.scope +++ b/data/fixtures/scopes/r/argumentList/argumentList.formal.lambda.multiLine.scope @@ -4,7 +4,12 @@ function( ) { } --- -[Content] = +[Content] = 1:4-2:7 + >---- +1| aaa, +2| bbb + -------< + [Removal] = 0:9-3:0 > 0| function( @@ -13,6 +18,10 @@ function( 3| ) { } < +[Leading delimiter] = 1:0-1:4 + >----< +1| aaa, + [Domain] = 0:0-3:5 >--------- 0| function( diff --git a/data/fixtures/scopes/r/argumentList/argumentList.formal.multiLine.scope b/data/fixtures/scopes/r/argumentList/argumentList.formal.multiLine.scope index 3ef33ca2f3..a4b172f25f 100644 --- a/data/fixtures/scopes/r/argumentList/argumentList.formal.multiLine.scope +++ b/data/fixtures/scopes/r/argumentList/argumentList.formal.multiLine.scope @@ -5,7 +5,12 @@ abc <- function( } --- -[Content] = +[Content] = 1:4-2:7 + >---- +1| aaa, +2| bbb + -------< + [Removal] = 0:16-3:0 > 0| abc <- function( @@ -14,6 +19,10 @@ abc <- function( 3| ){ < +[Leading delimiter] = 1:0-1:4 + >----< +1| aaa, + [Domain] = 0:0-4:1 >---------------- 0| abc <- function( diff --git a/queries/r.scm b/queries/r.scm index 8b1faaabfc..c1afd05fbd 100644 --- a/queries/r.scm +++ b/queries/r.scm @@ -90,10 +90,11 @@ ;;! ^^^^ (call (arguments - open: "(" @argumentList.start.endOf @argumentOrParameter.iteration.start.endOf - close: ")" @argumentList.end.startOf @argumentOrParameter.iteration.end.startOf - ) @_dummy - (#empty-single-multi-delimiter! @argumentList.start.endOf @_dummy "" ", " ",\n") + "(" @argumentList.removal.start.endOf @argumentOrParameter.iteration.start.endOf + ")" @argumentList.removal.end.startOf @argumentOrParameter.iteration.end.startOf + ) @argumentList + (#child-range! @argumentList 1 -2) + (#empty-single-multi-delimiter! @argumentList @argumentList "" ", " ",\n") ) @argumentList.domain @argumentOrParameter.iteration.domain ;; argumentList.formal @@ -102,10 +103,11 @@ (binary_operator (function_definition (parameters - open: "(" @argumentList.start.endOf @argumentOrParameter.iteration.start.endOf - close: ")" @argumentList.end.startOf @argumentOrParameter.iteration.end.startOf - ) @_dummy - (#empty-single-multi-delimiter! @argumentList.start.endOf @_dummy "" ", " ",\n") + "(" @argumentList.removal.start.endOf @argumentOrParameter.iteration.start.endOf + ")" @argumentList.removal.end.startOf @argumentOrParameter.iteration.end.startOf + ) @argumentList + (#child-range! @argumentList 1 -2) + (#empty-single-multi-delimiter! @argumentList @argumentList "" ", " ",\n") ) ) @argumentList.domain @argumentOrParameter.iteration.domain @@ -115,10 +117,11 @@ ( (function_definition (parameters - open: "(" @argumentList.start.endOf @argumentOrParameter.iteration.start.endOf - close: ")" @argumentList.end.startOf @argumentOrParameter.iteration.end.startOf - ) @_dummy - (#empty-single-multi-delimiter! @argumentList.start.endOf @_dummy "" ", " ",\n") + "(" @argumentList.removal.start.endOf @argumentOrParameter.iteration.start.endOf + ")" @argumentList.removal.end.startOf @argumentOrParameter.iteration.end.startOf + ) @argumentList + (#child-range! @argumentList 1 -2) + (#empty-single-multi-delimiter! @argumentList @argumentList "" ", " ",\n") ) @argumentList.domain @argumentOrParameter.iteration.domain (#not-parent-type? @argumentList.domain binary_operator) ) From 4e0e15eec36f55b901af1257261c836b444ab823 Mon Sep 17 00:00:00 2001 From: Andreas Arvidsson Date: Tue, 10 Jun 2025 09:31:40 +0200 Subject: [PATCH 10/13] ruby --- .../ruby/argument.actual.iteration.scope | 10 +++++ .../ruby/argument.actual.iteration2.scope | 10 +++++ .../scopes/ruby/argument.actual.scope | 33 +++++++++++++++ .../scopes/ruby/argument.actual2.scope | 33 +++++++++++++++ .../ruby/argument.formal.iteration.scope | 10 +++++ .../scopes/ruby/argument.formal.scope | 33 +++++++++++++++ .../ruby/argumentList.actual.empty.scope | 13 ++++++ .../ruby/argumentList.actual.multiLine.scope | 33 +++++++++++++++ .../ruby/argumentList.actual.singleLine.scope | 13 ++++++ .../ruby/argumentList.formal.empty.scope | 13 ++++++ .../ruby/argumentList.formal.empty2.scope | 13 ++++++ .../ruby/argumentList.formal.multiLine.scope | 33 +++++++++++++++ .../ruby/argumentList.formal.multiLine2.scope | 33 +++++++++++++++ .../ruby/argumentList.formal.singleLine.scope | 13 ++++++ .../argumentList.formal.singleLine2.scope | 13 ++++++ .../common/src/scopeSupportFacets/ruby.ts | 12 ++++++ queries/ruby.scm | 41 +++++++++++-------- 17 files changed, 341 insertions(+), 18 deletions(-) create mode 100644 data/fixtures/scopes/ruby/argument.actual.iteration.scope create mode 100644 data/fixtures/scopes/ruby/argument.actual.iteration2.scope create mode 100644 data/fixtures/scopes/ruby/argument.actual.scope create mode 100644 data/fixtures/scopes/ruby/argument.actual2.scope create mode 100644 data/fixtures/scopes/ruby/argument.formal.iteration.scope create mode 100644 data/fixtures/scopes/ruby/argument.formal.scope create mode 100644 data/fixtures/scopes/ruby/argumentList.actual.empty.scope create mode 100644 data/fixtures/scopes/ruby/argumentList.actual.multiLine.scope create mode 100644 data/fixtures/scopes/ruby/argumentList.actual.singleLine.scope create mode 100644 data/fixtures/scopes/ruby/argumentList.formal.empty.scope create mode 100644 data/fixtures/scopes/ruby/argumentList.formal.empty2.scope create mode 100644 data/fixtures/scopes/ruby/argumentList.formal.multiLine.scope create mode 100644 data/fixtures/scopes/ruby/argumentList.formal.multiLine2.scope create mode 100644 data/fixtures/scopes/ruby/argumentList.formal.singleLine.scope create mode 100644 data/fixtures/scopes/ruby/argumentList.formal.singleLine2.scope diff --git a/data/fixtures/scopes/ruby/argument.actual.iteration.scope b/data/fixtures/scopes/ruby/argument.actual.iteration.scope new file mode 100644 index 0000000000..c9fcfe46b8 --- /dev/null +++ b/data/fixtures/scopes/ruby/argument.actual.iteration.scope @@ -0,0 +1,10 @@ +foo(aaa, bbb) +--- + +[Range] = 0:4-0:12 + >--------< +0| foo(aaa, bbb) + +[Domain] = 0:0-0:13 + >-------------< +0| foo(aaa, bbb) diff --git a/data/fixtures/scopes/ruby/argument.actual.iteration2.scope b/data/fixtures/scopes/ruby/argument.actual.iteration2.scope new file mode 100644 index 0000000000..3be5bd5b8d --- /dev/null +++ b/data/fixtures/scopes/ruby/argument.actual.iteration2.scope @@ -0,0 +1,10 @@ +foo{ |aaa, bbb| } +--- + +[Range] = 0:6-0:14 + >--------< +0| foo{ |aaa, bbb| } + +[Domain] = 0:0-0:17 + >-----------------< +0| foo{ |aaa, bbb| } diff --git a/data/fixtures/scopes/ruby/argument.actual.scope b/data/fixtures/scopes/ruby/argument.actual.scope new file mode 100644 index 0000000000..b1a9403ff3 --- /dev/null +++ b/data/fixtures/scopes/ruby/argument.actual.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/ruby/argument.actual2.scope b/data/fixtures/scopes/ruby/argument.actual2.scope new file mode 100644 index 0000000000..4d56d648c4 --- /dev/null +++ b/data/fixtures/scopes/ruby/argument.actual2.scope @@ -0,0 +1,33 @@ +foo{ |aaa, bbb| } +--- + +[#1 Content] = +[#1 Domain] = 0:6-0:9 + >---< +0| foo{ |aaa, bbb| } + +[#1 Removal] = 0:6-0:11 + >-----< +0| foo{ |aaa, bbb| } + +[#1 Trailing delimiter] = 0:9-0:11 + >--< +0| foo{ |aaa, bbb| } + +[#1 Insertion delimiter] = ", " + + +[#2 Content] = +[#2 Domain] = 0:11-0:14 + >---< +0| foo{ |aaa, bbb| } + +[#2 Removal] = 0:9-0:14 + >-----< +0| foo{ |aaa, bbb| } + +[#2 Leading delimiter] = 0:9-0:11 + >--< +0| foo{ |aaa, bbb| } + +[#2 Insertion delimiter] = ", " diff --git a/data/fixtures/scopes/ruby/argument.formal.iteration.scope b/data/fixtures/scopes/ruby/argument.formal.iteration.scope new file mode 100644 index 0000000000..abc22d6b8d --- /dev/null +++ b/data/fixtures/scopes/ruby/argument.formal.iteration.scope @@ -0,0 +1,10 @@ +def foo(aaa, bbb) +--- + +[Range] = 0:8-0:16 + >--------< +0| def foo(aaa, bbb) + +[Domain] = 0:0-0:17 + >-----------------< +0| def foo(aaa, bbb) diff --git a/data/fixtures/scopes/ruby/argument.formal.scope b/data/fixtures/scopes/ruby/argument.formal.scope new file mode 100644 index 0000000000..1368360555 --- /dev/null +++ b/data/fixtures/scopes/ruby/argument.formal.scope @@ -0,0 +1,33 @@ +def foo(aaa, bbb) +--- + +[#1 Content] = +[#1 Domain] = 0:8-0:11 + >---< +0| def foo(aaa, bbb) + +[#1 Removal] = 0:8-0:13 + >-----< +0| def foo(aaa, bbb) + +[#1 Trailing delimiter] = 0:11-0:13 + >--< +0| def foo(aaa, bbb) + +[#1 Insertion delimiter] = ", " + + +[#2 Content] = +[#2 Domain] = 0:13-0:16 + >---< +0| def foo(aaa, bbb) + +[#2 Removal] = 0:11-0:16 + >-----< +0| def foo(aaa, bbb) + +[#2 Leading delimiter] = 0:11-0:13 + >--< +0| def foo(aaa, bbb) + +[#2 Insertion delimiter] = ", " diff --git a/data/fixtures/scopes/ruby/argumentList.actual.empty.scope b/data/fixtures/scopes/ruby/argumentList.actual.empty.scope new file mode 100644 index 0000000000..947915ef96 --- /dev/null +++ b/data/fixtures/scopes/ruby/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/ruby/argumentList.actual.multiLine.scope b/data/fixtures/scopes/ruby/argumentList.actual.multiLine.scope new file mode 100644 index 0000000000..642614d02e --- /dev/null +++ b/data/fixtures/scopes/ruby/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/ruby/argumentList.actual.singleLine.scope b/data/fixtures/scopes/ruby/argumentList.actual.singleLine.scope new file mode 100644 index 0000000000..f0de18dd5d --- /dev/null +++ b/data/fixtures/scopes/ruby/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/ruby/argumentList.formal.empty.scope b/data/fixtures/scopes/ruby/argumentList.formal.empty.scope new file mode 100644 index 0000000000..524129589c --- /dev/null +++ b/data/fixtures/scopes/ruby/argumentList.formal.empty.scope @@ -0,0 +1,13 @@ +def foo() +--- + +[Content] = +[Removal] = 0:8-0:8 + >< +0| def foo() + +[Domain] = 0:0-0:9 + >---------< +0| def foo() + +[Insertion delimiter] = "" diff --git a/data/fixtures/scopes/ruby/argumentList.formal.empty2.scope b/data/fixtures/scopes/ruby/argumentList.formal.empty2.scope new file mode 100644 index 0000000000..94f00ccc65 --- /dev/null +++ b/data/fixtures/scopes/ruby/argumentList.formal.empty2.scope @@ -0,0 +1,13 @@ +foo{ || } +--- + +[Content] = +[Removal] = 0:6-0:6 + >< +0| foo{ || } + +[Domain] = 0:0-0:9 + >---------< +0| foo{ || } + +[Insertion delimiter] = "" diff --git a/data/fixtures/scopes/ruby/argumentList.formal.multiLine.scope b/data/fixtures/scopes/ruby/argumentList.formal.multiLine.scope new file mode 100644 index 0000000000..a4f2d57562 --- /dev/null +++ b/data/fixtures/scopes/ruby/argumentList.formal.multiLine.scope @@ -0,0 +1,33 @@ +def foo( + aaa, + bbb +) +--- + +[Content] = 1:4-2:7 + >---- +1| aaa, +2| bbb + -------< + +[Removal] = 0:8-3:0 + > +0| def foo( +1| aaa, +2| bbb +3| ) + < + +[Leading delimiter] = 1:0-1:4 + >----< +1| aaa, + +[Domain] = 0:0-3:1 + >-------- +0| def foo( +1| aaa, +2| bbb +3| ) + -< + +[Insertion delimiter] = ",\n" diff --git a/data/fixtures/scopes/ruby/argumentList.formal.multiLine2.scope b/data/fixtures/scopes/ruby/argumentList.formal.multiLine2.scope new file mode 100644 index 0000000000..9ff1ceba45 --- /dev/null +++ b/data/fixtures/scopes/ruby/argumentList.formal.multiLine2.scope @@ -0,0 +1,33 @@ +foo{ | + aaa, + bbb +| } +--- + +[Content] = 1:4-2:7 + >---- +1| aaa, +2| bbb + -------< + +[Removal] = 0:6-3:0 + > +0| foo{ | +1| aaa, +2| bbb +3| | } + < + +[Leading delimiter] = 1:0-1:4 + >----< +1| aaa, + +[Domain] = 0:0-3:3 + >------ +0| foo{ | +1| aaa, +2| bbb +3| | } + ---< + +[Insertion delimiter] = ",\n" diff --git a/data/fixtures/scopes/ruby/argumentList.formal.singleLine.scope b/data/fixtures/scopes/ruby/argumentList.formal.singleLine.scope new file mode 100644 index 0000000000..f6572e704f --- /dev/null +++ b/data/fixtures/scopes/ruby/argumentList.formal.singleLine.scope @@ -0,0 +1,13 @@ +def foo(aaa, bbb) +--- + +[Content] = +[Removal] = 0:8-0:16 + >--------< +0| def foo(aaa, bbb) + +[Domain] = 0:0-0:17 + >-----------------< +0| def foo(aaa, bbb) + +[Insertion delimiter] = ", " diff --git a/data/fixtures/scopes/ruby/argumentList.formal.singleLine2.scope b/data/fixtures/scopes/ruby/argumentList.formal.singleLine2.scope new file mode 100644 index 0000000000..ab36f841fd --- /dev/null +++ b/data/fixtures/scopes/ruby/argumentList.formal.singleLine2.scope @@ -0,0 +1,13 @@ +foo{ |aaa, bbb| } +--- + +[Content] = +[Removal] = 0:6-0:14 + >--------< +0| foo{ |aaa, bbb| } + +[Domain] = 0:0-0:17 + >-----------------< +0| foo{ |aaa, bbb| } + +[Insertion delimiter] = ", " diff --git a/packages/common/src/scopeSupportFacets/ruby.ts b/packages/common/src/scopeSupportFacets/ruby.ts index 93670e3aad..05fdded957 100644 --- a/packages/common/src/scopeSupportFacets/ruby.ts +++ b/packages/common/src/scopeSupportFacets/ruby.ts @@ -8,4 +8,16 @@ export const rubyScopeSupport: LanguageScopeSupportFacetMap = { "comment.line": supported, "comment.block": supported, disqualifyDelimiter: supported, + + "argument.actual": supported, + "argument.actual.iteration": supported, + "argument.formal": supported, + "argument.formal.iteration": supported, + + "argumentList.actual.empty": supported, + "argumentList.actual.singleLine": supported, + "argumentList.actual.multiLine": supported, + "argumentList.formal.empty": supported, + "argumentList.formal.singleLine": supported, + "argumentList.formal.multiLine": supported, }; diff --git a/queries/ruby.scm b/queries/ruby.scm index ce5aac6030..6f6c831deb 100644 --- a/queries/ruby.scm +++ b/queries/ruby.scm @@ -299,8 +299,8 @@ operator: [ (#single-or-multi-line-delimiter! @argumentOrParameter @_dummy ", " ",\n") ) -;;!! { |aaa, bbb| } -;;! ^^^ ^^^ +;;!! foo{ |aaa, bbb| } +;;! ^^^ ^^^ ( (block_parameters (_)? @_.leading.endOf @@ -316,28 +316,33 @@ operator: [ ;;! ^^^^^^^^ (_ (method_parameters - "(" @argumentList.start.endOf @argumentOrParameter.iteration.start.endOf - ")" @argumentList.end.startOf @argumentOrParameter.iteration.end.startOf - ) @_dummy - (#empty-single-multi-delimiter! @argumentList.start.endOf @_dummy "" ", " ",\n") + "(" @argumentList.removal.start.endOf @argumentOrParameter.iteration.start.endOf + ")" @argumentList.removal.end.startOf @argumentOrParameter.iteration.end.startOf + ) @argumentList + (#child-range! @argumentList 1 -2) + (#empty-single-multi-delimiter! @argumentList @argumentList "" ", " ",\n") ) @argumentList.domain @argumentOrParameter.iteration.domain ;;!! foo(aaa, bbb) ;;! ^^^^^^^^ (_ (argument_list - "(" @argumentList.start.endOf @argumentOrParameter.iteration.start.endOf - ")" @argumentList.end.startOf @argumentOrParameter.iteration.end.startOf - ) @_dummy - (#empty-single-multi-delimiter! @argumentList.start.endOf @_dummy "" ", " ",\n") + "(" @argumentList.removal.start.endOf @argumentOrParameter.iteration.start.endOf + ")" @argumentList.removal.end.startOf @argumentOrParameter.iteration.end.startOf + ) @argumentList + (#child-range! @argumentList 1 -2) + (#empty-single-multi-delimiter! @argumentList @argumentList "" ", " ",\n") ) @argumentList.domain @argumentOrParameter.iteration.domain -;;!! { |aaa, bbb| } -;;! ^^^^^^^^ -(_ - (block_parameters - "|" @argumentList.start.endOf @argumentOrParameter.iteration.start.endOf - "|" @argumentList.end.startOf @argumentOrParameter.iteration.end.startOf - ) @_dummy - (#empty-single-multi-delimiter! @argumentList.start.endOf @_dummy "" ", " ",\n") +;;!! foo{ |aaa, bbb| } +;;! ^^^^^^^^ +(call + (block + (block_parameters + "|" @argumentList.removal.start.endOf @argumentOrParameter.iteration.start.endOf + "|" @argumentList.removal.end.startOf @argumentOrParameter.iteration.end.startOf + ) @argumentList + (#child-range! @argumentList 1 -2) + (#empty-single-multi-delimiter! @argumentList @argumentList "" ", " ",\n") + ) ) @argumentList.domain @argumentOrParameter.iteration.domain From 4c4add633fc4f6edca456b6a6c8d7169c3753f52 Mon Sep 17 00:00:00 2001 From: Andreas Arvidsson Date: Tue, 10 Jun 2025 09:40:42 +0200 Subject: [PATCH 11/13] scala --- .../scala/argument.actual.iteration.scope | 10 ++++++ .../scopes/scala/argument.actual.scope | 33 +++++++++++++++++++ .../scala/argument.formal.iteration.scope | 10 ++++++ .../scala/argument.formal.iteration2.scope | 10 ++++++ .../scopes/scala/argument.formal.scope | 33 +++++++++++++++++++ .../scopes/scala/argument.formal2.scope | 33 +++++++++++++++++++ .../scala/argumentList.actual.empty.scope | 13 ++++++++ .../scala/argumentList.actual.multiLine.scope | 33 +++++++++++++++++++ .../argumentList.actual.singleLine.scope | 13 ++++++++ .../scala/argumentList.formal.empty.scope | 13 ++++++++ .../scala/argumentList.formal.empty2.scope | 13 ++++++++ .../scala/argumentList.formal.multiLine.scope | 33 +++++++++++++++++++ .../argumentList.formal.multiLine2.scope | 33 +++++++++++++++++++ .../argumentList.formal.singleLine.scope | 13 ++++++++ .../argumentList.formal.singleLine2.scope | 13 ++++++++ .../common/src/scopeSupportFacets/scala.ts | 12 +++++++ queries/scala.scm | 33 ++++++++++++------- 17 files changed, 339 insertions(+), 12 deletions(-) create mode 100644 data/fixtures/scopes/scala/argument.actual.iteration.scope create mode 100644 data/fixtures/scopes/scala/argument.actual.scope create mode 100644 data/fixtures/scopes/scala/argument.formal.iteration.scope create mode 100644 data/fixtures/scopes/scala/argument.formal.iteration2.scope create mode 100644 data/fixtures/scopes/scala/argument.formal.scope create mode 100644 data/fixtures/scopes/scala/argument.formal2.scope create mode 100644 data/fixtures/scopes/scala/argumentList.actual.empty.scope create mode 100644 data/fixtures/scopes/scala/argumentList.actual.multiLine.scope create mode 100644 data/fixtures/scopes/scala/argumentList.actual.singleLine.scope create mode 100644 data/fixtures/scopes/scala/argumentList.formal.empty.scope create mode 100644 data/fixtures/scopes/scala/argumentList.formal.empty2.scope create mode 100644 data/fixtures/scopes/scala/argumentList.formal.multiLine.scope create mode 100644 data/fixtures/scopes/scala/argumentList.formal.multiLine2.scope create mode 100644 data/fixtures/scopes/scala/argumentList.formal.singleLine.scope create mode 100644 data/fixtures/scopes/scala/argumentList.formal.singleLine2.scope diff --git a/data/fixtures/scopes/scala/argument.actual.iteration.scope b/data/fixtures/scopes/scala/argument.actual.iteration.scope new file mode 100644 index 0000000000..c9fcfe46b8 --- /dev/null +++ b/data/fixtures/scopes/scala/argument.actual.iteration.scope @@ -0,0 +1,10 @@ +foo(aaa, bbb) +--- + +[Range] = 0:4-0:12 + >--------< +0| foo(aaa, bbb) + +[Domain] = 0:0-0:13 + >-------------< +0| foo(aaa, bbb) diff --git a/data/fixtures/scopes/scala/argument.actual.scope b/data/fixtures/scopes/scala/argument.actual.scope new file mode 100644 index 0000000000..b1a9403ff3 --- /dev/null +++ b/data/fixtures/scopes/scala/argument.actual.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/scala/argument.formal.iteration.scope b/data/fixtures/scopes/scala/argument.formal.iteration.scope new file mode 100644 index 0000000000..160e602e78 --- /dev/null +++ b/data/fixtures/scopes/scala/argument.formal.iteration.scope @@ -0,0 +1,10 @@ +def foo(aaa: Int, bbb: Int) = x +--- + +[Range] = 0:8-0:26 + >------------------< +0| def foo(aaa: Int, bbb: Int) = x + +[Domain] = 0:0-0:31 + >-------------------------------< +0| def foo(aaa: Int, bbb: Int) = x diff --git a/data/fixtures/scopes/scala/argument.formal.iteration2.scope b/data/fixtures/scopes/scala/argument.formal.iteration2.scope new file mode 100644 index 0000000000..399eb38f81 --- /dev/null +++ b/data/fixtures/scopes/scala/argument.formal.iteration2.scope @@ -0,0 +1,10 @@ +class Foo(aaa: Int, bbb: Int) {} +--- + +[Range] = 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/scala/argument.formal.scope b/data/fixtures/scopes/scala/argument.formal.scope new file mode 100644 index 0000000000..d36a8373a6 --- /dev/null +++ b/data/fixtures/scopes/scala/argument.formal.scope @@ -0,0 +1,33 @@ +def foo(aaa: Int, bbb: Int) = x +--- + +[#1 Content] = +[#1 Domain] = 0:8-0:16 + >--------< +0| def foo(aaa: Int, bbb: Int) = x + +[#1 Removal] = 0:8-0:18 + >----------< +0| def foo(aaa: Int, bbb: Int) = x + +[#1 Trailing delimiter] = 0:16-0:18 + >--< +0| def foo(aaa: Int, bbb: Int) = x + +[#1 Insertion delimiter] = ", " + + +[#2 Content] = +[#2 Domain] = 0:18-0:26 + >--------< +0| def foo(aaa: Int, bbb: Int) = x + +[#2 Removal] = 0:16-0:26 + >----------< +0| def foo(aaa: Int, bbb: Int) = x + +[#2 Leading delimiter] = 0:16-0:18 + >--< +0| def foo(aaa: Int, bbb: Int) = x + +[#2 Insertion delimiter] = ", " diff --git a/data/fixtures/scopes/scala/argument.formal2.scope b/data/fixtures/scopes/scala/argument.formal2.scope new file mode 100644 index 0000000000..96d00be9c3 --- /dev/null +++ b/data/fixtures/scopes/scala/argument.formal2.scope @@ -0,0 +1,33 @@ +class Foo(aaa: Int, bbb: Int) {} +--- + +[#1 Content] = +[#1 Domain] = 0:10-0:18 + >--------< +0| class Foo(aaa: Int, bbb: Int) {} + +[#1 Removal] = 0:10-0:20 + >----------< +0| class Foo(aaa: Int, bbb: Int) {} + +[#1 Trailing delimiter] = 0:18-0:20 + >--< +0| class Foo(aaa: Int, bbb: Int) {} + +[#1 Insertion delimiter] = ", " + + +[#2 Content] = +[#2 Domain] = 0:20-0:28 + >--------< +0| class Foo(aaa: Int, bbb: Int) {} + +[#2 Removal] = 0:18-0:28 + >----------< +0| class Foo(aaa: Int, bbb: Int) {} + +[#2 Leading delimiter] = 0:18-0:20 + >--< +0| class Foo(aaa: Int, bbb: Int) {} + +[#2 Insertion delimiter] = ", " diff --git a/data/fixtures/scopes/scala/argumentList.actual.empty.scope b/data/fixtures/scopes/scala/argumentList.actual.empty.scope new file mode 100644 index 0000000000..947915ef96 --- /dev/null +++ b/data/fixtures/scopes/scala/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/scala/argumentList.actual.multiLine.scope b/data/fixtures/scopes/scala/argumentList.actual.multiLine.scope new file mode 100644 index 0000000000..642614d02e --- /dev/null +++ b/data/fixtures/scopes/scala/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/scala/argumentList.actual.singleLine.scope b/data/fixtures/scopes/scala/argumentList.actual.singleLine.scope new file mode 100644 index 0000000000..f0de18dd5d --- /dev/null +++ b/data/fixtures/scopes/scala/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/scala/argumentList.formal.empty.scope b/data/fixtures/scopes/scala/argumentList.formal.empty.scope new file mode 100644 index 0000000000..f51137bcb1 --- /dev/null +++ b/data/fixtures/scopes/scala/argumentList.formal.empty.scope @@ -0,0 +1,13 @@ +def foo() = x +--- + +[Content] = +[Removal] = 0:8-0:8 + >< +0| def foo() = x + +[Domain] = 0:0-0:13 + >-------------< +0| def foo() = x + +[Insertion delimiter] = "" diff --git a/data/fixtures/scopes/scala/argumentList.formal.empty2.scope b/data/fixtures/scopes/scala/argumentList.formal.empty2.scope new file mode 100644 index 0000000000..ef9aee1a16 --- /dev/null +++ b/data/fixtures/scopes/scala/argumentList.formal.empty2.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/scala/argumentList.formal.multiLine.scope b/data/fixtures/scopes/scala/argumentList.formal.multiLine.scope new file mode 100644 index 0000000000..6334ade756 --- /dev/null +++ b/data/fixtures/scopes/scala/argumentList.formal.multiLine.scope @@ -0,0 +1,33 @@ +def foo( + aaa: Int, + bbb: Int +) = x +--- + +[Content] = 1:4-2:12 + >--------- +1| aaa: Int, +2| bbb: Int + ------------< + +[Removal] = 0:8-3:0 + > +0| def foo( +1| aaa: Int, +2| bbb: Int +3| ) = x + < + +[Leading delimiter] = 1:0-1:4 + >----< +1| aaa: Int, + +[Domain] = 0:0-3:5 + >-------- +0| def foo( +1| aaa: Int, +2| bbb: Int +3| ) = x + -----< + +[Insertion delimiter] = ",\n" diff --git a/data/fixtures/scopes/scala/argumentList.formal.multiLine2.scope b/data/fixtures/scopes/scala/argumentList.formal.multiLine2.scope new file mode 100644 index 0000000000..b6169a8c3e --- /dev/null +++ b/data/fixtures/scopes/scala/argumentList.formal.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/scala/argumentList.formal.singleLine.scope b/data/fixtures/scopes/scala/argumentList.formal.singleLine.scope new file mode 100644 index 0000000000..d09bab3082 --- /dev/null +++ b/data/fixtures/scopes/scala/argumentList.formal.singleLine.scope @@ -0,0 +1,13 @@ +def foo(aaa: Int, bbb: Int) = x +--- + +[Content] = +[Removal] = 0:8-0:26 + >------------------< +0| def foo(aaa: Int, bbb: Int) = x + +[Domain] = 0:0-0:31 + >-------------------------------< +0| def foo(aaa: Int, bbb: Int) = x + +[Insertion delimiter] = ", " diff --git a/data/fixtures/scopes/scala/argumentList.formal.singleLine2.scope b/data/fixtures/scopes/scala/argumentList.formal.singleLine2.scope new file mode 100644 index 0000000000..2c4a96e79b --- /dev/null +++ b/data/fixtures/scopes/scala/argumentList.formal.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/packages/common/src/scopeSupportFacets/scala.ts b/packages/common/src/scopeSupportFacets/scala.ts index 47919c98ef..0b4ec56e63 100644 --- a/packages/common/src/scopeSupportFacets/scala.ts +++ b/packages/common/src/scopeSupportFacets/scala.ts @@ -7,4 +7,16 @@ const { supported, unsupported, notApplicable } = ScopeSupportFacetLevel; export const scalaScopeSupport: LanguageScopeSupportFacetMap = { ifStatement: supported, disqualifyDelimiter: supported, + + "argument.actual": supported, + "argument.actual.iteration": supported, + "argument.formal": supported, + "argument.formal.iteration": supported, + + "argumentList.actual.empty": supported, + "argumentList.actual.singleLine": supported, + "argumentList.actual.multiLine": supported, + "argumentList.formal.empty": supported, + "argumentList.formal.singleLine": supported, + "argumentList.formal.multiLine": supported, }; diff --git a/queries/scala.scm b/queries/scala.scm index f1e6e46f0d..33048fa4ec 100644 --- a/queries/scala.scm +++ b/queries/scala.scm @@ -147,28 +147,37 @@ (#single-or-multi-line-delimiter! @argumentOrParameter @_dummy ", " ",\n") ) +;;!! class Foo(aaa: Int, bbb: Int) {} +;;! ^^^^^^^^^^^^^^^^^^ (_ (class_parameters - "(" @argumentList.start.endOf @argumentOrParameter.iteration.start.endOf - ")" @argumentList.end.startOf @argumentOrParameter.iteration.end.startOf - ) @_dummy - (#empty-single-multi-delimiter! @argumentList.start.endOf @_dummy "" ", " ",\n") + "(" @argumentList.removal.start.endOf @argumentOrParameter.iteration.start.endOf + ")" @argumentList.removal.end.startOf @argumentOrParameter.iteration.end.startOf + ) @argumentList + (#child-range! @argumentList 1 -2) + (#empty-single-multi-delimiter! @argumentList @argumentList "" ", " ",\n") ) @argumentList.domain @argumentOrParameter.iteration.domain +;;!! def foo(aaa: Int, bbb: Int) = x +;;! ^^^^^^^^^^^^^^^^^^ (_ (parameters - "(" @argumentList.start.endOf @argumentOrParameter.iteration.start.endOf - ")" @argumentList.end.startOf @argumentOrParameter.iteration.end.startOf - ) @_dummy - (#empty-single-multi-delimiter! @argumentList.start.endOf @_dummy "" ", " ",\n") + "(" @argumentList.removal.start.endOf @argumentOrParameter.iteration.start.endOf + ")" @argumentList.removal.end.startOf @argumentOrParameter.iteration.end.startOf + ) @argumentList + (#child-range! @argumentList 1 -2) + (#empty-single-multi-delimiter! @argumentList @argumentList "" ", " ",\n") ) @argumentList.domain @argumentOrParameter.iteration.domain +;;!! foo(aaa, bbb) +;;! ^^^^^^^^ (_ (arguments - "(" @argumentList.start.endOf @argumentOrParameter.iteration.start.endOf - ")" @argumentList.end.startOf @argumentOrParameter.iteration.end.startOf - ) @_dummy - (#empty-single-multi-delimiter! @argumentList.start.endOf @_dummy "" ", " ",\n") + "(" @argumentList.removal.start.endOf @argumentOrParameter.iteration.start.endOf + ")" @argumentList.removal.end.startOf @argumentOrParameter.iteration.end.startOf + ) @argumentList + (#child-range! @argumentList 1 -2) + (#empty-single-multi-delimiter! @argumentList @argumentList "" ", " ",\n") ) @argumentList.domain @argumentOrParameter.iteration.domain operator: (operator_identifier) @disqualifyDelimiter From cd11a4e47e608322ebc8be139c07a7098b7abcec Mon Sep 17 00:00:00 2001 From: Andreas Arvidsson Date: Tue, 10 Jun 2025 09:52:06 +0200 Subject: [PATCH 12/13] talon --- .../talon/argument.actual.iteration3.scope | 10 ++++++++ .../scopes/talon/argument.actual3.scope | 10 ++++++++ queries/scm.scm | 2 ++ queries/talon.scm | 23 ++++++++----------- 4 files changed, 31 insertions(+), 14 deletions(-) create mode 100644 data/fixtures/scopes/talon/argument.actual.iteration3.scope create mode 100644 data/fixtures/scopes/talon/argument.actual3.scope diff --git a/data/fixtures/scopes/talon/argument.actual.iteration3.scope b/data/fixtures/scopes/talon/argument.actual.iteration3.scope new file mode 100644 index 0000000000..f828b67644 --- /dev/null +++ b/data/fixtures/scopes/talon/argument.actual.iteration3.scope @@ -0,0 +1,10 @@ +command: sleep(100ms) +--- + +[Range] = 0:15-0:20 + >-----< +0| command: sleep(100ms) + +[Domain] = 0:9-0:21 + >------------< +0| command: sleep(100ms) diff --git a/data/fixtures/scopes/talon/argument.actual3.scope b/data/fixtures/scopes/talon/argument.actual3.scope new file mode 100644 index 0000000000..680eb02256 --- /dev/null +++ b/data/fixtures/scopes/talon/argument.actual3.scope @@ -0,0 +1,10 @@ +command: sleep(100ms) +--- + +[Content] = +[Removal] = +[Domain] = 0:15-0:20 + >-----< +0| command: sleep(100ms) + +[Insertion delimiter] = " " diff --git a/queries/scm.scm b/queries/scm.scm index a7fb91f240..e4c56b35aa 100644 --- a/queries/scm.scm +++ b/queries/scm.scm @@ -43,6 +43,8 @@ ) ) +;;!! (#aaa? @bbb "ccc") +;;! ^^^^^^^^^^ ( (predicate (parameters) @argumentList @argumentOrParameter.iteration diff --git a/queries/talon.scm b/queries/talon.scm index 5f793f9aad..8a8f56fef6 100644 --- a/queries/talon.scm +++ b/queries/talon.scm @@ -157,20 +157,14 @@ ;;!! key(enter) ;;! ^^^^^ (key_action - (implicit_string) @argumentOrParameter @argumentList -) @argumentList.domain - -;;!! key(enter) -;;! ^^^^^ -(_ - (implicit_string) @argumentOrParameter.iteration -) @argumentOrParameter.iteration.domain + (implicit_string) @argumentOrParameter @argumentOrParameter.iteration @argumentList +) @argumentOrParameter.iteration.domain @argumentList.domain ;;!! sleep(100ms) ;;! ^^^^^ (sleep_action - (implicit_string) @argumentOrParameter @argumentList -) @argumentList.domain + (implicit_string) @argumentOrParameter @argumentOrParameter.iteration @argumentList +) @argumentOrParameter.iteration.domain @argumentList.domain ;;!! print("hello", "world") ;;! ^^^^^^^ ^^^^^^^ @@ -187,10 +181,11 @@ (_ (argument_list - "(" @argumentList.start.endOf @argumentOrParameter.iteration.start.endOf - ")" @argumentList.end.startOf @argumentOrParameter.iteration.end.startOf - ) @_dummy - (#empty-single-multi-delimiter! @argumentList.start.endOf @_dummy "" ", " ",\n") + "(" @argumentList.removal.start.endOf @argumentOrParameter.iteration.start.endOf + ")" @argumentList.removal.end.startOf @argumentOrParameter.iteration.end.startOf + ) @argumentList + (#child-range! @argumentList 1 -2) + (#empty-single-multi-delimiter! @argumentList @argumentList "" ", " ",\n") ) @argumentList.domain @argumentOrParameter.iteration.domain ;;!! # foo From d55930cccc98528accb90a46a19f74848f886eb9 Mon Sep 17 00:00:00 2001 From: Andreas Arvidsson Date: Tue, 10 Jun 2025 09:53:50 +0200 Subject: [PATCH 13/13] Cleanup --- queries/python.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/queries/python.scm b/queries/python.scm index d0e75f1346..d346acea4a 100644 --- a/queries/python.scm +++ b/queries/python.scm @@ -691,8 +691,8 @@ ;;!! ^^^^^^^^^^^^^^^^^^^^^^^^^^ (call (generator_expression - "(" @argumentOrParameter.iteration.start.endOf - ")" @argumentOrParameter.iteration.end.startOf + "(" @argumentList.removal.start.endOf @argumentOrParameter.iteration.start.endOf + ")" @argumentList.removal.end.startOf @argumentOrParameter.iteration.end.startOf ) @argumentList (#child-range! @argumentList 1 -2) ) @argumentList.domain @argumentOrParameter.iteration.domain