From c0a5b9b9cb9dfbafc23cdfaef1a8b08f46f0d15a Mon Sep 17 00:00:00 2001 From: Andreas Arvidsson Date: Tue, 10 Feb 2026 11:32:54 +0100 Subject: [PATCH 1/6] Working on more scope facets --- .../scopes/cpp/anonymousFunction.scope | 13 +--- ...ame.argument.formal.lambda.iteration.scope | 13 ++++ ...ype.argument.formal.lambda.iteration.scope | 13 ++++ ...ame.argument.formal.lambda.iteration.scope | 7 ++ .../python/name/name.resource.iteration.scope | 16 ---- .../scopes/python/name/name.resource.scope | 14 ++-- .../scopes/python/name/name.resource2.scope | 69 ----------------- .../scopes/python/name/name.resource3.scope | 72 ----------------- .../value/value.resource.iteration.scope | 16 ---- .../value/value.resource.iteration2.scope | 16 ---- .../scopes/python/value/value.resource.scope | 20 ----- .../scopes/python/value/value.resource2.scope | 66 ---------------- .../scopes/python/value/value.resource3.scope | 20 ----- .../scopes/python/value/value.resource4.scope | 69 ----------------- .../scopes/python/value/value.resource5.scope | 72 ----------------- data/scopeSupportFacetInfos.md | 30 ++++---- packages/common/src/scopeSupportFacets/c.ts | 10 ++- packages/common/src/scopeSupportFacets/cpp.ts | 4 + .../common/src/scopeSupportFacets/csharp.ts | 8 +- packages/common/src/scopeSupportFacets/css.ts | 8 +- packages/common/src/scopeSupportFacets/go.ts | 8 +- .../common/src/scopeSupportFacets/html.ts | 8 +- .../common/src/scopeSupportFacets/java.ts | 10 +-- .../src/scopeSupportFacets/javascript.ts | 8 +- .../common/src/scopeSupportFacets/json.ts | 8 +- .../common/src/scopeSupportFacets/kotlin.ts | 8 +- .../common/src/scopeSupportFacets/latex.ts | 8 +- packages/common/src/scopeSupportFacets/lua.ts | 8 +- .../common/src/scopeSupportFacets/markdown.ts | 8 +- .../src/scopeSupportFacets/properties.ts | 8 +- .../common/src/scopeSupportFacets/python.ts | 10 ++- packages/common/src/scopeSupportFacets/r.ts | 1 - .../common/src/scopeSupportFacets/rust.ts | 8 +- .../common/src/scopeSupportFacets/scala.ts | 8 +- packages/common/src/scopeSupportFacets/scm.ts | 8 +- .../scopeSupportFacetInfos.ts | 59 +++++++------- .../scopeSupportFacets.types.ts | 8 +- .../common/src/scopeSupportFacets/talon.ts | 8 +- .../src/scopeSupportFacets/talonList.ts | 8 +- .../src/scopeSupportFacets/typescript.ts | 2 + packages/common/src/scopeSupportFacets/xml.ts | 8 +- .../common/src/scopeSupportFacets/yaml.ts | 8 +- queries/python.scm | 77 +------------------ 43 files changed, 213 insertions(+), 638 deletions(-) create mode 100644 data/fixtures/scopes/cpp/name/name.argument.formal.lambda.iteration.scope create mode 100644 data/fixtures/scopes/cpp/type/type.argument.formal.lambda.iteration.scope create mode 100644 data/fixtures/scopes/python/name/name.argument.formal.lambda.iteration.scope delete mode 100644 data/fixtures/scopes/python/name/name.resource.iteration.scope delete mode 100644 data/fixtures/scopes/python/name/name.resource2.scope delete mode 100644 data/fixtures/scopes/python/name/name.resource3.scope delete mode 100644 data/fixtures/scopes/python/value/value.resource.iteration.scope delete mode 100644 data/fixtures/scopes/python/value/value.resource.iteration2.scope delete mode 100644 data/fixtures/scopes/python/value/value.resource.scope delete mode 100644 data/fixtures/scopes/python/value/value.resource2.scope delete mode 100644 data/fixtures/scopes/python/value/value.resource3.scope delete mode 100644 data/fixtures/scopes/python/value/value.resource4.scope delete mode 100644 data/fixtures/scopes/python/value/value.resource5.scope diff --git a/data/fixtures/scopes/cpp/anonymousFunction.scope b/data/fixtures/scopes/cpp/anonymousFunction.scope index 34a003480c..44426a869d 100644 --- a/data/fixtures/scopes/cpp/anonymousFunction.scope +++ b/data/fixtures/scopes/cpp/anonymousFunction.scope @@ -1,15 +1,10 @@ -[]() { - return 0; -}; +[]() {} --- [Content] = [Removal] = -[Domain] = 0:0-2:1 - >------ -0| []() { -1| return 0; -2| }; - -< +[Domain] = 0:0-0:7 + >-------< +0| []() {} [Insertion delimiter] = "\n" diff --git a/data/fixtures/scopes/cpp/name/name.argument.formal.lambda.iteration.scope b/data/fixtures/scopes/cpp/name/name.argument.formal.lambda.iteration.scope new file mode 100644 index 0000000000..a74a2e4ade --- /dev/null +++ b/data/fixtures/scopes/cpp/name/name.argument.formal.lambda.iteration.scope @@ -0,0 +1,13 @@ +[](int aaa, int bbb) {} +--- + +[#1 Content] = +[#1 Domain] = 0:0-0:23 + >-----------------------< +0| [](int aaa, int bbb) {} + + +[#2 Content] = +[#2 Domain] = 0:3-0:19 + >----------------< +0| [](int aaa, int bbb) {} diff --git a/data/fixtures/scopes/cpp/type/type.argument.formal.lambda.iteration.scope b/data/fixtures/scopes/cpp/type/type.argument.formal.lambda.iteration.scope new file mode 100644 index 0000000000..a74a2e4ade --- /dev/null +++ b/data/fixtures/scopes/cpp/type/type.argument.formal.lambda.iteration.scope @@ -0,0 +1,13 @@ +[](int aaa, int bbb) {} +--- + +[#1 Content] = +[#1 Domain] = 0:0-0:23 + >-----------------------< +0| [](int aaa, int bbb) {} + + +[#2 Content] = +[#2 Domain] = 0:3-0:19 + >----------------< +0| [](int aaa, int bbb) {} diff --git a/data/fixtures/scopes/python/name/name.argument.formal.lambda.iteration.scope b/data/fixtures/scopes/python/name/name.argument.formal.lambda.iteration.scope new file mode 100644 index 0000000000..f85311307a --- /dev/null +++ b/data/fixtures/scopes/python/name/name.argument.formal.lambda.iteration.scope @@ -0,0 +1,7 @@ +foo = lambda aaa, bbb: aaa + bbb +--- + +[Content] = +[Domain] = 0:0-0:32 + >--------------------------------< +0| foo = lambda aaa, bbb: aaa + bbb diff --git a/data/fixtures/scopes/python/name/name.resource.iteration.scope b/data/fixtures/scopes/python/name/name.resource.iteration.scope deleted file mode 100644 index b014dd3e66..0000000000 --- a/data/fixtures/scopes/python/name/name.resource.iteration.scope +++ /dev/null @@ -1,16 +0,0 @@ -with foo, bar as baz: pass ---- - -[#1 Content] = 0:5-0:20 - >---------------< -0| with foo, bar as baz: pass - -[#1 Domain] = 0:0-0:26 - >--------------------------< -0| with foo, bar as baz: pass - - -[#2 Content] = -[#2 Domain] = 0:22-0:26 - >----< -0| with foo, bar as baz: pass diff --git a/data/fixtures/scopes/python/name/name.resource.scope b/data/fixtures/scopes/python/name/name.resource.scope index 42704cdf14..5c7e7f30b3 100644 --- a/data/fixtures/scopes/python/name/name.resource.scope +++ b/data/fixtures/scopes/python/name/name.resource.scope @@ -1,16 +1,16 @@ -with foo as bar: pass +with foo: pass --- -[Content] = 0:12-0:15 - >---< +[Content] = 0:5-0:15 + >----------< 0| with foo as bar: pass -[Removal] = 0:8-0:15 - >-------< +[Removal] = 0:4-0:15 + >-----------< 0| with foo as bar: pass -[Leading delimiter] = 0:8-0:12 - >----< +[Leading delimiter] = 0:4-0:5 + >-< 0| with foo as bar: pass [Domain] = 0:0-0:21 diff --git a/data/fixtures/scopes/python/name/name.resource2.scope b/data/fixtures/scopes/python/name/name.resource2.scope deleted file mode 100644 index bb2a8a74ce..0000000000 --- a/data/fixtures/scopes/python/name/name.resource2.scope +++ /dev/null @@ -1,69 +0,0 @@ -with foo, bar as baz: pass ---- - -[#1.1 Content] = 0:5-0:8 - >---< -0| with foo, bar as baz: pass - -[#1.1 Removal] = 0:5-0:10 - >-----< -0| with foo, bar as baz: pass - -[#1.1 Trailing delimiter] = 0:8-0:10 - >--< -0| with foo, bar as baz: pass - -[#1.1 Insertion delimiter] = " " - -[#1.2 Content] = 0:17-0:20 - >---< -0| with foo, bar as baz: pass - -[#1.2 Removal] = 0:13-0:20 - >-------< -0| with foo, bar as baz: pass - -[#1.2 Leading delimiter] = 0:13-0:17 - >----< -0| with foo, bar as baz: pass - -[#1.2 Insertion delimiter] = " " - -[#1 Domain] = 0:0-0:26 - >--------------------------< -0| with foo, bar as baz: pass - - -[#2 Content] = -[#2 Domain] = 0:5-0:8 - >---< -0| with foo, bar as baz: pass - -[#2 Removal] = 0:5-0:10 - >-----< -0| with foo, bar as baz: pass - -[#2 Trailing delimiter] = 0:8-0:10 - >--< -0| with foo, bar as baz: pass - -[#2 Insertion delimiter] = " " - - -[#3 Content] = 0:17-0:20 - >---< -0| with foo, bar as baz: pass - -[#3 Removal] = 0:13-0:20 - >-------< -0| with foo, bar as baz: pass - -[#3 Leading delimiter] = 0:13-0:17 - >----< -0| with foo, bar as baz: pass - -[#3 Domain] = 0:10-0:20 - >----------< -0| with foo, bar as baz: pass - -[#3 Insertion delimiter] = " " diff --git a/data/fixtures/scopes/python/name/name.resource3.scope b/data/fixtures/scopes/python/name/name.resource3.scope deleted file mode 100644 index 2839bb93ae..0000000000 --- a/data/fixtures/scopes/python/name/name.resource3.scope +++ /dev/null @@ -1,72 +0,0 @@ -with foo as bar, baz as bongo: pass ---- - -[#1.1 Content] = 0:12-0:15 - >---< -0| with foo as bar, baz as bongo: pass - -[#1.1 Removal] = 0:8-0:15 - >-------< -0| with foo as bar, baz as bongo: pass - -[#1.1 Leading delimiter] = 0:8-0:12 - >----< -0| with foo as bar, baz as bongo: pass - -[#1.1 Insertion delimiter] = " " - -[#1.2 Content] = 0:24-0:29 - >-----< -0| with foo as bar, baz as bongo: pass - -[#1.2 Removal] = 0:20-0:29 - >---------< -0| with foo as bar, baz as bongo: pass - -[#1.2 Leading delimiter] = 0:20-0:24 - >----< -0| with foo as bar, baz as bongo: pass - -[#1.2 Insertion delimiter] = " " - -[#1 Domain] = 0:0-0:35 - >-----------------------------------< -0| with foo as bar, baz as bongo: pass - - -[#2 Content] = 0:12-0:15 - >---< -0| with foo as bar, baz as bongo: pass - -[#2 Removal] = 0:8-0:15 - >-------< -0| with foo as bar, baz as bongo: pass - -[#2 Leading delimiter] = 0:8-0:12 - >----< -0| with foo as bar, baz as bongo: pass - -[#2 Domain] = 0:5-0:15 - >----------< -0| with foo as bar, baz as bongo: pass - -[#2 Insertion delimiter] = " " - - -[#3 Content] = 0:24-0:29 - >-----< -0| with foo as bar, baz as bongo: pass - -[#3 Removal] = 0:20-0:29 - >---------< -0| with foo as bar, baz as bongo: pass - -[#3 Leading delimiter] = 0:20-0:24 - >----< -0| with foo as bar, baz as bongo: pass - -[#3 Domain] = 0:17-0:29 - >------------< -0| with foo as bar, baz as bongo: pass - -[#3 Insertion delimiter] = " " diff --git a/data/fixtures/scopes/python/value/value.resource.iteration.scope b/data/fixtures/scopes/python/value/value.resource.iteration.scope deleted file mode 100644 index b014dd3e66..0000000000 --- a/data/fixtures/scopes/python/value/value.resource.iteration.scope +++ /dev/null @@ -1,16 +0,0 @@ -with foo, bar as baz: pass ---- - -[#1 Content] = 0:5-0:20 - >---------------< -0| with foo, bar as baz: pass - -[#1 Domain] = 0:0-0:26 - >--------------------------< -0| with foo, bar as baz: pass - - -[#2 Content] = -[#2 Domain] = 0:22-0:26 - >----< -0| with foo, bar as baz: pass diff --git a/data/fixtures/scopes/python/value/value.resource.iteration2.scope b/data/fixtures/scopes/python/value/value.resource.iteration2.scope deleted file mode 100644 index 3abf031d3c..0000000000 --- a/data/fixtures/scopes/python/value/value.resource.iteration2.scope +++ /dev/null @@ -1,16 +0,0 @@ -with foo: pass ---- - -[#1 Content] = 0:5-0:8 - >---< -0| with foo: pass - -[#1 Domain] = 0:0-0:14 - >--------------< -0| with foo: pass - - -[#2 Content] = -[#2 Domain] = 0:10-0:14 - >----< -0| with foo: pass diff --git a/data/fixtures/scopes/python/value/value.resource.scope b/data/fixtures/scopes/python/value/value.resource.scope deleted file mode 100644 index ee9ef4e50f..0000000000 --- a/data/fixtures/scopes/python/value/value.resource.scope +++ /dev/null @@ -1,20 +0,0 @@ -with foo: pass ---- - -[Content] = 0:5-0:8 - >---< -0| with foo: pass - -[Removal] = 0:4-0:8 - >----< -0| with foo: pass - -[Leading delimiter] = 0:4-0:5 - >-< -0| with foo: pass - -[Domain] = 0:0-0:14 - >--------------< -0| with foo: pass - -[Insertion delimiter] = " " diff --git a/data/fixtures/scopes/python/value/value.resource2.scope b/data/fixtures/scopes/python/value/value.resource2.scope deleted file mode 100644 index d4b503f4bb..0000000000 --- a/data/fixtures/scopes/python/value/value.resource2.scope +++ /dev/null @@ -1,66 +0,0 @@ -with foo, bar: pass ---- - -[#1.1 Content] = 0:5-0:8 - >---< -0| with foo, bar: pass - -[#1.1 Removal] = 0:5-0:10 - >-----< -0| with foo, bar: pass - -[#1.1 Trailing delimiter] = 0:8-0:10 - >--< -0| with foo, bar: pass - -[#1.1 Insertion delimiter] = " " - -[#1.2 Content] = 0:10-0:13 - >---< -0| with foo, bar: pass - -[#1.2 Removal] = 0:8-0:13 - >-----< -0| with foo, bar: pass - -[#1.2 Leading delimiter] = 0:8-0:10 - >--< -0| with foo, bar: pass - -[#1.2 Insertion delimiter] = " " - -[#1 Domain] = 0:0-0:19 - >-------------------< -0| with foo, bar: pass - - -[#2 Content] = -[#2 Domain] = 0:5-0:8 - >---< -0| with foo, bar: pass - -[#2 Removal] = 0:5-0:10 - >-----< -0| with foo, bar: pass - -[#2 Trailing delimiter] = 0:8-0:10 - >--< -0| with foo, bar: pass - -[#2 Insertion delimiter] = " " - - -[#3 Content] = -[#3 Domain] = 0:10-0:13 - >---< -0| with foo, bar: pass - -[#3 Removal] = 0:8-0:13 - >-----< -0| with foo, bar: pass - -[#3 Leading delimiter] = 0:8-0:10 - >--< -0| with foo, bar: pass - -[#3 Insertion delimiter] = " " diff --git a/data/fixtures/scopes/python/value/value.resource3.scope b/data/fixtures/scopes/python/value/value.resource3.scope deleted file mode 100644 index 5cd902a7a0..0000000000 --- a/data/fixtures/scopes/python/value/value.resource3.scope +++ /dev/null @@ -1,20 +0,0 @@ -with foo as bar: pass ---- - -[Content] = 0:5-0:8 - >---< -0| with foo as bar: pass - -[Removal] = 0:5-0:12 - >-------< -0| with foo as bar: pass - -[Trailing delimiter] = 0:8-0:12 - >----< -0| with foo as bar: pass - -[Domain] = 0:0-0:21 - >---------------------< -0| with foo as bar: pass - -[Insertion delimiter] = " " diff --git a/data/fixtures/scopes/python/value/value.resource4.scope b/data/fixtures/scopes/python/value/value.resource4.scope deleted file mode 100644 index 71263b9c03..0000000000 --- a/data/fixtures/scopes/python/value/value.resource4.scope +++ /dev/null @@ -1,69 +0,0 @@ -with foo, bar as baz: pass ---- - -[#1.1 Content] = 0:5-0:8 - >---< -0| with foo, bar as baz: pass - -[#1.1 Removal] = 0:5-0:10 - >-----< -0| with foo, bar as baz: pass - -[#1.1 Trailing delimiter] = 0:8-0:10 - >--< -0| with foo, bar as baz: pass - -[#1.1 Insertion delimiter] = " " - -[#1.2 Content] = 0:10-0:13 - >---< -0| with foo, bar as baz: pass - -[#1.2 Removal] = 0:10-0:17 - >-------< -0| with foo, bar as baz: pass - -[#1.2 Trailing delimiter] = 0:13-0:17 - >----< -0| with foo, bar as baz: pass - -[#1.2 Insertion delimiter] = " " - -[#1 Domain] = 0:0-0:26 - >--------------------------< -0| with foo, bar as baz: pass - - -[#2 Content] = -[#2 Domain] = 0:5-0:8 - >---< -0| with foo, bar as baz: pass - -[#2 Removal] = 0:5-0:10 - >-----< -0| with foo, bar as baz: pass - -[#2 Trailing delimiter] = 0:8-0:10 - >--< -0| with foo, bar as baz: pass - -[#2 Insertion delimiter] = " " - - -[#3 Content] = 0:10-0:13 - >---< -0| with foo, bar as baz: pass - -[#3 Removal] = 0:10-0:17 - >-------< -0| with foo, bar as baz: pass - -[#3 Trailing delimiter] = 0:13-0:17 - >----< -0| with foo, bar as baz: pass - -[#3 Domain] = 0:10-0:20 - >----------< -0| with foo, bar as baz: pass - -[#3 Insertion delimiter] = " " diff --git a/data/fixtures/scopes/python/value/value.resource5.scope b/data/fixtures/scopes/python/value/value.resource5.scope deleted file mode 100644 index 947d75fc49..0000000000 --- a/data/fixtures/scopes/python/value/value.resource5.scope +++ /dev/null @@ -1,72 +0,0 @@ -with foo as bar, baz as bongo: pass ---- - -[#1.1 Content] = 0:5-0:8 - >---< -0| with foo as bar, baz as bongo: pass - -[#1.1 Removal] = 0:5-0:12 - >-------< -0| with foo as bar, baz as bongo: pass - -[#1.1 Trailing delimiter] = 0:8-0:12 - >----< -0| with foo as bar, baz as bongo: pass - -[#1.1 Insertion delimiter] = " " - -[#1.2 Content] = 0:17-0:20 - >---< -0| with foo as bar, baz as bongo: pass - -[#1.2 Removal] = 0:17-0:24 - >-------< -0| with foo as bar, baz as bongo: pass - -[#1.2 Trailing delimiter] = 0:20-0:24 - >----< -0| with foo as bar, baz as bongo: pass - -[#1.2 Insertion delimiter] = " " - -[#1 Domain] = 0:0-0:35 - >-----------------------------------< -0| with foo as bar, baz as bongo: pass - - -[#2 Content] = 0:5-0:8 - >---< -0| with foo as bar, baz as bongo: pass - -[#2 Removal] = 0:5-0:12 - >-------< -0| with foo as bar, baz as bongo: pass - -[#2 Trailing delimiter] = 0:8-0:12 - >----< -0| with foo as bar, baz as bongo: pass - -[#2 Domain] = 0:5-0:15 - >----------< -0| with foo as bar, baz as bongo: pass - -[#2 Insertion delimiter] = " " - - -[#3 Content] = 0:17-0:20 - >---< -0| with foo as bar, baz as bongo: pass - -[#3 Removal] = 0:17-0:24 - >-------< -0| with foo as bar, baz as bongo: pass - -[#3 Trailing delimiter] = 0:20-0:24 - >----< -0| with foo as bar, baz as bongo: pass - -[#3 Domain] = 0:17-0:29 - >------------< -0| with foo as bar, baz as bongo: pass - -[#3 Insertion delimiter] = " " diff --git a/data/scopeSupportFacetInfos.md b/data/scopeSupportFacetInfos.md index 0a301b5836..83bf3ad9a9 100644 --- a/data/scopeSupportFacetInfos.md +++ b/data/scopeSupportFacetInfos.md @@ -223,14 +223,16 @@ ### name - `name.argument.actual` Name of a (keyword) argument in a function call -- `name.argument.actual.iteration` Iteration scope for names of (keyword) arguments in a function call: the argument list.. +- `name.argument.actual.iteration` Iteration scope for names of (keyword) arguments in a function call: the argument list. - `name.argument.catch` Name of a parameter in a catch clause - `name.argument.formal` Name of a parameter in a function declaration - `name.argument.formal.constructor` The name of a parameter in a constructor declaration -- `name.argument.formal.constructor.iteration` Iteration scope for names of formal parameters in a constructor declaration: the parameters list. The domain should be the entire constructor. -- `name.argument.formal.iteration` Iteration scope for names of formal parameters in a function declaration: the parameters list. The domain should be the entire function. +- `name.argument.formal.constructor.iteration` Iteration scope for names of formal parameters in a constructor declaration: the parameters list. +- `name.argument.formal.iteration` Iteration scope for names of formal parameters in a function declaration: the parameters list. +- `name.argument.formal.lambda` Name of a parameter in a lambda declaration +- `name.argument.formal.lambda.iteration` Iteration scope for names of formal parameters in a lambda declaration: the parameters list. - `name.argument.formal.method` Name of a parameter in a class method declaration -- `name.argument.formal.method.iteration` Iteration scope for names of formal parameters in a method declaration: the parameters list. The domain should be the entire method. +- `name.argument.formal.method.iteration` Iteration scope for names of formal parameters in a method declaration: the parameters list. - `name.assignment` Name (LHS) of an assignment - `name.assignment.compound` Name (LHS) of a compound assignment, eg +=/-= - `name.assignment.destructuring` LHS of an assignment with pattern destructuring @@ -253,7 +255,6 @@ - `name.method` Name of a class method - `name.namespace` Name of a namespace - `name.resource` Name in a 'with' / 'use' / 'using' statement -- `name.resource.iteration` Iteration scope for names in a 'with' / 'use' / 'using' statement: the resource list. The domain should be the entire statement. - `name.typeAlias` Name of a type alias - `name.variable.destructuring` Name (LHS) of a variable declaration with pattern destructuring - `name.variable.initialized` Name (LHS) of an initialized variable declaration @@ -263,6 +264,7 @@ - `namedFunction` A named function declaration - `namedFunction.constructor` A constructor declaration in a class +- `namedFunction.iteration.block` Iteration scope for named functions: statement blocks (body of functions/if-statements/for-loops/etc). - `namedFunction.iteration.class` Iteration scope for named functions: class bodies. - `namedFunction.iteration.document` Iteration scope for named functions: the entire document including leading and trailing empty lines. - `namedFunction.method` A named method declaration in a class @@ -381,10 +383,12 @@ - `type.argument.catch` Type of a parameter in a catch clause - `type.argument.formal` Type of a formal parameter in a function declaration - `type.argument.formal.constructor` Type of a formal parameter in a constructor declaration -- `type.argument.formal.constructor.iteration` Iteration scope for types of formal parameters in a constructor declaration: the parameters list. The domain should be the entire constructor. -- `type.argument.formal.iteration` Iteration scope for types of formal parameters in a function declaration: the parameters list. The domain should be the entire function. +- `type.argument.formal.constructor.iteration` Iteration scope for types of formal parameters in a constructor declaration: the parameters list. +- `type.argument.formal.iteration` Iteration scope for types of formal parameters in a function declaration: the parameters list. +- `type.argument.formal.lambda` Type of a formal parameter in a lambda declaration +- `type.argument.formal.lambda.iteration` Iteration scope for types of formal parameters in a lambda declaration: the parameters list. - `type.argument.formal.method` Type of a formal parameter in a class method declaration -- `type.argument.formal.method.iteration` Iteration scope for types of formal parameters in a method declaration: the parameters list. The domain should be the entire method. +- `type.argument.formal.method.iteration` Iteration scope for types of formal parameters in a method declaration: the parameters list. - `type.cast` A type cast - `type.class` A class declaration - `type.constant` Type of a constant declaration @@ -398,7 +402,6 @@ - `type.iteration.document` Iteration scope for types: the entire document including leading and trailing empty lines. - `type.iteration.interface` Iteration scope for types: interface bodies. - `type.resource` Type in a 'with' / 'use' / 'using' statement -- `type.resource.iteration` Iteration scope for types in a 'with' / 'use' / 'using' statement: the resource list. The domain should be the entire statement. - `type.return` Type of a return value in a function declaration - `type.return.method` Type of a return value in a method declaration - `type.typeArgument` Type argument to a generic / parametrized type @@ -417,13 +420,13 @@ ### value - `value.argument.actual` The value of a (keyword) argument in a function call -- `value.argument.actual.iteration` Iteration scope for values of (keyword) arguments in a function call: the arguments list.. +- `value.argument.actual.iteration` Iteration scope for values of (keyword) arguments in a function call: the arguments list. - `value.argument.formal` The value of a (keyword) argument in a function declaration - `value.argument.formal.constructor` The value of a parameter in a constructor declaration -- `value.argument.formal.constructor.iteration` Iteration scope for values of formal parameters in a constructor declaration: the parameters list. The domain should be the entire constructor. -- `value.argument.formal.iteration` Iteration scope for values of formal parameters in a function declaration: the parameters list. The domain should be the entire function. +- `value.argument.formal.constructor.iteration` Iteration scope for values of formal parameters in a constructor declaration: the parameters list. +- `value.argument.formal.iteration` Iteration scope for values of formal parameters in a function declaration: the parameters list. - `value.argument.formal.method` The value of a parameter in a class method declaration -- `value.argument.formal.method.iteration` Iteration scope for values of formal parameters in a method declaration: the parameters list. The domain should be the entire method. +- `value.argument.formal.method.iteration` Iteration scope for values of formal parameters in a method declaration: the parameters list. - `value.assignment` Value (RHS) of an assignment - `value.assignment.compound` Value (RHS) of a compound assignment, eg +=/-= - `value.assignment.destructuring` Value (RHS) of an assignment with pattern destructuring @@ -441,7 +444,6 @@ - `value.mapPair` Value (RHS) of a key-value pair in a map - `value.mapPair.iteration` Iteration scope for values of key-value pairs in a map: should be between the braces. - `value.resource` Value of a 'with' / 'use' / 'using' statement -- `value.resource.iteration` Iteration scope for values in a 'with' / 'use' / 'using' statement: the resource list. The domain should be the entire statement. - `value.return` Return value of a function - `value.return.lambda` Implicit return value from a lambda - `value.switch` The value / subject of a switch statement diff --git a/packages/common/src/scopeSupportFacets/c.ts b/packages/common/src/scopeSupportFacets/c.ts index 27a5f23fb9..9dcc0ea685 100644 --- a/packages/common/src/scopeSupportFacets/c.ts +++ b/packages/common/src/scopeSupportFacets/c.ts @@ -166,11 +166,8 @@ export const cCoreScopeSupport: LanguageScopeSupportFacetMap = { "statement.resource": notApplicable, "interior.resource": notApplicable, "type.resource": notApplicable, - "type.resource.iteration": notApplicable, "name.resource": notApplicable, - "name.resource.iteration": notApplicable, "value.resource": notApplicable, - "value.resource.iteration": notApplicable, // Map literal map: notApplicable, @@ -219,8 +216,9 @@ export const cCoreScopeSupport: LanguageScopeSupportFacetMap = { notebookCell: notApplicable, "interior.cell": notApplicable, - // Nested class + // Nested class / function "class.iteration.block": notApplicable, + "namedFunction.iteration.block": notApplicable, // Interface "statement.interface": notApplicable, @@ -281,6 +279,10 @@ export const cScopeSupport: LanguageScopeSupportFacetMap = { "argumentList.formal.lambda.empty": notApplicable, "argumentList.formal.lambda.multiLine": notApplicable, "argumentList.formal.lambda.singleLine": notApplicable, + "name.argument.formal.lambda": notApplicable, + "name.argument.formal.lambda.iteration": notApplicable, + "type.argument.formal.lambda": notApplicable, + "type.argument.formal.lambda.iteration": notApplicable, "interior.lambda": notApplicable, "value.return.lambda": notApplicable, anonymousFunction: notApplicable, diff --git a/packages/common/src/scopeSupportFacets/cpp.ts b/packages/common/src/scopeSupportFacets/cpp.ts index 1c8393ca55..a810fe9f0e 100644 --- a/packages/common/src/scopeSupportFacets/cpp.ts +++ b/packages/common/src/scopeSupportFacets/cpp.ts @@ -31,6 +31,10 @@ export const cppScopeSupport: LanguageScopeSupportFacetMap = { "argument.formal.lambda.singleLine": supported, "argument.formal.lambda.multiLine": supported, "argument.formal.lambda.iteration": supported, + "name.argument.formal.lambda": supported, + "name.argument.formal.lambda.iteration": supported, + "type.argument.formal.lambda": supported, + "type.argument.formal.lambda.iteration": supported, "argument.catch": supported, "argumentList.actual.constructor.empty": supported, diff --git a/packages/common/src/scopeSupportFacets/csharp.ts b/packages/common/src/scopeSupportFacets/csharp.ts index 98f5197e7c..e7ad062ab4 100644 --- a/packages/common/src/scopeSupportFacets/csharp.ts +++ b/packages/common/src/scopeSupportFacets/csharp.ts @@ -33,6 +33,7 @@ export const csharpScopeSupport: LanguageScopeSupportFacetMap = { "namedFunction.constructor": supported, "namedFunction.method": supported, "namedFunction.iteration.class": supported, + "namedFunction.iteration.block": supported, "branch.if": supported, "branch.if.elif.else": supported, @@ -58,6 +59,8 @@ export const csharpScopeSupport: LanguageScopeSupportFacetMap = { "name.argument.formal.iteration": supported, "name.argument.formal.method": supported, "name.argument.formal.method.iteration": supported, + "name.argument.formal.lambda": supported, + "name.argument.formal.lambda.iteration": supported, "name.argument.formal": supported, "name.argument.catch": supported, "name.namespace": supported, @@ -112,6 +115,8 @@ export const csharpScopeSupport: LanguageScopeSupportFacetMap = { "type.argument.formal.iteration": supported, "type.argument.formal.method": supported, "type.argument.formal.method.iteration": supported, + "type.argument.formal.lambda": supported, + "type.argument.formal.lambda.iteration": supported, "type.argument.formal.constructor": supported, "type.argument.formal.constructor.iteration": supported, "type.argument.catch": supported, @@ -274,11 +279,8 @@ export const csharpScopeSupport: LanguageScopeSupportFacetMap = { "statement.resource": notApplicable, "interior.resource": notApplicable, "type.resource": notApplicable, - "type.resource.iteration": notApplicable, "name.resource": notApplicable, - "name.resource.iteration": notApplicable, "value.resource": notApplicable, - "value.resource.iteration": notApplicable, // Pattern destructuring "statement.variable.destructuring": notApplicable, diff --git a/packages/common/src/scopeSupportFacets/css.ts b/packages/common/src/scopeSupportFacets/css.ts index 659c24120c..5a8a2189a3 100644 --- a/packages/common/src/scopeSupportFacets/css.ts +++ b/packages/common/src/scopeSupportFacets/css.ts @@ -150,6 +150,7 @@ export const cssScopeSupport: LanguageScopeSupportFacetMap = { namedFunction: notApplicable, "namedFunction.iteration.document": notApplicable, "namedFunction.iteration.class": notApplicable, + "namedFunction.iteration.block": notApplicable, "statement.function": notApplicable, "name.function": notApplicable, "interior.function": notApplicable, @@ -174,6 +175,10 @@ export const cssScopeSupport: LanguageScopeSupportFacetMap = { "argument.formal.lambda.singleLine": notApplicable, "argument.formal.lambda.multiLine": notApplicable, "argument.formal.lambda.iteration": notApplicable, + "name.argument.formal.lambda": notApplicable, + "name.argument.formal.lambda.iteration": notApplicable, + "type.argument.formal.lambda": notApplicable, + "type.argument.formal.lambda.iteration": notApplicable, "value.return.lambda": notApplicable, "interior.lambda": notApplicable, @@ -296,11 +301,8 @@ export const cssScopeSupport: LanguageScopeSupportFacetMap = { "statement.resource": notApplicable, "interior.resource": notApplicable, "name.resource": notApplicable, - "name.resource.iteration": notApplicable, "type.resource": notApplicable, - "type.resource.iteration": notApplicable, "value.resource": notApplicable, - "value.resource.iteration": notApplicable, // Multi-line string "string.multiLine": notApplicable, diff --git a/packages/common/src/scopeSupportFacets/go.ts b/packages/common/src/scopeSupportFacets/go.ts index 00b13550be..5cf2036767 100644 --- a/packages/common/src/scopeSupportFacets/go.ts +++ b/packages/common/src/scopeSupportFacets/go.ts @@ -134,6 +134,8 @@ export const goScopeSupport: LanguageScopeSupportFacetMap = { "name.argument.formal.iteration": supported, "name.argument.formal.method": supported, "name.argument.formal.method.iteration": supported, + "name.argument.formal.lambda": supported, + "name.argument.formal.lambda.iteration": supported, "name.iteration.block": supported, "name.iteration.class": supported, "name.iteration.document": supported, @@ -162,6 +164,8 @@ export const goScopeSupport: LanguageScopeSupportFacetMap = { "type.argument.formal.iteration": supported, "type.argument.formal.method": supported, "type.argument.formal.method.iteration": supported, + "type.argument.formal.lambda": supported, + "type.argument.formal.lambda.iteration": supported, "type.return": supported, "type.return.method": supported, "type.class": supported, @@ -294,11 +298,8 @@ export const goScopeSupport: LanguageScopeSupportFacetMap = { // Resource syntax "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, // Static @@ -343,6 +344,7 @@ export const goScopeSupport: LanguageScopeSupportFacetMap = { "value.return.lambda": notApplicable, "type.foreach": notApplicable, "type.cast": notApplicable, + "namedFunction.iteration.block": notApplicable, regularExpression: notApplicable, selector: notApplicable, unit: notApplicable, diff --git a/packages/common/src/scopeSupportFacets/html.ts b/packages/common/src/scopeSupportFacets/html.ts index 4a791e01b3..3aecf30162 100644 --- a/packages/common/src/scopeSupportFacets/html.ts +++ b/packages/common/src/scopeSupportFacets/html.ts @@ -124,6 +124,7 @@ export const htmlScopeSupport: LanguageScopeSupportFacetMap = { namedFunction: notApplicable, "namedFunction.iteration.document": notApplicable, "namedFunction.iteration.class": notApplicable, + "namedFunction.iteration.block": notApplicable, "statement.function": notApplicable, "name.function": notApplicable, "interior.function": notApplicable, @@ -148,6 +149,10 @@ export const htmlScopeSupport: LanguageScopeSupportFacetMap = { "argument.formal.lambda.singleLine": notApplicable, "argument.formal.lambda.multiLine": notApplicable, "argument.formal.lambda.iteration": notApplicable, + "name.argument.formal.lambda": notApplicable, + "name.argument.formal.lambda.iteration": notApplicable, + "type.argument.formal.lambda": notApplicable, + "type.argument.formal.lambda.iteration": notApplicable, "value.return.lambda": notApplicable, "interior.lambda": notApplicable, @@ -274,11 +279,8 @@ export const htmlScopeSupport: LanguageScopeSupportFacetMap = { "statement.resource": notApplicable, "interior.resource": notApplicable, "name.resource": notApplicable, - "name.resource.iteration": notApplicable, "type.resource": notApplicable, - "type.resource.iteration": notApplicable, "value.resource": notApplicable, - "value.resource.iteration": notApplicable, // Map map: notApplicable, diff --git a/packages/common/src/scopeSupportFacets/java.ts b/packages/common/src/scopeSupportFacets/java.ts index e5f38fee85..79828aba89 100644 --- a/packages/common/src/scopeSupportFacets/java.ts +++ b/packages/common/src/scopeSupportFacets/java.ts @@ -144,6 +144,8 @@ export const javaScopeSupport: LanguageScopeSupportFacetMap = { "name.argument.formal.constructor.iteration": supported, "name.argument.formal.method": supported, "name.argument.formal.method.iteration": supported, + "name.argument.formal.lambda": supported, + "name.argument.formal.lambda.iteration": supported, "name.argument.catch": supported, "name.class": supported, "name.interface": supported, @@ -185,6 +187,8 @@ export const javaScopeSupport: LanguageScopeSupportFacetMap = { "type.argument.formal.constructor": supported, "type.argument.formal.method": supported, + "type.argument.formal.lambda": supported, + "type.argument.formal.lambda.iteration": supported, "type.argument.formal.constructor.iteration": supported, "type.argument.formal.method.iteration": supported, "type.argument.catch": supported, @@ -310,11 +314,6 @@ export const javaScopeSupport: LanguageScopeSupportFacetMap = { notebookCell: notApplicable, "interior.cell": notApplicable, - // Multiple resources - "value.resource.iteration": notApplicable, - "type.resource.iteration": notApplicable, - "name.resource.iteration": notApplicable, - // Namespace "statement.namespace": notApplicable, "name.namespace": notApplicable, @@ -329,6 +328,7 @@ export const javaScopeSupport: LanguageScopeSupportFacetMap = { "value.iteration.enum": notApplicable, // Miscellaneous + "namedFunction.iteration.block": notApplicable, pairDelimiter: notApplicable, regularExpression: notApplicable, environment: notApplicable, diff --git a/packages/common/src/scopeSupportFacets/javascript.ts b/packages/common/src/scopeSupportFacets/javascript.ts index 27130865b7..7a57adcca3 100644 --- a/packages/common/src/scopeSupportFacets/javascript.ts +++ b/packages/common/src/scopeSupportFacets/javascript.ts @@ -63,6 +63,7 @@ export const javascriptCoreScopeSupport: LanguageScopeSupportFacetMap = { "namedFunction.iteration.document": supported, "namedFunction.method": supported, "namedFunction.iteration.class": supported, + "namedFunction.iteration.block": supported, "namedFunction.constructor": supported, functionCall: supported, @@ -148,6 +149,8 @@ export const javascriptCoreScopeSupport: LanguageScopeSupportFacetMap = { "name.argument.formal.iteration": supported, "name.argument.formal.method": supported, "name.argument.formal.method.iteration": supported, + "name.argument.formal.lambda": supported, + "name.argument.formal.lambda.iteration": supported, "name.argument.formal.constructor": supported, "name.argument.formal.constructor.iteration": supported, "name.argument.catch": supported, @@ -235,11 +238,8 @@ export const javascriptCoreScopeSupport: LanguageScopeSupportFacetMap = { // Resource "statement.resource": notApplicable, "interior.resource": notApplicable, - "name.resource.iteration": notApplicable, "name.resource": notApplicable, - "type.resource.iteration": notApplicable, "type.resource": notApplicable, - "value.resource.iteration": notApplicable, "value.resource": notApplicable, // Keyword argument @@ -288,6 +288,8 @@ export const javascriptScopeSupport: LanguageScopeSupportFacetMap = { "type.argument.formal.iteration": notApplicable, "type.argument.formal.method": notApplicable, "type.argument.formal.method.iteration": notApplicable, + "type.argument.formal.lambda": notApplicable, + "type.argument.formal.lambda.iteration": notApplicable, "type.argument.formal.constructor": notApplicable, "type.argument.formal.constructor.iteration": notApplicable, "type.argument.catch": notApplicable, diff --git a/packages/common/src/scopeSupportFacets/json.ts b/packages/common/src/scopeSupportFacets/json.ts index 7366ec50b1..ca7d303a38 100644 --- a/packages/common/src/scopeSupportFacets/json.ts +++ b/packages/common/src/scopeSupportFacets/json.ts @@ -127,6 +127,7 @@ export const jsonScopeSupport: LanguageScopeSupportFacetMap = { namedFunction: notApplicable, "namedFunction.iteration.document": notApplicable, "namedFunction.iteration.class": notApplicable, + "namedFunction.iteration.block": notApplicable, "statement.function": notApplicable, "name.function": notApplicable, "interior.function": notApplicable, @@ -151,6 +152,10 @@ export const jsonScopeSupport: LanguageScopeSupportFacetMap = { "argument.formal.lambda.singleLine": notApplicable, "argument.formal.lambda.multiLine": notApplicable, "argument.formal.lambda.iteration": notApplicable, + "name.argument.formal.lambda": notApplicable, + "name.argument.formal.lambda.iteration": notApplicable, + "type.argument.formal.lambda": notApplicable, + "type.argument.formal.lambda.iteration": notApplicable, "value.return.lambda": notApplicable, "interior.lambda": notApplicable, @@ -277,11 +282,8 @@ export const jsonScopeSupport: LanguageScopeSupportFacetMap = { "statement.resource": notApplicable, "interior.resource": notApplicable, "name.resource": notApplicable, - "name.resource.iteration": notApplicable, "type.resource": notApplicable, - "type.resource.iteration": notApplicable, "value.resource": notApplicable, - "value.resource.iteration": notApplicable, // Multiline string "string.multiLine": notApplicable, diff --git a/packages/common/src/scopeSupportFacets/kotlin.ts b/packages/common/src/scopeSupportFacets/kotlin.ts index a381e6c617..16fe4b2e8a 100644 --- a/packages/common/src/scopeSupportFacets/kotlin.ts +++ b/packages/common/src/scopeSupportFacets/kotlin.ts @@ -94,6 +94,7 @@ export const kotlinScopeSupport: LanguageScopeSupportFacetMap = { "namedFunction.method": supported, "namedFunction.iteration.document": supported, "namedFunction.iteration.class": supported, + "namedFunction.iteration.block": supported, ifStatement: supported, @@ -144,6 +145,8 @@ export const kotlinScopeSupport: LanguageScopeSupportFacetMap = { "name.argument.formal.iteration": supported, "name.argument.formal.method": supported, "name.argument.formal.method.iteration": supported, + "name.argument.formal.lambda": supported, + "name.argument.formal.lambda.iteration": supported, "name.argument.formal.constructor": supported, "name.argument.formal.constructor.iteration": supported, "name.argument.catch": supported, @@ -205,6 +208,8 @@ export const kotlinScopeSupport: LanguageScopeSupportFacetMap = { "type.argument.formal.iteration": supported, "type.argument.formal.method": supported, "type.argument.formal.method.iteration": supported, + "type.argument.formal.lambda": supported, + "type.argument.formal.lambda.iteration": supported, "type.argument.formal.constructor": supported, "type.argument.formal.constructor.iteration": supported, "type.argument.catch": supported, @@ -280,11 +285,8 @@ export const kotlinScopeSupport: LanguageScopeSupportFacetMap = { // 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 diff --git a/packages/common/src/scopeSupportFacets/latex.ts b/packages/common/src/scopeSupportFacets/latex.ts index 0e352226e8..69e7b3d16e 100644 --- a/packages/common/src/scopeSupportFacets/latex.ts +++ b/packages/common/src/scopeSupportFacets/latex.ts @@ -139,6 +139,7 @@ export const latexScopeSupport: LanguageScopeSupportFacetMap = { namedFunction: notApplicable, "namedFunction.iteration.document": notApplicable, "namedFunction.iteration.class": notApplicable, + "namedFunction.iteration.block": notApplicable, "statement.function": notApplicable, "name.function": notApplicable, "interior.function": notApplicable, @@ -163,6 +164,10 @@ export const latexScopeSupport: LanguageScopeSupportFacetMap = { "argument.formal.lambda.singleLine": notApplicable, "argument.formal.lambda.multiLine": notApplicable, "argument.formal.lambda.iteration": notApplicable, + "name.argument.formal.lambda": notApplicable, + "name.argument.formal.lambda.iteration": notApplicable, + "type.argument.formal.lambda": notApplicable, + "type.argument.formal.lambda.iteration": notApplicable, "value.return.lambda": notApplicable, "interior.lambda": notApplicable, @@ -279,11 +284,8 @@ export const latexScopeSupport: LanguageScopeSupportFacetMap = { "statement.resource": notApplicable, "interior.resource": notApplicable, "name.resource": notApplicable, - "name.resource.iteration": notApplicable, "type.resource": notApplicable, - "type.resource.iteration": notApplicable, "value.resource": notApplicable, - "value.resource.iteration": notApplicable, // String "string.singleLine": notApplicable, diff --git a/packages/common/src/scopeSupportFacets/lua.ts b/packages/common/src/scopeSupportFacets/lua.ts index 12fcca216b..d979cc8e71 100644 --- a/packages/common/src/scopeSupportFacets/lua.ts +++ b/packages/common/src/scopeSupportFacets/lua.ts @@ -13,6 +13,7 @@ export const luaScopeSupport: LanguageScopeSupportFacetMap = { namedFunction: supported, "namedFunction.method": supported, "namedFunction.iteration.document": supported, + "namedFunction.iteration.block": supported, functionCall: supported, "functionCall.method": supported, @@ -59,6 +60,8 @@ export const luaScopeSupport: LanguageScopeSupportFacetMap = { "name.argument.formal.iteration": supported, "name.argument.formal.method": supported, "name.argument.formal.method.iteration": supported, + "name.argument.formal.lambda": supported, + "name.argument.formal.lambda.iteration": supported, "name.foreach": supported, "name.function": supported, "name.method": supported, @@ -212,6 +215,8 @@ export const luaScopeSupport: LanguageScopeSupportFacetMap = { "type.argument.formal.iteration": notApplicable, "type.argument.formal.method": notApplicable, "type.argument.formal.method.iteration": notApplicable, + "type.argument.formal.lambda": notApplicable, + "type.argument.formal.lambda.iteration": notApplicable, "type.argument.catch": notApplicable, "type.return": notApplicable, "type.return.method": notApplicable, @@ -263,11 +268,8 @@ export const luaScopeSupport: LanguageScopeSupportFacetMap = { // Resource syntax "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, // Keyword argument diff --git a/packages/common/src/scopeSupportFacets/markdown.ts b/packages/common/src/scopeSupportFacets/markdown.ts index eec0283d8e..38d03dad5d 100644 --- a/packages/common/src/scopeSupportFacets/markdown.ts +++ b/packages/common/src/scopeSupportFacets/markdown.ts @@ -128,6 +128,7 @@ export const markdownScopeSupport: LanguageScopeSupportFacetMap = { namedFunction: notApplicable, "namedFunction.iteration.document": notApplicable, "namedFunction.iteration.class": notApplicable, + "namedFunction.iteration.block": notApplicable, "statement.function": notApplicable, "name.function": notApplicable, "interior.function": notApplicable, @@ -152,6 +153,10 @@ export const markdownScopeSupport: LanguageScopeSupportFacetMap = { "argument.formal.lambda.singleLine": notApplicable, "argument.formal.lambda.multiLine": notApplicable, "argument.formal.lambda.iteration": notApplicable, + "name.argument.formal.lambda": notApplicable, + "name.argument.formal.lambda.iteration": notApplicable, + "type.argument.formal.lambda": notApplicable, + "type.argument.formal.lambda.iteration": notApplicable, "value.return.lambda": notApplicable, "interior.lambda": notApplicable, @@ -277,11 +282,8 @@ export const markdownScopeSupport: LanguageScopeSupportFacetMap = { "statement.resource": notApplicable, "interior.resource": notApplicable, "name.resource": notApplicable, - "name.resource.iteration": notApplicable, "type.resource": notApplicable, - "type.resource.iteration": notApplicable, "value.resource": notApplicable, - "value.resource.iteration": notApplicable, // Single-line string "string.singleLine": notApplicable, diff --git a/packages/common/src/scopeSupportFacets/properties.ts b/packages/common/src/scopeSupportFacets/properties.ts index b624c2089c..da671cf3c6 100644 --- a/packages/common/src/scopeSupportFacets/properties.ts +++ b/packages/common/src/scopeSupportFacets/properties.ts @@ -97,6 +97,7 @@ export const propertiesScopeSupport: LanguageScopeSupportFacetMap = { namedFunction: notApplicable, "namedFunction.iteration.document": notApplicable, "namedFunction.iteration.class": notApplicable, + "namedFunction.iteration.block": notApplicable, "statement.function": notApplicable, "name.function": notApplicable, "interior.function": notApplicable, @@ -136,6 +137,10 @@ export const propertiesScopeSupport: LanguageScopeSupportFacetMap = { "argument.formal.lambda.singleLine": notApplicable, "argument.formal.lambda.multiLine": notApplicable, "argument.formal.lambda.iteration": notApplicable, + "name.argument.formal.lambda": notApplicable, + "name.argument.formal.lambda.iteration": notApplicable, + "type.argument.formal.lambda": notApplicable, + "type.argument.formal.lambda.iteration": notApplicable, "value.return.lambda": notApplicable, "interior.lambda": notApplicable, @@ -242,11 +247,8 @@ export const propertiesScopeSupport: LanguageScopeSupportFacetMap = { "statement.resource": notApplicable, "interior.resource": notApplicable, "name.resource": notApplicable, - "name.resource.iteration": notApplicable, "type.resource": notApplicable, - "type.resource.iteration": notApplicable, "value.resource": notApplicable, - "value.resource.iteration": notApplicable, // Pattern destructuring "statement.variable.destructuring": notApplicable, diff --git a/packages/common/src/scopeSupportFacets/python.ts b/packages/common/src/scopeSupportFacets/python.ts index 3dfba3c307..762809bb13 100644 --- a/packages/common/src/scopeSupportFacets/python.ts +++ b/packages/common/src/scopeSupportFacets/python.ts @@ -6,7 +6,6 @@ const { supported, notApplicable } = ScopeSupportFacetLevel; export const pythonScopeSupport: LanguageScopeSupportFacetMap = { "name.foreach": supported, "name.resource": supported, - "name.resource.iteration": supported, "name.argument.actual": supported, "name.argument.actual.iteration": supported, "name.argument.formal": supported, @@ -15,6 +14,8 @@ export const pythonScopeSupport: LanguageScopeSupportFacetMap = { "name.argument.formal.iteration": supported, "name.argument.formal.method": supported, "name.argument.formal.method.iteration": supported, + "name.argument.formal.lambda": supported, + "name.argument.formal.lambda.iteration": supported, "name.argument.catch": supported, "name.assignment": supported, "name.assignment.destructuring": supported, @@ -33,8 +34,6 @@ export const pythonScopeSupport: LanguageScopeSupportFacetMap = { "value.foreach": supported, "value.yield": supported, - "value.resource": supported, - "value.resource.iteration": supported, "value.argument.actual": supported, "value.argument.actual.iteration": supported, "value.argument.formal": supported, @@ -64,6 +63,8 @@ export const pythonScopeSupport: LanguageScopeSupportFacetMap = { "type.argument.formal.iteration": supported, "type.argument.formal.method": supported, "type.argument.formal.method.iteration": supported, + "type.argument.formal.lambda": notApplicable, + "type.argument.formal.lambda.iteration": notApplicable, "type.argument.formal": supported, "type.argument.catch": supported, "type.class": supported, @@ -84,6 +85,7 @@ export const pythonScopeSupport: LanguageScopeSupportFacetMap = { "namedFunction.iteration.document": supported, "namedFunction.method": supported, "namedFunction.iteration.class": supported, + "namedFunction.iteration.block": supported, "argument.actual.singleLine": supported, "argument.actual.multiLine": supported, @@ -275,7 +277,6 @@ export const pythonScopeSupport: LanguageScopeSupportFacetMap = { "type.interface": notApplicable, "type.field.interface": notApplicable, "type.iteration.interface": notApplicable, - "type.resource.iteration": notApplicable, "type.resource": notApplicable, // Type alias @@ -337,6 +338,7 @@ export const pythonScopeSupport: LanguageScopeSupportFacetMap = { "statement.misc": notApplicable, "statement.package": notApplicable, "statement.update": notApplicable, + "value.resource": notApplicable, environment: notApplicable, regularExpression: notApplicable, selector: notApplicable, diff --git a/packages/common/src/scopeSupportFacets/r.ts b/packages/common/src/scopeSupportFacets/r.ts index 0cf51e5bff..5a1f796544 100644 --- a/packages/common/src/scopeSupportFacets/r.ts +++ b/packages/common/src/scopeSupportFacets/r.ts @@ -113,7 +113,6 @@ export const rScopeSupport: LanguageScopeSupportFacetMap = { "type.interface": notApplicable, "type.return": notApplicable, "type.resource": notApplicable, - "type.resource.iteration": notApplicable, "type.iteration.class": notApplicable, "type.typeArgument": notApplicable, "type.typeArgument.iteration": notApplicable, diff --git a/packages/common/src/scopeSupportFacets/rust.ts b/packages/common/src/scopeSupportFacets/rust.ts index 7dba3f4963..298a527e49 100644 --- a/packages/common/src/scopeSupportFacets/rust.ts +++ b/packages/common/src/scopeSupportFacets/rust.ts @@ -118,6 +118,8 @@ export const rustScopeSupport: LanguageScopeSupportFacetMap = { "name.argument.formal.iteration": supported, "name.argument.formal.method": supported, "name.argument.formal.method.iteration": supported, + "name.argument.formal.lambda": supported, + "name.argument.formal.lambda.iteration": supported, "name.assignment": supported, "name.assignment.destructuring": supported, "name.assignment.compound": supported, @@ -163,6 +165,8 @@ export const rustScopeSupport: LanguageScopeSupportFacetMap = { "type.argument.formal.iteration": supported, "type.argument.formal.method": supported, "type.argument.formal.method.iteration": supported, + "type.argument.formal.lambda": supported, + "type.argument.formal.lambda.iteration": supported, "type.class": supported, "type.enum": supported, "type.field.class": supported, @@ -266,11 +270,8 @@ export const rustScopeSupport: LanguageScopeSupportFacetMap = { // Resource syntax "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, // Keyword argument @@ -337,6 +338,7 @@ export const rustScopeSupport: LanguageScopeSupportFacetMap = { "value.field.class": notApplicable, "type.foreach": notApplicable, "class.iteration.block": notApplicable, + "namedFunction.iteration.block": notApplicable, environment: notApplicable, regularExpression: notApplicable, selector: notApplicable, diff --git a/packages/common/src/scopeSupportFacets/scala.ts b/packages/common/src/scopeSupportFacets/scala.ts index 4ecb009599..1725cf4e71 100644 --- a/packages/common/src/scopeSupportFacets/scala.ts +++ b/packages/common/src/scopeSupportFacets/scala.ts @@ -96,6 +96,7 @@ export const scalaScopeSupport: LanguageScopeSupportFacetMap = { "namedFunction.method": supported, "namedFunction.iteration.class": supported, "namedFunction.iteration.document": supported, + "namedFunction.iteration.block": supported, ifStatement: supported, @@ -145,6 +146,8 @@ export const scalaScopeSupport: LanguageScopeSupportFacetMap = { "name.argument.formal.iteration": supported, "name.argument.formal.method": supported, "name.argument.formal.method.iteration": supported, + "name.argument.formal.lambda": supported, + "name.argument.formal.lambda.iteration": supported, "name.argument.formal.constructor": supported, "name.argument.formal.constructor.iteration": supported, "name.argument.catch": supported, @@ -200,6 +203,8 @@ export const scalaScopeSupport: LanguageScopeSupportFacetMap = { "type.argument.formal.iteration": supported, "type.argument.formal.method": supported, "type.argument.formal.method.iteration": supported, + "type.argument.formal.lambda": supported, + "type.argument.formal.lambda.iteration": supported, "type.argument.formal.constructor": supported, "type.argument.formal.constructor.iteration": supported, "type.argument.catch": supported, @@ -271,11 +276,8 @@ export const scalaScopeSupport: LanguageScopeSupportFacetMap = { "statement.resource": notApplicable, "interior.resource": notApplicable, "type.resource": notApplicable, - "type.resource.iteration": notApplicable, "name.resource": notApplicable, - "name.resource.iteration": notApplicable, "value.resource": notApplicable, - "value.resource.iteration": notApplicable, // Branches and conditions "branch.ternary": notApplicable, diff --git a/packages/common/src/scopeSupportFacets/scm.ts b/packages/common/src/scopeSupportFacets/scm.ts index 08ac3335af..719ec5d708 100644 --- a/packages/common/src/scopeSupportFacets/scm.ts +++ b/packages/common/src/scopeSupportFacets/scm.ts @@ -129,6 +129,7 @@ export const scmScopeSupport: LanguageScopeSupportFacetMap = { namedFunction: notApplicable, "namedFunction.iteration.document": notApplicable, "namedFunction.iteration.class": notApplicable, + "namedFunction.iteration.block": notApplicable, "statement.function": notApplicable, "name.function": notApplicable, "interior.function": notApplicable, @@ -153,6 +154,10 @@ export const scmScopeSupport: LanguageScopeSupportFacetMap = { "argument.formal.lambda.singleLine": notApplicable, "argument.formal.lambda.multiLine": notApplicable, "argument.formal.lambda.iteration": notApplicable, + "name.argument.formal.lambda": notApplicable, + "name.argument.formal.lambda.iteration": notApplicable, + "type.argument.formal.lambda": notApplicable, + "type.argument.formal.lambda.iteration": notApplicable, "value.return.lambda": notApplicable, "interior.lambda": notApplicable, @@ -274,11 +279,8 @@ export const scmScopeSupport: LanguageScopeSupportFacetMap = { "statement.resource": notApplicable, "interior.resource": notApplicable, "name.resource": notApplicable, - "name.resource.iteration": notApplicable, "type.resource": notApplicable, - "type.resource.iteration": notApplicable, "value.resource": notApplicable, - "value.resource.iteration": notApplicable, // Map map: notApplicable, diff --git a/packages/common/src/scopeSupportFacets/scopeSupportFacetInfos.ts b/packages/common/src/scopeSupportFacets/scopeSupportFacetInfos.ts index 436153e72a..1e5b1db41c 100644 --- a/packages/common/src/scopeSupportFacets/scopeSupportFacetInfos.ts +++ b/packages/common/src/scopeSupportFacets/scopeSupportFacetInfos.ts @@ -251,6 +251,10 @@ export const scopeSupportFacetInfos: Record< "namedFunction", "named functions", ), + "namedFunction.iteration.block": blockIter( + "namedFunction", + "named functions", + ), anonymousFunction: { description: "An anonymous function, eg a lambda function, an arrow function, etc.", @@ -725,11 +729,6 @@ export const scopeSupportFacetInfos: Record< description: "Name in a 'with' / 'use' / 'using' statement", scopeType: "name", }, - "name.resource.iteration": iteration( - "name", - "names in a 'with' / 'use' / 'using' statement", - "the resource list. The domain should be the entire statement", - ), "name.argument.actual": { description: "Name of a (keyword) argument in a function call", scopeType: "name", @@ -737,7 +736,7 @@ export const scopeSupportFacetInfos: Record< "name.argument.actual.iteration": iteration( "name", "names of (keyword) arguments in a function call", - "the argument list.", + "the argument list", ), "name.argument.formal": { description: "Name of a parameter in a function declaration", @@ -746,7 +745,7 @@ export const scopeSupportFacetInfos: Record< "name.argument.formal.iteration": iteration( "name", "names of formal parameters in a function declaration", - "the parameters list. The domain should be the entire function", + "the parameters list", ), "name.argument.formal.method": { description: "Name of a parameter in a class method declaration", @@ -755,7 +754,16 @@ export const scopeSupportFacetInfos: Record< "name.argument.formal.method.iteration": iteration( "name", "names of formal parameters in a method declaration", - "the parameters list. The domain should be the entire method", + "the parameters list", + ), + "name.argument.formal.lambda": { + description: "Name of a parameter in a lambda declaration", + scopeType: "name", + }, + "name.argument.formal.lambda.iteration": iteration( + "name", + "names of formal parameters in a lambda declaration", + "the parameters list", ), "name.argument.formal.constructor": { description: "The name of a parameter in a constructor declaration", @@ -764,7 +772,7 @@ export const scopeSupportFacetInfos: Record< "name.argument.formal.constructor.iteration": iteration( "name", "names of formal parameters in a constructor declaration", - "the parameters list. The domain should be the entire constructor", + "the parameters list", ), "name.argument.catch": { description: "Name of a parameter in a catch clause", @@ -871,11 +879,6 @@ export const scopeSupportFacetInfos: Record< description: "Value of a 'with' / 'use' / 'using' statement", scopeType: "value", }, - "value.resource.iteration": iteration( - "value", - "values in a 'with' / 'use' / 'using' statement", - "the resource list. The domain should be the entire statement", - ), "value.argument.actual": { description: "The value of a (keyword) argument in a function call", scopeType: "value", @@ -883,7 +886,7 @@ export const scopeSupportFacetInfos: Record< "value.argument.actual.iteration": iteration( "value", "values of (keyword) arguments in a function call", - "the arguments list.", + "the arguments list", ), "value.argument.formal": { description: "The value of a (keyword) argument in a function declaration", @@ -892,7 +895,7 @@ export const scopeSupportFacetInfos: Record< "value.argument.formal.iteration": iteration( "value", "values of formal parameters in a function declaration", - "the parameters list. The domain should be the entire function", + "the parameters list", ), "value.argument.formal.method": { description: "The value of a parameter in a class method declaration", @@ -901,7 +904,7 @@ export const scopeSupportFacetInfos: Record< "value.argument.formal.method.iteration": iteration( "value", "values of formal parameters in a method declaration", - "the parameters list. The domain should be the entire method", + "the parameters list", ), "value.argument.formal.constructor": { description: "The value of a parameter in a constructor declaration", @@ -910,7 +913,7 @@ export const scopeSupportFacetInfos: Record< "value.argument.formal.constructor.iteration": iteration( "value", "values of formal parameters in a constructor declaration", - "the parameters list. The domain should be the entire constructor", + "the parameters list", ), "value.typeAlias": { description: "Value of a type alias declaration", @@ -936,7 +939,7 @@ export const scopeSupportFacetInfos: Record< "type.argument.formal.iteration": iteration( "type", "types of formal parameters in a function declaration", - "the parameters list. The domain should be the entire function", + "the parameters list", ), "type.argument.formal.method": { description: "Type of a formal parameter in a class method declaration", @@ -945,7 +948,16 @@ export const scopeSupportFacetInfos: Record< "type.argument.formal.method.iteration": iteration( "type", "types of formal parameters in a method declaration", - "the parameters list. The domain should be the entire method", + "the parameters list", + ), + "type.argument.formal.lambda": { + description: "Type of a formal parameter in a lambda declaration", + scopeType: "type", + }, + "type.argument.formal.lambda.iteration": iteration( + "type", + "types of formal parameters in a lambda declaration", + "the parameters list", ), "type.argument.formal.constructor": { description: "Type of a formal parameter in a constructor declaration", @@ -954,7 +966,7 @@ export const scopeSupportFacetInfos: Record< "type.argument.formal.constructor.iteration": iteration( "type", "types of formal parameters in a constructor declaration", - "the parameters list. The domain should be the entire constructor", + "the parameters list", ), "type.argument.catch": { description: "Type of a parameter in a catch clause", @@ -1014,11 +1026,6 @@ export const scopeSupportFacetInfos: Record< description: "Type in a 'with' / 'use' / 'using' statement", scopeType: "type", }, - "type.resource.iteration": iteration( - "type", - "types in a 'with' / 'use' / 'using' statement", - "the resource list. The domain should be the entire statement", - ), "type.iteration.block": blockIter("type", "types"), "type.iteration.class": classIter("type", "types"), "type.iteration.interface": interfaceIter("type", "types"), diff --git a/packages/common/src/scopeSupportFacets/scopeSupportFacets.types.ts b/packages/common/src/scopeSupportFacets/scopeSupportFacets.types.ts index a7cd3c13f0..e16d671505 100644 --- a/packages/common/src/scopeSupportFacets/scopeSupportFacets.types.ts +++ b/packages/common/src/scopeSupportFacets/scopeSupportFacets.types.ts @@ -81,6 +81,7 @@ export const scopeSupportFacets = [ "namedFunction.method", "namedFunction.iteration.document", "namedFunction.iteration.class", + "namedFunction.iteration.block", "functionCall", "functionCall.constructor", @@ -203,13 +204,14 @@ export const scopeSupportFacets = [ "name.field.interface", "name.field.enum", "name.resource", - "name.resource.iteration", "name.argument.actual", "name.argument.actual.iteration", "name.argument.formal", "name.argument.formal.iteration", "name.argument.formal.method", "name.argument.formal.method.iteration", + "name.argument.formal.lambda", + "name.argument.formal.lambda.iteration", "name.argument.formal.constructor", "name.argument.formal.constructor.iteration", "name.argument.catch", @@ -244,7 +246,6 @@ export const scopeSupportFacets = [ "value.switch", "value.typeAlias", "value.resource", - "value.resource.iteration", "value.argument.actual", "value.argument.actual.iteration", "value.argument.formal", @@ -272,13 +273,14 @@ export const scopeSupportFacets = [ "type.interface", "type.enum", "type.resource", - "type.resource.iteration", "type.typeArgument", "type.typeArgument.iteration", "type.argument.formal", "type.argument.formal.iteration", "type.argument.formal.method", "type.argument.formal.method.iteration", + "type.argument.formal.lambda", + "type.argument.formal.lambda.iteration", "type.argument.formal.constructor", "type.argument.formal.constructor.iteration", "type.argument.catch", diff --git a/packages/common/src/scopeSupportFacets/talon.ts b/packages/common/src/scopeSupportFacets/talon.ts index 676ae02c07..d7f0a1612e 100644 --- a/packages/common/src/scopeSupportFacets/talon.ts +++ b/packages/common/src/scopeSupportFacets/talon.ts @@ -128,6 +128,7 @@ export const talonScopeSupport: LanguageScopeSupportFacetMap = { namedFunction: notApplicable, "namedFunction.iteration.document": notApplicable, "namedFunction.iteration.class": notApplicable, + "namedFunction.iteration.block": notApplicable, "statement.function": notApplicable, "name.function": notApplicable, "interior.function": notApplicable, @@ -160,6 +161,10 @@ export const talonScopeSupport: LanguageScopeSupportFacetMap = { "argument.formal.lambda.singleLine": notApplicable, "argument.formal.lambda.multiLine": notApplicable, "argument.formal.lambda.iteration": notApplicable, + "name.argument.formal.lambda": notApplicable, + "name.argument.formal.lambda.iteration": notApplicable, + "type.argument.formal.lambda": notApplicable, + "type.argument.formal.lambda.iteration": notApplicable, "value.return.lambda": notApplicable, "interior.lambda": notApplicable, @@ -266,11 +271,8 @@ export const talonScopeSupport: LanguageScopeSupportFacetMap = { "statement.resource": notApplicable, "interior.resource": notApplicable, "name.resource": notApplicable, - "name.resource.iteration": notApplicable, "type.resource": notApplicable, - "type.resource.iteration": notApplicable, "value.resource": notApplicable, - "value.resource.iteration": notApplicable, // Pattern destructuring "statement.variable.destructuring": notApplicable, diff --git a/packages/common/src/scopeSupportFacets/talonList.ts b/packages/common/src/scopeSupportFacets/talonList.ts index 68238265a9..0edbbe760d 100644 --- a/packages/common/src/scopeSupportFacets/talonList.ts +++ b/packages/common/src/scopeSupportFacets/talonList.ts @@ -100,6 +100,7 @@ export const talonListScopeSupport: LanguageScopeSupportFacetMap = { namedFunction: notApplicable, "namedFunction.iteration.document": notApplicable, "namedFunction.iteration.class": notApplicable, + "namedFunction.iteration.block": notApplicable, "statement.function": notApplicable, "name.function": notApplicable, "interior.function": notApplicable, @@ -139,6 +140,10 @@ export const talonListScopeSupport: LanguageScopeSupportFacetMap = { "argument.formal.lambda.singleLine": notApplicable, "argument.formal.lambda.multiLine": notApplicable, "argument.formal.lambda.iteration": notApplicable, + "name.argument.formal.lambda": notApplicable, + "name.argument.formal.lambda.iteration": notApplicable, + "type.argument.formal.lambda": notApplicable, + "type.argument.formal.lambda.iteration": notApplicable, "value.return.lambda": notApplicable, "interior.lambda": notApplicable, @@ -245,11 +250,8 @@ export const talonListScopeSupport: LanguageScopeSupportFacetMap = { "statement.resource": notApplicable, "interior.resource": notApplicable, "name.resource": notApplicable, - "name.resource.iteration": notApplicable, "type.resource": notApplicable, - "type.resource.iteration": notApplicable, "value.resource": notApplicable, - "value.resource.iteration": notApplicable, // Pattern destructuring "statement.variable.destructuring": notApplicable, diff --git a/packages/common/src/scopeSupportFacets/typescript.ts b/packages/common/src/scopeSupportFacets/typescript.ts index 784fd5dbc4..ae08f0d7e2 100644 --- a/packages/common/src/scopeSupportFacets/typescript.ts +++ b/packages/common/src/scopeSupportFacets/typescript.ts @@ -11,6 +11,8 @@ export const typescriptScopeSupport: LanguageScopeSupportFacetMap = { "type.argument.formal.iteration": supported, "type.argument.formal.method": supported, "type.argument.formal.method.iteration": supported, + "type.argument.formal.lambda": supported, + "type.argument.formal.lambda.iteration": supported, "type.argument.formal.constructor": supported, "type.argument.formal.constructor.iteration": supported, "type.argument.catch": supported, diff --git a/packages/common/src/scopeSupportFacets/xml.ts b/packages/common/src/scopeSupportFacets/xml.ts index 60feaba508..7b6449dc27 100644 --- a/packages/common/src/scopeSupportFacets/xml.ts +++ b/packages/common/src/scopeSupportFacets/xml.ts @@ -124,6 +124,7 @@ export const xmlScopeSupport: LanguageScopeSupportFacetMap = { namedFunction: notApplicable, "namedFunction.iteration.document": notApplicable, "namedFunction.iteration.class": notApplicable, + "namedFunction.iteration.block": notApplicable, "statement.function": notApplicable, "name.function": notApplicable, "interior.function": notApplicable, @@ -148,6 +149,10 @@ export const xmlScopeSupport: LanguageScopeSupportFacetMap = { "argument.formal.lambda.singleLine": notApplicable, "argument.formal.lambda.multiLine": notApplicable, "argument.formal.lambda.iteration": notApplicable, + "name.argument.formal.lambda": notApplicable, + "name.argument.formal.lambda.iteration": notApplicable, + "type.argument.formal.lambda": notApplicable, + "type.argument.formal.lambda.iteration": notApplicable, "value.return.lambda": notApplicable, "interior.lambda": notApplicable, @@ -274,11 +279,8 @@ export const xmlScopeSupport: LanguageScopeSupportFacetMap = { "statement.resource": notApplicable, "interior.resource": notApplicable, "name.resource": notApplicable, - "name.resource.iteration": notApplicable, "type.resource": notApplicable, - "type.resource.iteration": notApplicable, "value.resource": notApplicable, - "value.resource.iteration": notApplicable, // Map map: notApplicable, diff --git a/packages/common/src/scopeSupportFacets/yaml.ts b/packages/common/src/scopeSupportFacets/yaml.ts index 0d091463fe..05f039f507 100644 --- a/packages/common/src/scopeSupportFacets/yaml.ts +++ b/packages/common/src/scopeSupportFacets/yaml.ts @@ -133,6 +133,7 @@ export const yamlScopeSupport: LanguageScopeSupportFacetMap = { namedFunction: notApplicable, "namedFunction.iteration.document": notApplicable, "namedFunction.iteration.class": notApplicable, + "namedFunction.iteration.block": notApplicable, "statement.function": notApplicable, "name.function": notApplicable, "interior.function": notApplicable, @@ -157,6 +158,10 @@ export const yamlScopeSupport: LanguageScopeSupportFacetMap = { "argument.formal.lambda.singleLine": notApplicable, "argument.formal.lambda.multiLine": notApplicable, "argument.formal.lambda.iteration": notApplicable, + "name.argument.formal.lambda": notApplicable, + "name.argument.formal.lambda.iteration": notApplicable, + "type.argument.formal.lambda": notApplicable, + "type.argument.formal.lambda.iteration": notApplicable, "value.return.lambda": notApplicable, "interior.lambda": notApplicable, @@ -282,11 +287,8 @@ export const yamlScopeSupport: LanguageScopeSupportFacetMap = { "statement.resource": notApplicable, "interior.resource": notApplicable, "name.resource": notApplicable, - "name.resource.iteration": notApplicable, "type.resource": notApplicable, - "type.resource.iteration": notApplicable, "value.resource": notApplicable, - "value.resource.iteration": notApplicable, // Block comment "comment.block": notApplicable, diff --git a/queries/python.scm b/queries/python.scm index 0f03f84bfc..9cde2abbdc 100644 --- a/queries/python.scm +++ b/queries/python.scm @@ -181,82 +181,9 @@ ;;!! with aaa: ;;! ^^^ -;;! -------- -( - (with_statement - (with_clause - (with_item)? @_.leading.endOf - . - (with_item - value: (_) @value @name - ) - . - (with_item)? @_.trailing.startOf - ) - ) @_.domain - (#not-type? @value "as_pattern") - (#allow-multiple! @value @name) -) - -;;!! with aaa: -;;! ^^^ -;;! -------- -( - (with_statement - (with_clause - (with_item)? @_.leading.endOf - . - (with_item - value: (_) @value @name - ) - . - (with_item)? @_.trailing.startOf - ) @_with_clause - ) - (#not-type? @value "as_pattern") - (#has-multiple-children-of-type? @_with_clause "with_item") - (#allow-multiple! @value @name) -) - -;;!! with aaa as bbb: -;;! ^^^ <~~ value -;;! ^^^ <~~ name -;;! ---------------- -( - (with_statement - (with_clause - (with_item - value: (as_pattern - (_) @value @name.leading.endOf - alias: (_) @name @value.trailing.startOf - ) - ) - ) - ) @_.domain - (#allow-multiple! @value @name) -) - -;;!! with aaa as ccc, bbb: -;;! ^^^ ^^^ -;;! ---------- --- -( - (with_statement - (with_clause - (with_item - value: (as_pattern - (_) @value @name.leading.endOf - alias: (_) @name @value.trailing.startOf - ) - ) @_.domain - ) @_with_clause - ) - (#has-multiple-children-of-type? @_with_clause "with_item") - (#allow-multiple! @value @name) -) - (with_statement - (with_clause) @name.iteration @value.iteration -) @name.iteration.domain @value.iteration.domain + (with_clause) @name +) @name.domain ;;!! lambda str: len(str) > 0 ;;! ^^^^^^^^^^^^ From d944953b56341ab2f66f86a2a67645f05a6b4e17 Mon Sep 17 00:00:00 2001 From: Andreas Arvidsson Date: Tue, 10 Feb 2026 13:02:17 +0100 Subject: [PATCH 2/6] more tests --- .../scopes/csharp/anonymousFunction.scope | 4 +- ...ame.argument.formal.lambda.iteration.scope | 13 ++++ ...ype.argument.formal.lambda.iteration.scope | 13 ++++ ...ame.argument.formal.lambda.iteration.scope | 13 ++++ .../go/name/name.argument.formal.lambda.scope | 62 +++++++++++++++++++ ...ype.argument.formal.lambda.iteration.scope | 13 ++++ .../go/type/type.argument.formal.lambda.scope | 39 ++++++++++++ .../scopes/java/anonymousFunction.scope | 4 +- ...ame.argument.formal.lambda.iteration.scope | 13 ++++ .../name/name.argument.formal.lambda.scope | 39 ++++++++++++ ...ype.argument.formal.lambda.iteration.scope | 13 ++++ ...ame.argument.formal.lambda.iteration.scope | 13 ++++ .../name/name.argument.formal.lambda.scope | 26 ++++++++ .../argument.formal.lambda.iteration.scope | 13 ++-- .../argument.formal.lambda.singleLine.scope | 38 ++++++------ ...rgumentList.formal.lambda.singleLine.scope | 30 ++++----- ...ame.argument.formal.lambda.iteration.scope | 13 ++++ .../name/name.argument.formal.lambda.scope | 32 ++++++++++ ...ype.argument.formal.lambda.iteration.scope | 13 ++++ .../type/type.argument.formal.lambda.scope | 39 ++++++++++++ ...ame.argument.formal.lambda.iteration.scope | 13 ++++ .../name/name.argument.formal.lambda.scope | 45 ++++++++++++++ ...ame.argument.formal.lambda.iteration.scope | 13 ++++ .../name/name.argument.formal.lambda.scope | 32 ++++++++++ ...ype.argument.formal.lambda.iteration.scope | 13 ++++ .../type/type.argument.formal.lambda.scope | 39 ++++++++++++ ...ame.argument.formal.lambda.iteration.scope | 13 ++++ .../name/name.argument.formal.lambda.scope | 32 ++++++++++ ...ype.argument.formal.lambda.iteration.scope | 13 ++++ .../type/type.argument.formal.lambda.scope | 39 ++++++++++++ ...ype.argument.formal.lambda.iteration.scope | 13 ++++ .../type/type.argument.formal.lambda.scope | 39 ++++++++++++ queries/kotlin.scm | 24 ++++--- 33 files changed, 716 insertions(+), 55 deletions(-) create mode 100644 data/fixtures/scopes/csharp/name/name.argument.formal.lambda.iteration.scope create mode 100644 data/fixtures/scopes/csharp/type/type.argument.formal.lambda.iteration.scope create mode 100644 data/fixtures/scopes/go/name/name.argument.formal.lambda.iteration.scope create mode 100644 data/fixtures/scopes/go/name/name.argument.formal.lambda.scope create mode 100644 data/fixtures/scopes/go/type/type.argument.formal.lambda.iteration.scope create mode 100644 data/fixtures/scopes/go/type/type.argument.formal.lambda.scope create mode 100644 data/fixtures/scopes/java/name/name.argument.formal.lambda.iteration.scope create mode 100644 data/fixtures/scopes/java/name/name.argument.formal.lambda.scope create mode 100644 data/fixtures/scopes/java/type/type.argument.formal.lambda.iteration.scope create mode 100644 data/fixtures/scopes/javascript.core/name/name.argument.formal.lambda.iteration.scope create mode 100644 data/fixtures/scopes/javascript.core/name/name.argument.formal.lambda.scope create mode 100644 data/fixtures/scopes/kotlin/name/name.argument.formal.lambda.iteration.scope create mode 100644 data/fixtures/scopes/kotlin/name/name.argument.formal.lambda.scope create mode 100644 data/fixtures/scopes/kotlin/type/type.argument.formal.lambda.iteration.scope create mode 100644 data/fixtures/scopes/kotlin/type/type.argument.formal.lambda.scope create mode 100644 data/fixtures/scopes/lua/name/name.argument.formal.lambda.iteration.scope create mode 100644 data/fixtures/scopes/lua/name/name.argument.formal.lambda.scope create mode 100644 data/fixtures/scopes/rust/name/name.argument.formal.lambda.iteration.scope create mode 100644 data/fixtures/scopes/rust/name/name.argument.formal.lambda.scope create mode 100644 data/fixtures/scopes/rust/type/type.argument.formal.lambda.iteration.scope create mode 100644 data/fixtures/scopes/rust/type/type.argument.formal.lambda.scope create mode 100644 data/fixtures/scopes/scala/name/name.argument.formal.lambda.iteration.scope create mode 100644 data/fixtures/scopes/scala/name/name.argument.formal.lambda.scope create mode 100644 data/fixtures/scopes/scala/type/type.argument.formal.lambda.iteration.scope create mode 100644 data/fixtures/scopes/scala/type/type.argument.formal.lambda.scope create mode 100644 data/fixtures/scopes/typescript.core/type/type.argument.formal.lambda.iteration.scope create mode 100644 data/fixtures/scopes/typescript.core/type/type.argument.formal.lambda.scope diff --git a/data/fixtures/scopes/csharp/anonymousFunction.scope b/data/fixtures/scopes/csharp/anonymousFunction.scope index d8674beeec..6ff2c1d6c3 100644 --- a/data/fixtures/scopes/csharp/anonymousFunction.scope +++ b/data/fixtures/scopes/csharp/anonymousFunction.scope @@ -1,10 +1,10 @@ -() => {}; +() => {} --- [Content] = [Removal] = [Domain] = 0:0-0:8 >--------< -0| () => {}; +0| () => {} [Insertion delimiter] = "\n" diff --git a/data/fixtures/scopes/csharp/name/name.argument.formal.lambda.iteration.scope b/data/fixtures/scopes/csharp/name/name.argument.formal.lambda.iteration.scope new file mode 100644 index 0000000000..3d9947fc2f --- /dev/null +++ b/data/fixtures/scopes/csharp/name/name.argument.formal.lambda.iteration.scope @@ -0,0 +1,13 @@ +(int aaa, int bbb) => {} +--- + +[#1 Content] = +[#1 Domain] = 0:0-0:24 + >------------------------< +0| (int aaa, int bbb) => {} + + +[#2 Content] = +[#2 Domain] = 0:1-0:17 + >----------------< +0| (int aaa, int bbb) => {} diff --git a/data/fixtures/scopes/csharp/type/type.argument.formal.lambda.iteration.scope b/data/fixtures/scopes/csharp/type/type.argument.formal.lambda.iteration.scope new file mode 100644 index 0000000000..3d9947fc2f --- /dev/null +++ b/data/fixtures/scopes/csharp/type/type.argument.formal.lambda.iteration.scope @@ -0,0 +1,13 @@ +(int aaa, int bbb) => {} +--- + +[#1 Content] = +[#1 Domain] = 0:0-0:24 + >------------------------< +0| (int aaa, int bbb) => {} + + +[#2 Content] = +[#2 Domain] = 0:1-0:17 + >----------------< +0| (int aaa, int bbb) => {} diff --git a/data/fixtures/scopes/go/name/name.argument.formal.lambda.iteration.scope b/data/fixtures/scopes/go/name/name.argument.formal.lambda.iteration.scope new file mode 100644 index 0000000000..a90621b702 --- /dev/null +++ b/data/fixtures/scopes/go/name/name.argument.formal.lambda.iteration.scope @@ -0,0 +1,13 @@ +foo := func(aaa int, bbb int) {} +--- + +[#1 Content] = +[#1 Domain] = 0:0-0:32 + >--------------------------------< +0| foo := func(aaa int, bbb int) {} + + +[#2 Content] = +[#2 Domain] = 0:12-0:28 + >----------------< +0| foo := func(aaa int, bbb int) {} diff --git a/data/fixtures/scopes/go/name/name.argument.formal.lambda.scope b/data/fixtures/scopes/go/name/name.argument.formal.lambda.scope new file mode 100644 index 0000000000..e491af1cc6 --- /dev/null +++ b/data/fixtures/scopes/go/name/name.argument.formal.lambda.scope @@ -0,0 +1,62 @@ +foo := func(aaa int, bbb int) {} +--- + +[#1 Content] = 0:0-0:3 + >---< +0| foo := func(aaa int, bbb int) {} + +[#1 Removal] = 0:0-0:7 + >-------< +0| foo := func(aaa int, bbb int) {} + +[#1 Trailing delimiter] = 0:3-0:4 + >-< +0| foo := func(aaa int, bbb int) {} + +[#1 Domain] = 0:0-0:32 + >--------------------------------< +0| foo := func(aaa int, bbb int) {} + +[#1 Insertion delimiter] = " " + + +[#2 Content] = 0:12-0:15 + >---< +0| foo := func(aaa int, bbb int) {} + +[#2 Removal] = 0:12-0:16 + >----< +0| foo := func(aaa int, bbb int) {} + +[#2 Trailing delimiter] = 0:15-0:16 + >-< +0| foo := func(aaa int, bbb int) {} + +[#2 Domain] = 0:12-0:19 + >-------< +0| foo := func(aaa int, bbb int) {} + +[#2 Insertion delimiter] = " " + + +[#3 Content] = 0:21-0:24 + >---< +0| foo := func(aaa int, bbb int) {} + +[#3 Removal] = 0:21-0:25 + >----< +0| foo := func(aaa int, bbb int) {} + +[#3 Leading delimiter] = 0:20-0:21 + >-< +0| foo := func(aaa int, bbb int) {} + +[#3 Trailing delimiter] = 0:24-0:25 + >-< +0| foo := func(aaa int, bbb int) {} + +[#3 Domain] = 0:21-0:28 + >-------< +0| foo := func(aaa int, bbb int) {} + +[#3 Insertion delimiter] = " " diff --git a/data/fixtures/scopes/go/type/type.argument.formal.lambda.iteration.scope b/data/fixtures/scopes/go/type/type.argument.formal.lambda.iteration.scope new file mode 100644 index 0000000000..a90621b702 --- /dev/null +++ b/data/fixtures/scopes/go/type/type.argument.formal.lambda.iteration.scope @@ -0,0 +1,13 @@ +foo := func(aaa int, bbb int) {} +--- + +[#1 Content] = +[#1 Domain] = 0:0-0:32 + >--------------------------------< +0| foo := func(aaa int, bbb int) {} + + +[#2 Content] = +[#2 Domain] = 0:12-0:28 + >----------------< +0| foo := func(aaa int, bbb int) {} diff --git a/data/fixtures/scopes/go/type/type.argument.formal.lambda.scope b/data/fixtures/scopes/go/type/type.argument.formal.lambda.scope new file mode 100644 index 0000000000..35599e34ea --- /dev/null +++ b/data/fixtures/scopes/go/type/type.argument.formal.lambda.scope @@ -0,0 +1,39 @@ +foo := func(aaa int, bbb int) {} +--- + +[#1 Content] = 0:16-0:19 + >---< +0| foo := func(aaa int, bbb int) {} + +[#1 Removal] = 0:15-0:19 + >----< +0| foo := func(aaa int, bbb int) {} + +[#1 Leading delimiter] = 0:15-0:16 + >-< +0| foo := func(aaa int, bbb int) {} + +[#1 Domain] = 0:12-0:19 + >-------< +0| foo := func(aaa int, bbb int) {} + +[#1 Insertion delimiter] = " " + + +[#2 Content] = 0:25-0:28 + >---< +0| foo := func(aaa int, bbb int) {} + +[#2 Removal] = 0:24-0:28 + >----< +0| foo := func(aaa int, bbb int) {} + +[#2 Leading delimiter] = 0:24-0:25 + >-< +0| foo := func(aaa int, bbb int) {} + +[#2 Domain] = 0:21-0:28 + >-------< +0| foo := func(aaa int, bbb int) {} + +[#2 Insertion delimiter] = " " diff --git a/data/fixtures/scopes/java/anonymousFunction.scope b/data/fixtures/scopes/java/anonymousFunction.scope index 8d87d11a99..ac977f56d5 100644 --- a/data/fixtures/scopes/java/anonymousFunction.scope +++ b/data/fixtures/scopes/java/anonymousFunction.scope @@ -1,10 +1,10 @@ -() -> {}; +() -> {} --- [Content] = [Removal] = [Domain] = 0:0-0:8 >--------< -0| () -> {}; +0| () -> {} [Insertion delimiter] = "\n" diff --git a/data/fixtures/scopes/java/name/name.argument.formal.lambda.iteration.scope b/data/fixtures/scopes/java/name/name.argument.formal.lambda.iteration.scope new file mode 100644 index 0000000000..ef9491d4d3 --- /dev/null +++ b/data/fixtures/scopes/java/name/name.argument.formal.lambda.iteration.scope @@ -0,0 +1,13 @@ +(int aaa, int bbb) -> {} +--- + +[#1 Content] = +[#1 Domain] = 0:0-0:24 + >------------------------< +0| (int aaa, int bbb) -> {} + + +[#2 Content] = +[#2 Domain] = 0:1-0:17 + >----------------< +0| (int aaa, int bbb) -> {} diff --git a/data/fixtures/scopes/java/name/name.argument.formal.lambda.scope b/data/fixtures/scopes/java/name/name.argument.formal.lambda.scope new file mode 100644 index 0000000000..de41f2efb1 --- /dev/null +++ b/data/fixtures/scopes/java/name/name.argument.formal.lambda.scope @@ -0,0 +1,39 @@ +(int aaa, int bbb) -> {} +--- + +[#1 Content] = 0:5-0:8 + >---< +0| (int aaa, int bbb) -> {} + +[#1 Removal] = 0:4-0:8 + >----< +0| (int aaa, int bbb) -> {} + +[#1 Leading delimiter] = 0:4-0:5 + >-< +0| (int aaa, int bbb) -> {} + +[#1 Domain] = 0:1-0:8 + >-------< +0| (int aaa, int bbb) -> {} + +[#1 Insertion delimiter] = " " + + +[#2 Content] = 0:14-0:17 + >---< +0| (int aaa, int bbb) -> {} + +[#2 Removal] = 0:13-0:17 + >----< +0| (int aaa, int bbb) -> {} + +[#2 Leading delimiter] = 0:13-0:14 + >-< +0| (int aaa, int bbb) -> {} + +[#2 Domain] = 0:10-0:17 + >-------< +0| (int aaa, int bbb) -> {} + +[#2 Insertion delimiter] = " " diff --git a/data/fixtures/scopes/java/type/type.argument.formal.lambda.iteration.scope b/data/fixtures/scopes/java/type/type.argument.formal.lambda.iteration.scope new file mode 100644 index 0000000000..ef9491d4d3 --- /dev/null +++ b/data/fixtures/scopes/java/type/type.argument.formal.lambda.iteration.scope @@ -0,0 +1,13 @@ +(int aaa, int bbb) -> {} +--- + +[#1 Content] = +[#1 Domain] = 0:0-0:24 + >------------------------< +0| (int aaa, int bbb) -> {} + + +[#2 Content] = +[#2 Domain] = 0:1-0:17 + >----------------< +0| (int aaa, int bbb) -> {} diff --git a/data/fixtures/scopes/javascript.core/name/name.argument.formal.lambda.iteration.scope b/data/fixtures/scopes/javascript.core/name/name.argument.formal.lambda.iteration.scope new file mode 100644 index 0000000000..eedb9defeb --- /dev/null +++ b/data/fixtures/scopes/javascript.core/name/name.argument.formal.lambda.iteration.scope @@ -0,0 +1,13 @@ +(aaa, bbb) => {} +--- + +[#1 Content] = +[#1 Domain] = 0:0-0:16 + >----------------< +0| (aaa, bbb) => {} + + +[#2 Content] = +[#2 Domain] = 0:1-0:9 + >--------< +0| (aaa, bbb) => {} diff --git a/data/fixtures/scopes/javascript.core/name/name.argument.formal.lambda.scope b/data/fixtures/scopes/javascript.core/name/name.argument.formal.lambda.scope new file mode 100644 index 0000000000..e9109ff898 --- /dev/null +++ b/data/fixtures/scopes/javascript.core/name/name.argument.formal.lambda.scope @@ -0,0 +1,26 @@ +(aaa, bbb) => {} +--- + +[#1 Content] = +[#1 Removal] = +[#1 Domain] = 0:1-0:4 + >---< +0| (aaa, bbb) => {} + +[#1 Insertion delimiter] = " " + + +[#2 Content] = +[#2 Domain] = 0:6-0:9 + >---< +0| (aaa, bbb) => {} + +[#2 Removal] = 0:5-0:9 + >----< +0| (aaa, bbb) => {} + +[#2 Leading delimiter] = 0:5-0:6 + >-< +0| (aaa, bbb) => {} + +[#2 Insertion delimiter] = " " diff --git a/data/fixtures/scopes/kotlin/argument/argument.formal.lambda.iteration.scope b/data/fixtures/scopes/kotlin/argument/argument.formal.lambda.iteration.scope index 11a8eddbfb..81beefa170 100644 --- a/data/fixtures/scopes/kotlin/argument/argument.formal.lambda.iteration.scope +++ b/data/fixtures/scopes/kotlin/argument/argument.formal.lambda.iteration.scope @@ -1,10 +1,7 @@ -{ aaa, bbb -> } +{aaa, bbb -> } --- -[Content] = 0:2-0:10 - >--------< -0| { aaa, bbb -> } - -[Domain] = 0:0-0:15 - >---------------< -0| { aaa, bbb -> } +[Content] = +[Domain] = 0:1-0:9 + >--------< +0| {aaa, bbb -> } diff --git a/data/fixtures/scopes/kotlin/argument/argument.formal.lambda.singleLine.scope b/data/fixtures/scopes/kotlin/argument/argument.formal.lambda.singleLine.scope index ec0eef877e..8b42e29773 100644 --- a/data/fixtures/scopes/kotlin/argument/argument.formal.lambda.singleLine.scope +++ b/data/fixtures/scopes/kotlin/argument/argument.formal.lambda.singleLine.scope @@ -1,33 +1,33 @@ -{ aaa, bbb -> } +{aaa, bbb -> } --- [#1 Content] = -[#1 Domain] = 0:2-0:5 - >---< -0| { aaa, bbb -> } +[#1 Domain] = 0:1-0:4 + >---< +0| {aaa, bbb -> } -[#1 Removal] = 0:2-0:7 - >-----< -0| { aaa, bbb -> } +[#1 Removal] = 0:1-0:6 + >-----< +0| {aaa, bbb -> } -[#1 Trailing delimiter] = 0:5-0:7 - >--< -0| { aaa, bbb -> } +[#1 Trailing delimiter] = 0:4-0:6 + >--< +0| {aaa, bbb -> } [#1 Insertion delimiter] = ", " [#2 Content] = -[#2 Domain] = 0:7-0:10 - >---< -0| { aaa, bbb -> } +[#2 Domain] = 0:6-0:9 + >---< +0| {aaa, bbb -> } -[#2 Removal] = 0:5-0:10 - >-----< -0| { aaa, bbb -> } +[#2 Removal] = 0:4-0:9 + >-----< +0| {aaa, bbb -> } -[#2 Leading delimiter] = 0:5-0:7 - >--< -0| { aaa, bbb -> } +[#2 Leading delimiter] = 0:4-0:6 + >--< +0| {aaa, bbb -> } [#2 Insertion delimiter] = ", " diff --git a/data/fixtures/scopes/kotlin/argumentList/argumentList.formal.lambda.singleLine.scope b/data/fixtures/scopes/kotlin/argumentList/argumentList.formal.lambda.singleLine.scope index 37f9417c86..fdec9f83f6 100644 --- a/data/fixtures/scopes/kotlin/argumentList/argumentList.formal.lambda.singleLine.scope +++ b/data/fixtures/scopes/kotlin/argumentList/argumentList.formal.lambda.singleLine.scope @@ -1,24 +1,20 @@ -{ aaa, bbb -> } +{aaa, bbb -> } --- -[Content] = 0:2-0:10 - >--------< -0| { aaa, bbb -> } +[Content] = 0:1-0:9 + >--------< +0| {aaa, bbb -> } -[Removal] = 0:2-0:11 - >---------< -0| { aaa, bbb -> } +[Removal] = 0:1-0:10 + >---------< +0| {aaa, bbb -> } -[Leading delimiter] = 0:1-0:2 - >-< -0| { aaa, bbb -> } +[Trailing delimiter] = 0:9-0:10 + >-< +0| {aaa, bbb -> } -[Trailing delimiter] = 0:10-0:11 - >-< -0| { aaa, bbb -> } - -[Domain] = 0:0-0:15 - >---------------< -0| { aaa, bbb -> } +[Domain] = 0:0-0:14 + >--------------< +0| {aaa, bbb -> } [Insertion delimiter] = ", " diff --git a/data/fixtures/scopes/kotlin/name/name.argument.formal.lambda.iteration.scope b/data/fixtures/scopes/kotlin/name/name.argument.formal.lambda.iteration.scope new file mode 100644 index 0000000000..397cf9615c --- /dev/null +++ b/data/fixtures/scopes/kotlin/name/name.argument.formal.lambda.iteration.scope @@ -0,0 +1,13 @@ +{aaa: Int, bbb: Int -> } +--- + +[#1 Content] = +[#1 Domain] = 0:0-0:24 + >------------------------< +0| {aaa: Int, bbb: Int -> } + + +[#2 Content] = +[#2 Domain] = 0:1-0:19 + >------------------< +0| {aaa: Int, bbb: Int -> } diff --git a/data/fixtures/scopes/kotlin/name/name.argument.formal.lambda.scope b/data/fixtures/scopes/kotlin/name/name.argument.formal.lambda.scope new file mode 100644 index 0000000000..1f6828a14a --- /dev/null +++ b/data/fixtures/scopes/kotlin/name/name.argument.formal.lambda.scope @@ -0,0 +1,32 @@ +{aaa: Int, bbb: Int -> } +--- + +[#1 Content] = +[#1 Removal] = 0:1-0:4 + >---< +0| {aaa: Int, bbb: Int -> } + +[#1 Domain] = 0:1-0:9 + >--------< +0| {aaa: Int, bbb: Int -> } + +[#1 Insertion delimiter] = " " + + +[#2 Content] = 0:11-0:14 + >---< +0| {aaa: Int, bbb: Int -> } + +[#2 Removal] = 0:10-0:14 + >----< +0| {aaa: Int, bbb: Int -> } + +[#2 Leading delimiter] = 0:10-0:11 + >-< +0| {aaa: Int, bbb: Int -> } + +[#2 Domain] = 0:11-0:19 + >--------< +0| {aaa: Int, bbb: Int -> } + +[#2 Insertion delimiter] = " " diff --git a/data/fixtures/scopes/kotlin/type/type.argument.formal.lambda.iteration.scope b/data/fixtures/scopes/kotlin/type/type.argument.formal.lambda.iteration.scope new file mode 100644 index 0000000000..397cf9615c --- /dev/null +++ b/data/fixtures/scopes/kotlin/type/type.argument.formal.lambda.iteration.scope @@ -0,0 +1,13 @@ +{aaa: Int, bbb: Int -> } +--- + +[#1 Content] = +[#1 Domain] = 0:0-0:24 + >------------------------< +0| {aaa: Int, bbb: Int -> } + + +[#2 Content] = +[#2 Domain] = 0:1-0:19 + >------------------< +0| {aaa: Int, bbb: Int -> } diff --git a/data/fixtures/scopes/kotlin/type/type.argument.formal.lambda.scope b/data/fixtures/scopes/kotlin/type/type.argument.formal.lambda.scope new file mode 100644 index 0000000000..e6995406fe --- /dev/null +++ b/data/fixtures/scopes/kotlin/type/type.argument.formal.lambda.scope @@ -0,0 +1,39 @@ +{aaa: Int, bbb: Int -> } +--- + +[#1 Content] = 0:6-0:9 + >---< +0| {aaa: Int, bbb: Int -> } + +[#1 Removal] = 0:4-0:9 + >-----< +0| {aaa: Int, bbb: Int -> } + +[#1 Leading delimiter] = 0:4-0:6 + >--< +0| {aaa: Int, bbb: Int -> } + +[#1 Domain] = 0:1-0:9 + >--------< +0| {aaa: Int, bbb: Int -> } + +[#1 Insertion delimiter] = " " + + +[#2 Content] = 0:16-0:19 + >---< +0| {aaa: Int, bbb: Int -> } + +[#2 Removal] = 0:14-0:19 + >-----< +0| {aaa: Int, bbb: Int -> } + +[#2 Leading delimiter] = 0:14-0:16 + >--< +0| {aaa: Int, bbb: Int -> } + +[#2 Domain] = 0:11-0:19 + >--------< +0| {aaa: Int, bbb: Int -> } + +[#2 Insertion delimiter] = " " diff --git a/data/fixtures/scopes/lua/name/name.argument.formal.lambda.iteration.scope b/data/fixtures/scopes/lua/name/name.argument.formal.lambda.iteration.scope new file mode 100644 index 0000000000..0e6f4c370c --- /dev/null +++ b/data/fixtures/scopes/lua/name/name.argument.formal.lambda.iteration.scope @@ -0,0 +1,13 @@ +f = function(aaa, bbb) end +--- + +[#1 Content] = +[#1 Domain] = 0:0-0:26 + >--------------------------< +0| f = function(aaa, bbb) end + + +[#2 Content] = +[#2 Domain] = 0:13-0:21 + >--------< +0| f = function(aaa, bbb) end diff --git a/data/fixtures/scopes/lua/name/name.argument.formal.lambda.scope b/data/fixtures/scopes/lua/name/name.argument.formal.lambda.scope new file mode 100644 index 0000000000..c6b1675b7b --- /dev/null +++ b/data/fixtures/scopes/lua/name/name.argument.formal.lambda.scope @@ -0,0 +1,45 @@ +f = function(aaa, bbb) end +--- + +[#1 Content] = 0:0-0:1 + >-< +0| f = function(aaa, bbb) end + +[#1 Removal] = 0:0-0:4 + >----< +0| f = function(aaa, bbb) end + +[#1 Trailing delimiter] = 0:1-0:4 + >---< +0| f = function(aaa, bbb) end + +[#1 Domain] = 0:0-0:26 + >--------------------------< +0| f = function(aaa, bbb) end + +[#1 Insertion delimiter] = " " + + +[#2 Content] = +[#2 Removal] = +[#2 Domain] = 0:13-0:16 + >---< +0| f = function(aaa, bbb) end + +[#2 Insertion delimiter] = " " + + +[#3 Content] = +[#3 Domain] = 0:18-0:21 + >---< +0| f = function(aaa, bbb) end + +[#3 Removal] = 0:17-0:21 + >----< +0| f = function(aaa, bbb) end + +[#3 Leading delimiter] = 0:17-0:18 + >-< +0| f = function(aaa, bbb) end + +[#3 Insertion delimiter] = " " diff --git a/data/fixtures/scopes/rust/name/name.argument.formal.lambda.iteration.scope b/data/fixtures/scopes/rust/name/name.argument.formal.lambda.iteration.scope new file mode 100644 index 0000000000..5914d3a8ce --- /dev/null +++ b/data/fixtures/scopes/rust/name/name.argument.formal.lambda.iteration.scope @@ -0,0 +1,13 @@ +|aaa: i32, bbb: i32| {} +--- + +[#1 Content] = +[#1 Domain] = 0:0-0:23 + >-----------------------< +0| |aaa: i32, bbb: i32| {} + + +[#2 Content] = +[#2 Domain] = 0:1-0:19 + >------------------< +0| |aaa: i32, bbb: i32| {} diff --git a/data/fixtures/scopes/rust/name/name.argument.formal.lambda.scope b/data/fixtures/scopes/rust/name/name.argument.formal.lambda.scope new file mode 100644 index 0000000000..6c8d57a6fb --- /dev/null +++ b/data/fixtures/scopes/rust/name/name.argument.formal.lambda.scope @@ -0,0 +1,32 @@ +|aaa: i32, bbb: i32| {} +--- + +[#1 Content] = +[#1 Removal] = 0:1-0:4 + >---< +0| |aaa: i32, bbb: i32| {} + +[#1 Domain] = 0:1-0:9 + >--------< +0| |aaa: i32, bbb: i32| {} + +[#1 Insertion delimiter] = " " + + +[#2 Content] = 0:11-0:14 + >---< +0| |aaa: i32, bbb: i32| {} + +[#2 Removal] = 0:10-0:14 + >----< +0| |aaa: i32, bbb: i32| {} + +[#2 Leading delimiter] = 0:10-0:11 + >-< +0| |aaa: i32, bbb: i32| {} + +[#2 Domain] = 0:11-0:19 + >--------< +0| |aaa: i32, bbb: i32| {} + +[#2 Insertion delimiter] = " " diff --git a/data/fixtures/scopes/rust/type/type.argument.formal.lambda.iteration.scope b/data/fixtures/scopes/rust/type/type.argument.formal.lambda.iteration.scope new file mode 100644 index 0000000000..5914d3a8ce --- /dev/null +++ b/data/fixtures/scopes/rust/type/type.argument.formal.lambda.iteration.scope @@ -0,0 +1,13 @@ +|aaa: i32, bbb: i32| {} +--- + +[#1 Content] = +[#1 Domain] = 0:0-0:23 + >-----------------------< +0| |aaa: i32, bbb: i32| {} + + +[#2 Content] = +[#2 Domain] = 0:1-0:19 + >------------------< +0| |aaa: i32, bbb: i32| {} diff --git a/data/fixtures/scopes/rust/type/type.argument.formal.lambda.scope b/data/fixtures/scopes/rust/type/type.argument.formal.lambda.scope new file mode 100644 index 0000000000..f876a766ba --- /dev/null +++ b/data/fixtures/scopes/rust/type/type.argument.formal.lambda.scope @@ -0,0 +1,39 @@ +|aaa: i32, bbb: i32| {} +--- + +[#1 Content] = 0:6-0:9 + >---< +0| |aaa: i32, bbb: i32| {} + +[#1 Removal] = 0:4-0:9 + >-----< +0| |aaa: i32, bbb: i32| {} + +[#1 Leading delimiter] = 0:4-0:6 + >--< +0| |aaa: i32, bbb: i32| {} + +[#1 Domain] = 0:1-0:9 + >--------< +0| |aaa: i32, bbb: i32| {} + +[#1 Insertion delimiter] = " " + + +[#2 Content] = 0:16-0:19 + >---< +0| |aaa: i32, bbb: i32| {} + +[#2 Removal] = 0:14-0:19 + >-----< +0| |aaa: i32, bbb: i32| {} + +[#2 Leading delimiter] = 0:14-0:16 + >--< +0| |aaa: i32, bbb: i32| {} + +[#2 Domain] = 0:11-0:19 + >--------< +0| |aaa: i32, bbb: i32| {} + +[#2 Insertion delimiter] = " " diff --git a/data/fixtures/scopes/scala/name/name.argument.formal.lambda.iteration.scope b/data/fixtures/scopes/scala/name/name.argument.formal.lambda.iteration.scope new file mode 100644 index 0000000000..bb50e00a92 --- /dev/null +++ b/data/fixtures/scopes/scala/name/name.argument.formal.lambda.iteration.scope @@ -0,0 +1,13 @@ +(aaa: Int, bbb: Int) => {} +--- + +[#1 Content] = +[#1 Domain] = 0:0-0:26 + >--------------------------< +0| (aaa: Int, bbb: Int) => {} + + +[#2 Content] = +[#2 Domain] = 0:1-0:19 + >------------------< +0| (aaa: Int, bbb: Int) => {} diff --git a/data/fixtures/scopes/scala/name/name.argument.formal.lambda.scope b/data/fixtures/scopes/scala/name/name.argument.formal.lambda.scope new file mode 100644 index 0000000000..a7a8dae84b --- /dev/null +++ b/data/fixtures/scopes/scala/name/name.argument.formal.lambda.scope @@ -0,0 +1,32 @@ +(aaa: Int, bbb: Int) => {} +--- + +[#1 Content] = +[#1 Removal] = 0:1-0:4 + >---< +0| (aaa: Int, bbb: Int) => {} + +[#1 Domain] = 0:1-0:9 + >--------< +0| (aaa: Int, bbb: Int) => {} + +[#1 Insertion delimiter] = " " + + +[#2 Content] = 0:11-0:14 + >---< +0| (aaa: Int, bbb: Int) => {} + +[#2 Removal] = 0:10-0:14 + >----< +0| (aaa: Int, bbb: Int) => {} + +[#2 Leading delimiter] = 0:10-0:11 + >-< +0| (aaa: Int, bbb: Int) => {} + +[#2 Domain] = 0:11-0:19 + >--------< +0| (aaa: Int, bbb: Int) => {} + +[#2 Insertion delimiter] = " " diff --git a/data/fixtures/scopes/scala/type/type.argument.formal.lambda.iteration.scope b/data/fixtures/scopes/scala/type/type.argument.formal.lambda.iteration.scope new file mode 100644 index 0000000000..bb50e00a92 --- /dev/null +++ b/data/fixtures/scopes/scala/type/type.argument.formal.lambda.iteration.scope @@ -0,0 +1,13 @@ +(aaa: Int, bbb: Int) => {} +--- + +[#1 Content] = +[#1 Domain] = 0:0-0:26 + >--------------------------< +0| (aaa: Int, bbb: Int) => {} + + +[#2 Content] = +[#2 Domain] = 0:1-0:19 + >------------------< +0| (aaa: Int, bbb: Int) => {} diff --git a/data/fixtures/scopes/scala/type/type.argument.formal.lambda.scope b/data/fixtures/scopes/scala/type/type.argument.formal.lambda.scope new file mode 100644 index 0000000000..a5dbc68da0 --- /dev/null +++ b/data/fixtures/scopes/scala/type/type.argument.formal.lambda.scope @@ -0,0 +1,39 @@ +(aaa: Int, bbb: Int) => {} +--- + +[#1 Content] = 0:6-0:9 + >---< +0| (aaa: Int, bbb: Int) => {} + +[#1 Removal] = 0:4-0:9 + >-----< +0| (aaa: Int, bbb: Int) => {} + +[#1 Leading delimiter] = 0:4-0:6 + >--< +0| (aaa: Int, bbb: Int) => {} + +[#1 Domain] = 0:1-0:9 + >--------< +0| (aaa: Int, bbb: Int) => {} + +[#1 Insertion delimiter] = " " + + +[#2 Content] = 0:16-0:19 + >---< +0| (aaa: Int, bbb: Int) => {} + +[#2 Removal] = 0:14-0:19 + >-----< +0| (aaa: Int, bbb: Int) => {} + +[#2 Leading delimiter] = 0:14-0:16 + >--< +0| (aaa: Int, bbb: Int) => {} + +[#2 Domain] = 0:11-0:19 + >--------< +0| (aaa: Int, bbb: Int) => {} + +[#2 Insertion delimiter] = " " diff --git a/data/fixtures/scopes/typescript.core/type/type.argument.formal.lambda.iteration.scope b/data/fixtures/scopes/typescript.core/type/type.argument.formal.lambda.iteration.scope new file mode 100644 index 0000000000..eff79d2e36 --- /dev/null +++ b/data/fixtures/scopes/typescript.core/type/type.argument.formal.lambda.iteration.scope @@ -0,0 +1,13 @@ +(aaa: number, bbb: number) => {} +--- + +[#1 Content] = +[#1 Domain] = 0:0-0:32 + >--------------------------------< +0| (aaa: number, bbb: number) => {} + + +[#2 Content] = +[#2 Domain] = 0:1-0:25 + >------------------------< +0| (aaa: number, bbb: number) => {} diff --git a/data/fixtures/scopes/typescript.core/type/type.argument.formal.lambda.scope b/data/fixtures/scopes/typescript.core/type/type.argument.formal.lambda.scope new file mode 100644 index 0000000000..bf0b332a2e --- /dev/null +++ b/data/fixtures/scopes/typescript.core/type/type.argument.formal.lambda.scope @@ -0,0 +1,39 @@ +(aaa: number, bbb: number) => {} +--- + +[#1 Content] = 0:6-0:12 + >------< +0| (aaa: number, bbb: number) => {} + +[#1 Removal] = 0:4-0:12 + >--------< +0| (aaa: number, bbb: number) => {} + +[#1 Leading delimiter] = 0:4-0:6 + >--< +0| (aaa: number, bbb: number) => {} + +[#1 Domain] = 0:1-0:12 + >-----------< +0| (aaa: number, bbb: number) => {} + +[#1 Insertion delimiter] = " " + + +[#2 Content] = 0:19-0:25 + >------< +0| (aaa: number, bbb: number) => {} + +[#2 Removal] = 0:17-0:25 + >--------< +0| (aaa: number, bbb: number) => {} + +[#2 Leading delimiter] = 0:17-0:19 + >--< +0| (aaa: number, bbb: number) => {} + +[#2 Domain] = 0:14-0:25 + >-----------< +0| (aaa: number, bbb: number) => {} + +[#2 Insertion delimiter] = " " diff --git a/queries/kotlin.scm b/queries/kotlin.scm index 36d9ea6761..0d9206d673 100644 --- a/queries/kotlin.scm +++ b/queries/kotlin.scm @@ -46,13 +46,19 @@ ;;!! { } ;;! ^ -(_ - "{" @statement.iteration.start.endOf @namedFunction.iteration.start.endOf - "}" @statement.iteration.end.startOf @namedFunction.iteration.end.startOf +( + (_ + "{" @statement.iteration.start.endOf @namedFunction.iteration.start.endOf + "}" @statement.iteration.end.startOf @namedFunction.iteration.end.startOf + ) @_dummy + (#not-type? @_dummy lambda_literal) ) -(_ - "{" @name.iteration.start.endOf @value.iteration.start.endOf @type.iteration.start.endOf - "}" @name.iteration.end.startOf @value.iteration.end.startOf @type.iteration.end.startOf +( + (_ + "{" @name.iteration.start.endOf @value.iteration.start.endOf @type.iteration.start.endOf + "}" @name.iteration.end.startOf @value.iteration.end.startOf @type.iteration.end.startOf + ) @_dummy + (#not-type? @_dummy lambda_literal) ) ;;!! { } @@ -536,10 +542,14 @@ ;;!! { aaa, bbb -> } ;;! ^^^^^^^^ (lambda_literal - (lambda_parameters) @argumentList @argumentOrParameter.iteration + (lambda_parameters) @argumentList (#empty-single-multi-delimiter! @argumentList @argumentList "" ", " ",\n") ) @argumentList.domain @argumentOrParameter.iteration.domain +;;!! { aaa, bbb -> } +;;! ^^^^^^^^ +(lambda_parameters) @argumentOrParameter.iteration @name.iteration @type.iteration + ;;!! { -> } (lambda_literal "{" @argumentList.start.endOf @argumentList.removal.start.endOf From 861cd1a8d9875adae58816eb7c055c3ad1da7d3d Mon Sep 17 00:00:00 2001 From: Andreas Arvidsson Date: Tue, 10 Feb 2026 13:20:12 +0100 Subject: [PATCH 3/6] arguments --- .../name/name.argument.formal.lambda.scope | 39 +++++++++++++++++ .../type/type.argument.formal.lambda.scope | 43 +++++++++++++++++++ .../name/name.argument.formal.lambda.scope | 39 +++++++++++++++++ .../type/type.argument.formal.lambda.scope | 43 +++++++++++++++++++ .../type/type.argument.formal.lambda.scope | 43 +++++++++++++++++++ .../common/src/scopeSupportFacets/java.ts | 2 +- 6 files changed, 208 insertions(+), 1 deletion(-) create mode 100644 data/fixtures/scopes/cpp/name/name.argument.formal.lambda.scope create mode 100644 data/fixtures/scopes/cpp/type/type.argument.formal.lambda.scope create mode 100644 data/fixtures/scopes/csharp/name/name.argument.formal.lambda.scope create mode 100644 data/fixtures/scopes/csharp/type/type.argument.formal.lambda.scope create mode 100644 data/fixtures/scopes/java/type/type.argument.formal.lambda.scope diff --git a/data/fixtures/scopes/cpp/name/name.argument.formal.lambda.scope b/data/fixtures/scopes/cpp/name/name.argument.formal.lambda.scope new file mode 100644 index 0000000000..00da09bc76 --- /dev/null +++ b/data/fixtures/scopes/cpp/name/name.argument.formal.lambda.scope @@ -0,0 +1,39 @@ +[](int aaa, int bbb) {} +--- + +[#1 Content] = 0:7-0:10 + >---< +0| [](int aaa, int bbb) {} + +[#1 Removal] = 0:6-0:10 + >----< +0| [](int aaa, int bbb) {} + +[#1 Leading delimiter] = 0:6-0:7 + >-< +0| [](int aaa, int bbb) {} + +[#1 Domain] = 0:3-0:10 + >-------< +0| [](int aaa, int bbb) {} + +[#1 Insertion delimiter] = " " + + +[#2 Content] = 0:16-0:19 + >---< +0| [](int aaa, int bbb) {} + +[#2 Removal] = 0:15-0:19 + >----< +0| [](int aaa, int bbb) {} + +[#2 Leading delimiter] = 0:15-0:16 + >-< +0| [](int aaa, int bbb) {} + +[#2 Domain] = 0:12-0:19 + >-------< +0| [](int aaa, int bbb) {} + +[#2 Insertion delimiter] = " " diff --git a/data/fixtures/scopes/cpp/type/type.argument.formal.lambda.scope b/data/fixtures/scopes/cpp/type/type.argument.formal.lambda.scope new file mode 100644 index 0000000000..d6ba0b8a11 --- /dev/null +++ b/data/fixtures/scopes/cpp/type/type.argument.formal.lambda.scope @@ -0,0 +1,43 @@ +[](int aaa, int bbb) {} +--- + +[#1 Content] = 0:3-0:6 + >---< +0| [](int aaa, int bbb) {} + +[#1 Removal] = 0:3-0:7 + >----< +0| [](int aaa, int bbb) {} + +[#1 Trailing delimiter] = 0:6-0:7 + >-< +0| [](int aaa, int bbb) {} + +[#1 Domain] = 0:3-0:10 + >-------< +0| [](int aaa, int bbb) {} + +[#1 Insertion delimiter] = " " + + +[#2 Content] = 0:12-0:15 + >---< +0| [](int aaa, int bbb) {} + +[#2 Removal] = 0:12-0:16 + >----< +0| [](int aaa, int bbb) {} + +[#2 Leading delimiter] = 0:11-0:12 + >-< +0| [](int aaa, int bbb) {} + +[#2 Trailing delimiter] = 0:15-0:16 + >-< +0| [](int aaa, int bbb) {} + +[#2 Domain] = 0:12-0:19 + >-------< +0| [](int aaa, int bbb) {} + +[#2 Insertion delimiter] = " " diff --git a/data/fixtures/scopes/csharp/name/name.argument.formal.lambda.scope b/data/fixtures/scopes/csharp/name/name.argument.formal.lambda.scope new file mode 100644 index 0000000000..b8a4e10a52 --- /dev/null +++ b/data/fixtures/scopes/csharp/name/name.argument.formal.lambda.scope @@ -0,0 +1,39 @@ +(int aaa, int bbb) => {} +--- + +[#1 Content] = 0:5-0:8 + >---< +0| (int aaa, int bbb) => {} + +[#1 Removal] = 0:4-0:8 + >----< +0| (int aaa, int bbb) => {} + +[#1 Leading delimiter] = 0:4-0:5 + >-< +0| (int aaa, int bbb) => {} + +[#1 Domain] = 0:1-0:8 + >-------< +0| (int aaa, int bbb) => {} + +[#1 Insertion delimiter] = " " + + +[#2 Content] = 0:14-0:17 + >---< +0| (int aaa, int bbb) => {} + +[#2 Removal] = 0:13-0:17 + >----< +0| (int aaa, int bbb) => {} + +[#2 Leading delimiter] = 0:13-0:14 + >-< +0| (int aaa, int bbb) => {} + +[#2 Domain] = 0:10-0:17 + >-------< +0| (int aaa, int bbb) => {} + +[#2 Insertion delimiter] = " " diff --git a/data/fixtures/scopes/csharp/type/type.argument.formal.lambda.scope b/data/fixtures/scopes/csharp/type/type.argument.formal.lambda.scope new file mode 100644 index 0000000000..f3ffceb0e0 --- /dev/null +++ b/data/fixtures/scopes/csharp/type/type.argument.formal.lambda.scope @@ -0,0 +1,43 @@ +(int aaa, int bbb) => {} +--- + +[#1 Content] = 0:1-0:4 + >---< +0| (int aaa, int bbb) => {} + +[#1 Removal] = 0:1-0:5 + >----< +0| (int aaa, int bbb) => {} + +[#1 Trailing delimiter] = 0:4-0:5 + >-< +0| (int aaa, int bbb) => {} + +[#1 Domain] = 0:1-0:8 + >-------< +0| (int aaa, int bbb) => {} + +[#1 Insertion delimiter] = " " + + +[#2 Content] = 0:10-0:13 + >---< +0| (int aaa, int bbb) => {} + +[#2 Removal] = 0:10-0:14 + >----< +0| (int aaa, int bbb) => {} + +[#2 Leading delimiter] = 0:9-0:10 + >-< +0| (int aaa, int bbb) => {} + +[#2 Trailing delimiter] = 0:13-0:14 + >-< +0| (int aaa, int bbb) => {} + +[#2 Domain] = 0:10-0:17 + >-------< +0| (int aaa, int bbb) => {} + +[#2 Insertion delimiter] = " " diff --git a/data/fixtures/scopes/java/type/type.argument.formal.lambda.scope b/data/fixtures/scopes/java/type/type.argument.formal.lambda.scope new file mode 100644 index 0000000000..eb5b42d28f --- /dev/null +++ b/data/fixtures/scopes/java/type/type.argument.formal.lambda.scope @@ -0,0 +1,43 @@ +(int aaa, int bbb) -> {} +--- + +[#1 Content] = 0:1-0:4 + >---< +0| (int aaa, int bbb) -> {} + +[#1 Removal] = 0:1-0:5 + >----< +0| (int aaa, int bbb) -> {} + +[#1 Trailing delimiter] = 0:4-0:5 + >-< +0| (int aaa, int bbb) -> {} + +[#1 Domain] = 0:1-0:8 + >-------< +0| (int aaa, int bbb) -> {} + +[#1 Insertion delimiter] = " " + + +[#2 Content] = 0:10-0:13 + >---< +0| (int aaa, int bbb) -> {} + +[#2 Removal] = 0:10-0:14 + >----< +0| (int aaa, int bbb) -> {} + +[#2 Leading delimiter] = 0:9-0:10 + >-< +0| (int aaa, int bbb) -> {} + +[#2 Trailing delimiter] = 0:13-0:14 + >-< +0| (int aaa, int bbb) -> {} + +[#2 Domain] = 0:10-0:17 + >-------< +0| (int aaa, int bbb) -> {} + +[#2 Insertion delimiter] = " " diff --git a/packages/common/src/scopeSupportFacets/java.ts b/packages/common/src/scopeSupportFacets/java.ts index 79828aba89..9930da9462 100644 --- a/packages/common/src/scopeSupportFacets/java.ts +++ b/packages/common/src/scopeSupportFacets/java.ts @@ -93,6 +93,7 @@ export const javaScopeSupport: LanguageScopeSupportFacetMap = { "namedFunction.constructor": supported, "namedFunction.method": supported, "namedFunction.iteration.class": supported, + "namedFunction.iteration.block": supported, ifStatement: supported, @@ -328,7 +329,6 @@ export const javaScopeSupport: LanguageScopeSupportFacetMap = { "value.iteration.enum": notApplicable, // Miscellaneous - "namedFunction.iteration.block": notApplicable, pairDelimiter: notApplicable, regularExpression: notApplicable, environment: notApplicable, From 201fb1974dc5d59c23270ade11a21b85fe5c74fc Mon Sep 17 00:00:00 2001 From: Andreas Arvidsson Date: Tue, 10 Feb 2026 13:36:26 +0100 Subject: [PATCH 4/6] Remove namedFunction.iteration.block --- data/scopeSupportFacetInfos.md | 1 - packages/common/src/scopeSupportFacets/c.ts | 3 +-- packages/common/src/scopeSupportFacets/csharp.ts | 1 - packages/common/src/scopeSupportFacets/css.ts | 1 - packages/common/src/scopeSupportFacets/go.ts | 1 - packages/common/src/scopeSupportFacets/html.ts | 1 - packages/common/src/scopeSupportFacets/java.ts | 1 - packages/common/src/scopeSupportFacets/javascript.ts | 1 - packages/common/src/scopeSupportFacets/json.ts | 1 - packages/common/src/scopeSupportFacets/kotlin.ts | 1 - packages/common/src/scopeSupportFacets/latex.ts | 1 - packages/common/src/scopeSupportFacets/lua.ts | 1 - packages/common/src/scopeSupportFacets/markdown.ts | 1 - packages/common/src/scopeSupportFacets/properties.ts | 1 - packages/common/src/scopeSupportFacets/python.ts | 1 - packages/common/src/scopeSupportFacets/rust.ts | 1 - packages/common/src/scopeSupportFacets/scala.ts | 1 - packages/common/src/scopeSupportFacets/scm.ts | 1 - .../common/src/scopeSupportFacets/scopeSupportFacetInfos.ts | 4 ---- .../common/src/scopeSupportFacets/scopeSupportFacets.types.ts | 1 - packages/common/src/scopeSupportFacets/talon.ts | 1 - packages/common/src/scopeSupportFacets/talonList.ts | 1 - packages/common/src/scopeSupportFacets/xml.ts | 1 - packages/common/src/scopeSupportFacets/yaml.ts | 1 - 24 files changed, 1 insertion(+), 28 deletions(-) diff --git a/data/scopeSupportFacetInfos.md b/data/scopeSupportFacetInfos.md index 83bf3ad9a9..6098f1f0cc 100644 --- a/data/scopeSupportFacetInfos.md +++ b/data/scopeSupportFacetInfos.md @@ -264,7 +264,6 @@ - `namedFunction` A named function declaration - `namedFunction.constructor` A constructor declaration in a class -- `namedFunction.iteration.block` Iteration scope for named functions: statement blocks (body of functions/if-statements/for-loops/etc). - `namedFunction.iteration.class` Iteration scope for named functions: class bodies. - `namedFunction.iteration.document` Iteration scope for named functions: the entire document including leading and trailing empty lines. - `namedFunction.method` A named method declaration in a class diff --git a/packages/common/src/scopeSupportFacets/c.ts b/packages/common/src/scopeSupportFacets/c.ts index 9dcc0ea685..0641842f04 100644 --- a/packages/common/src/scopeSupportFacets/c.ts +++ b/packages/common/src/scopeSupportFacets/c.ts @@ -216,9 +216,8 @@ export const cCoreScopeSupport: LanguageScopeSupportFacetMap = { notebookCell: notApplicable, "interior.cell": notApplicable, - // Nested class / function + // Nested class "class.iteration.block": notApplicable, - "namedFunction.iteration.block": notApplicable, // Interface "statement.interface": notApplicable, diff --git a/packages/common/src/scopeSupportFacets/csharp.ts b/packages/common/src/scopeSupportFacets/csharp.ts index e7ad062ab4..9255c7ca8b 100644 --- a/packages/common/src/scopeSupportFacets/csharp.ts +++ b/packages/common/src/scopeSupportFacets/csharp.ts @@ -33,7 +33,6 @@ export const csharpScopeSupport: LanguageScopeSupportFacetMap = { "namedFunction.constructor": supported, "namedFunction.method": supported, "namedFunction.iteration.class": supported, - "namedFunction.iteration.block": supported, "branch.if": supported, "branch.if.elif.else": supported, diff --git a/packages/common/src/scopeSupportFacets/css.ts b/packages/common/src/scopeSupportFacets/css.ts index 5a8a2189a3..7f7c35fa28 100644 --- a/packages/common/src/scopeSupportFacets/css.ts +++ b/packages/common/src/scopeSupportFacets/css.ts @@ -150,7 +150,6 @@ export const cssScopeSupport: LanguageScopeSupportFacetMap = { namedFunction: notApplicable, "namedFunction.iteration.document": notApplicable, "namedFunction.iteration.class": notApplicable, - "namedFunction.iteration.block": notApplicable, "statement.function": notApplicable, "name.function": notApplicable, "interior.function": notApplicable, diff --git a/packages/common/src/scopeSupportFacets/go.ts b/packages/common/src/scopeSupportFacets/go.ts index 5cf2036767..691dc4426b 100644 --- a/packages/common/src/scopeSupportFacets/go.ts +++ b/packages/common/src/scopeSupportFacets/go.ts @@ -344,7 +344,6 @@ export const goScopeSupport: LanguageScopeSupportFacetMap = { "value.return.lambda": notApplicable, "type.foreach": notApplicable, "type.cast": notApplicable, - "namedFunction.iteration.block": notApplicable, regularExpression: notApplicable, selector: notApplicable, unit: notApplicable, diff --git a/packages/common/src/scopeSupportFacets/html.ts b/packages/common/src/scopeSupportFacets/html.ts index 3aecf30162..551c4a85af 100644 --- a/packages/common/src/scopeSupportFacets/html.ts +++ b/packages/common/src/scopeSupportFacets/html.ts @@ -124,7 +124,6 @@ export const htmlScopeSupport: LanguageScopeSupportFacetMap = { namedFunction: notApplicable, "namedFunction.iteration.document": notApplicable, "namedFunction.iteration.class": notApplicable, - "namedFunction.iteration.block": notApplicable, "statement.function": notApplicable, "name.function": notApplicable, "interior.function": notApplicable, diff --git a/packages/common/src/scopeSupportFacets/java.ts b/packages/common/src/scopeSupportFacets/java.ts index 9930da9462..be53e48462 100644 --- a/packages/common/src/scopeSupportFacets/java.ts +++ b/packages/common/src/scopeSupportFacets/java.ts @@ -93,7 +93,6 @@ export const javaScopeSupport: LanguageScopeSupportFacetMap = { "namedFunction.constructor": supported, "namedFunction.method": supported, "namedFunction.iteration.class": supported, - "namedFunction.iteration.block": supported, ifStatement: supported, diff --git a/packages/common/src/scopeSupportFacets/javascript.ts b/packages/common/src/scopeSupportFacets/javascript.ts index 7a57adcca3..3ded4b01a3 100644 --- a/packages/common/src/scopeSupportFacets/javascript.ts +++ b/packages/common/src/scopeSupportFacets/javascript.ts @@ -63,7 +63,6 @@ export const javascriptCoreScopeSupport: LanguageScopeSupportFacetMap = { "namedFunction.iteration.document": supported, "namedFunction.method": supported, "namedFunction.iteration.class": supported, - "namedFunction.iteration.block": supported, "namedFunction.constructor": supported, functionCall: supported, diff --git a/packages/common/src/scopeSupportFacets/json.ts b/packages/common/src/scopeSupportFacets/json.ts index ca7d303a38..4ade4f3a51 100644 --- a/packages/common/src/scopeSupportFacets/json.ts +++ b/packages/common/src/scopeSupportFacets/json.ts @@ -127,7 +127,6 @@ export const jsonScopeSupport: LanguageScopeSupportFacetMap = { namedFunction: notApplicable, "namedFunction.iteration.document": notApplicable, "namedFunction.iteration.class": notApplicable, - "namedFunction.iteration.block": notApplicable, "statement.function": notApplicable, "name.function": notApplicable, "interior.function": notApplicable, diff --git a/packages/common/src/scopeSupportFacets/kotlin.ts b/packages/common/src/scopeSupportFacets/kotlin.ts index 16fe4b2e8a..c57f9f4a96 100644 --- a/packages/common/src/scopeSupportFacets/kotlin.ts +++ b/packages/common/src/scopeSupportFacets/kotlin.ts @@ -94,7 +94,6 @@ export const kotlinScopeSupport: LanguageScopeSupportFacetMap = { "namedFunction.method": supported, "namedFunction.iteration.document": supported, "namedFunction.iteration.class": supported, - "namedFunction.iteration.block": supported, ifStatement: supported, diff --git a/packages/common/src/scopeSupportFacets/latex.ts b/packages/common/src/scopeSupportFacets/latex.ts index 69e7b3d16e..af36435154 100644 --- a/packages/common/src/scopeSupportFacets/latex.ts +++ b/packages/common/src/scopeSupportFacets/latex.ts @@ -139,7 +139,6 @@ export const latexScopeSupport: LanguageScopeSupportFacetMap = { namedFunction: notApplicable, "namedFunction.iteration.document": notApplicable, "namedFunction.iteration.class": notApplicable, - "namedFunction.iteration.block": notApplicable, "statement.function": notApplicable, "name.function": notApplicable, "interior.function": notApplicable, diff --git a/packages/common/src/scopeSupportFacets/lua.ts b/packages/common/src/scopeSupportFacets/lua.ts index d979cc8e71..aaa9422a03 100644 --- a/packages/common/src/scopeSupportFacets/lua.ts +++ b/packages/common/src/scopeSupportFacets/lua.ts @@ -13,7 +13,6 @@ export const luaScopeSupport: LanguageScopeSupportFacetMap = { namedFunction: supported, "namedFunction.method": supported, "namedFunction.iteration.document": supported, - "namedFunction.iteration.block": supported, functionCall: supported, "functionCall.method": supported, diff --git a/packages/common/src/scopeSupportFacets/markdown.ts b/packages/common/src/scopeSupportFacets/markdown.ts index 38d03dad5d..e963210ec6 100644 --- a/packages/common/src/scopeSupportFacets/markdown.ts +++ b/packages/common/src/scopeSupportFacets/markdown.ts @@ -128,7 +128,6 @@ export const markdownScopeSupport: LanguageScopeSupportFacetMap = { namedFunction: notApplicable, "namedFunction.iteration.document": notApplicable, "namedFunction.iteration.class": notApplicable, - "namedFunction.iteration.block": notApplicable, "statement.function": notApplicable, "name.function": notApplicable, "interior.function": notApplicable, diff --git a/packages/common/src/scopeSupportFacets/properties.ts b/packages/common/src/scopeSupportFacets/properties.ts index da671cf3c6..ef00dd6532 100644 --- a/packages/common/src/scopeSupportFacets/properties.ts +++ b/packages/common/src/scopeSupportFacets/properties.ts @@ -97,7 +97,6 @@ export const propertiesScopeSupport: LanguageScopeSupportFacetMap = { namedFunction: notApplicable, "namedFunction.iteration.document": notApplicable, "namedFunction.iteration.class": notApplicable, - "namedFunction.iteration.block": notApplicable, "statement.function": notApplicable, "name.function": notApplicable, "interior.function": notApplicable, diff --git a/packages/common/src/scopeSupportFacets/python.ts b/packages/common/src/scopeSupportFacets/python.ts index 762809bb13..70dfe729ef 100644 --- a/packages/common/src/scopeSupportFacets/python.ts +++ b/packages/common/src/scopeSupportFacets/python.ts @@ -85,7 +85,6 @@ export const pythonScopeSupport: LanguageScopeSupportFacetMap = { "namedFunction.iteration.document": supported, "namedFunction.method": supported, "namedFunction.iteration.class": supported, - "namedFunction.iteration.block": supported, "argument.actual.singleLine": supported, "argument.actual.multiLine": supported, diff --git a/packages/common/src/scopeSupportFacets/rust.ts b/packages/common/src/scopeSupportFacets/rust.ts index 298a527e49..8ee45dfc93 100644 --- a/packages/common/src/scopeSupportFacets/rust.ts +++ b/packages/common/src/scopeSupportFacets/rust.ts @@ -338,7 +338,6 @@ export const rustScopeSupport: LanguageScopeSupportFacetMap = { "value.field.class": notApplicable, "type.foreach": notApplicable, "class.iteration.block": notApplicable, - "namedFunction.iteration.block": notApplicable, environment: notApplicable, regularExpression: notApplicable, selector: notApplicable, diff --git a/packages/common/src/scopeSupportFacets/scala.ts b/packages/common/src/scopeSupportFacets/scala.ts index 1725cf4e71..2ad667db80 100644 --- a/packages/common/src/scopeSupportFacets/scala.ts +++ b/packages/common/src/scopeSupportFacets/scala.ts @@ -96,7 +96,6 @@ export const scalaScopeSupport: LanguageScopeSupportFacetMap = { "namedFunction.method": supported, "namedFunction.iteration.class": supported, "namedFunction.iteration.document": supported, - "namedFunction.iteration.block": supported, ifStatement: supported, diff --git a/packages/common/src/scopeSupportFacets/scm.ts b/packages/common/src/scopeSupportFacets/scm.ts index 719ec5d708..292b94c75d 100644 --- a/packages/common/src/scopeSupportFacets/scm.ts +++ b/packages/common/src/scopeSupportFacets/scm.ts @@ -129,7 +129,6 @@ export const scmScopeSupport: LanguageScopeSupportFacetMap = { namedFunction: notApplicable, "namedFunction.iteration.document": notApplicable, "namedFunction.iteration.class": notApplicable, - "namedFunction.iteration.block": notApplicable, "statement.function": notApplicable, "name.function": notApplicable, "interior.function": notApplicable, diff --git a/packages/common/src/scopeSupportFacets/scopeSupportFacetInfos.ts b/packages/common/src/scopeSupportFacets/scopeSupportFacetInfos.ts index 1e5b1db41c..5d5e364e00 100644 --- a/packages/common/src/scopeSupportFacets/scopeSupportFacetInfos.ts +++ b/packages/common/src/scopeSupportFacets/scopeSupportFacetInfos.ts @@ -251,10 +251,6 @@ export const scopeSupportFacetInfos: Record< "namedFunction", "named functions", ), - "namedFunction.iteration.block": blockIter( - "namedFunction", - "named functions", - ), anonymousFunction: { description: "An anonymous function, eg a lambda function, an arrow function, etc.", diff --git a/packages/common/src/scopeSupportFacets/scopeSupportFacets.types.ts b/packages/common/src/scopeSupportFacets/scopeSupportFacets.types.ts index e16d671505..ffbd2a7768 100644 --- a/packages/common/src/scopeSupportFacets/scopeSupportFacets.types.ts +++ b/packages/common/src/scopeSupportFacets/scopeSupportFacets.types.ts @@ -81,7 +81,6 @@ export const scopeSupportFacets = [ "namedFunction.method", "namedFunction.iteration.document", "namedFunction.iteration.class", - "namedFunction.iteration.block", "functionCall", "functionCall.constructor", diff --git a/packages/common/src/scopeSupportFacets/talon.ts b/packages/common/src/scopeSupportFacets/talon.ts index d7f0a1612e..66fe30e4de 100644 --- a/packages/common/src/scopeSupportFacets/talon.ts +++ b/packages/common/src/scopeSupportFacets/talon.ts @@ -128,7 +128,6 @@ export const talonScopeSupport: LanguageScopeSupportFacetMap = { namedFunction: notApplicable, "namedFunction.iteration.document": notApplicable, "namedFunction.iteration.class": notApplicable, - "namedFunction.iteration.block": notApplicable, "statement.function": notApplicable, "name.function": notApplicable, "interior.function": notApplicable, diff --git a/packages/common/src/scopeSupportFacets/talonList.ts b/packages/common/src/scopeSupportFacets/talonList.ts index 0edbbe760d..f3f698348d 100644 --- a/packages/common/src/scopeSupportFacets/talonList.ts +++ b/packages/common/src/scopeSupportFacets/talonList.ts @@ -100,7 +100,6 @@ export const talonListScopeSupport: LanguageScopeSupportFacetMap = { namedFunction: notApplicable, "namedFunction.iteration.document": notApplicable, "namedFunction.iteration.class": notApplicable, - "namedFunction.iteration.block": notApplicable, "statement.function": notApplicable, "name.function": notApplicable, "interior.function": notApplicable, diff --git a/packages/common/src/scopeSupportFacets/xml.ts b/packages/common/src/scopeSupportFacets/xml.ts index 7b6449dc27..7f2f70c1d7 100644 --- a/packages/common/src/scopeSupportFacets/xml.ts +++ b/packages/common/src/scopeSupportFacets/xml.ts @@ -124,7 +124,6 @@ export const xmlScopeSupport: LanguageScopeSupportFacetMap = { namedFunction: notApplicable, "namedFunction.iteration.document": notApplicable, "namedFunction.iteration.class": notApplicable, - "namedFunction.iteration.block": notApplicable, "statement.function": notApplicable, "name.function": notApplicable, "interior.function": notApplicable, diff --git a/packages/common/src/scopeSupportFacets/yaml.ts b/packages/common/src/scopeSupportFacets/yaml.ts index 05f039f507..6ae04ee70a 100644 --- a/packages/common/src/scopeSupportFacets/yaml.ts +++ b/packages/common/src/scopeSupportFacets/yaml.ts @@ -133,7 +133,6 @@ export const yamlScopeSupport: LanguageScopeSupportFacetMap = { namedFunction: notApplicable, "namedFunction.iteration.document": notApplicable, "namedFunction.iteration.class": notApplicable, - "namedFunction.iteration.block": notApplicable, "statement.function": notApplicable, "name.function": notApplicable, "interior.function": notApplicable, From 0d4fc28a4c781287548580d192f5c3a2709a5cc5 Mon Sep 17 00:00:00 2001 From: Andreas Arvidsson Date: Tue, 10 Feb 2026 13:54:53 +0100 Subject: [PATCH 5/6] Python --- ...ame.argument.formal.lambda.iteration.scope | 16 ++++++--- .../name/name.argument.formal.lambda.scope | 33 +++++++++++++++++++ .../scopes/python/name/name.resource.scope | 20 +++++------ queries/python.scm | 13 ++++++-- 4 files changed, 64 insertions(+), 18 deletions(-) create mode 100644 data/fixtures/scopes/python/name/name.argument.formal.lambda.scope diff --git a/data/fixtures/scopes/python/name/name.argument.formal.lambda.iteration.scope b/data/fixtures/scopes/python/name/name.argument.formal.lambda.iteration.scope index f85311307a..a0dc96a0f5 100644 --- a/data/fixtures/scopes/python/name/name.argument.formal.lambda.iteration.scope +++ b/data/fixtures/scopes/python/name/name.argument.formal.lambda.iteration.scope @@ -1,7 +1,13 @@ -foo = lambda aaa, bbb: aaa + bbb +lambda aaa, bbb: pass --- -[Content] = -[Domain] = 0:0-0:32 - >--------------------------------< -0| foo = lambda aaa, bbb: aaa + bbb +[#1 Content] = +[#1 Domain] = 0:0-0:21 + >---------------------< +0| lambda aaa, bbb: pass + + +[#2 Content] = +[#2 Domain] = 0:7-0:15 + >--------< +0| lambda aaa, bbb: pass diff --git a/data/fixtures/scopes/python/name/name.argument.formal.lambda.scope b/data/fixtures/scopes/python/name/name.argument.formal.lambda.scope new file mode 100644 index 0000000000..92d95b6b02 --- /dev/null +++ b/data/fixtures/scopes/python/name/name.argument.formal.lambda.scope @@ -0,0 +1,33 @@ +lambda aaa, bbb: pass +--- + +[#1 Content] = +[#1 Domain] = 0:7-0:10 + >---< +0| lambda aaa, bbb: pass + +[#1 Removal] = 0:6-0:10 + >----< +0| lambda aaa, bbb: pass + +[#1 Leading delimiter] = 0:6-0:7 + >-< +0| lambda aaa, bbb: pass + +[#1 Insertion delimiter] = " " + + +[#2 Content] = +[#2 Domain] = 0:12-0:15 + >---< +0| lambda aaa, bbb: pass + +[#2 Removal] = 0:11-0:15 + >----< +0| lambda aaa, bbb: pass + +[#2 Leading delimiter] = 0:11-0:12 + >-< +0| lambda aaa, bbb: pass + +[#2 Insertion delimiter] = " " diff --git a/data/fixtures/scopes/python/name/name.resource.scope b/data/fixtures/scopes/python/name/name.resource.scope index 5c7e7f30b3..ee9ef4e50f 100644 --- a/data/fixtures/scopes/python/name/name.resource.scope +++ b/data/fixtures/scopes/python/name/name.resource.scope @@ -1,20 +1,20 @@ with foo: pass --- -[Content] = 0:5-0:15 - >----------< -0| with foo as bar: pass +[Content] = 0:5-0:8 + >---< +0| with foo: pass -[Removal] = 0:4-0:15 - >-----------< -0| with foo as bar: pass +[Removal] = 0:4-0:8 + >----< +0| with foo: pass [Leading delimiter] = 0:4-0:5 >-< -0| with foo as bar: pass +0| with foo: pass -[Domain] = 0:0-0:21 - >---------------------< -0| with foo as bar: pass +[Domain] = 0:0-0:14 + >--------------< +0| with foo: pass [Insertion delimiter] = " " diff --git a/queries/python.scm b/queries/python.scm index 9cde2abbdc..5ea4529068 100644 --- a/queries/python.scm +++ b/queries/python.scm @@ -613,14 +613,21 @@ ;;! ^^^^^^^^^^^^^^ (lambda) @anonymousFunction -;;!! lambda a, b: pass -;;! ^^^^ +;;!! lambda aaa, bbb: pass +;;! ^^^^^^^^ (lambda - (lambda_parameters) @argumentList @argumentOrParameter.iteration + (lambda_parameters) @argumentList @argumentOrParameter.iteration @name.iteration (#insertion-delimiter! @argumentList ", ") ) @argumentList.domain @argumentOrParameter.iteration.domain +;;!! lambda aaa, bbb: pass +;;! ^^^ ^^^ +(lambda_parameters + (_) @name +) + ;;!! lambda: pass +;;! >< (lambda . "lambda" @argumentList.start.endOf From b3345f06e7f6786d8bfa3964502ac72124e970d4 Mon Sep 17 00:00:00 2001 From: Andreas Arvidsson Date: Tue, 10 Feb 2026 14:08:53 +0100 Subject: [PATCH 6/6] Update lambda argument iteration scope for Kotlin --- .../kotlin/argument/argument.formal.lambda.iteration.scope | 7 +++++-- queries/kotlin.scm | 4 ++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/data/fixtures/scopes/kotlin/argument/argument.formal.lambda.iteration.scope b/data/fixtures/scopes/kotlin/argument/argument.formal.lambda.iteration.scope index 81beefa170..67eeeff3d3 100644 --- a/data/fixtures/scopes/kotlin/argument/argument.formal.lambda.iteration.scope +++ b/data/fixtures/scopes/kotlin/argument/argument.formal.lambda.iteration.scope @@ -1,7 +1,10 @@ {aaa, bbb -> } --- -[Content] = -[Domain] = 0:1-0:9 +[Content] = 0:1-0:9 >--------< 0| {aaa, bbb -> } + +[Domain] = 0:0-0:14 + >--------------< +0| {aaa, bbb -> } diff --git a/queries/kotlin.scm b/queries/kotlin.scm index 0d9206d673..9ccd72f015 100644 --- a/queries/kotlin.scm +++ b/queries/kotlin.scm @@ -542,13 +542,13 @@ ;;!! { aaa, bbb -> } ;;! ^^^^^^^^ (lambda_literal - (lambda_parameters) @argumentList + (lambda_parameters) @argumentList @argumentOrParameter.iteration (#empty-single-multi-delimiter! @argumentList @argumentList "" ", " ",\n") ) @argumentList.domain @argumentOrParameter.iteration.domain ;;!! { aaa, bbb -> } ;;! ^^^^^^^^ -(lambda_parameters) @argumentOrParameter.iteration @name.iteration @type.iteration +(lambda_parameters) @name.iteration @type.iteration ;;!! { -> } (lambda_literal