Skip to content

Commit 5dae136

Browse files
Add missing scm scope facets (#2850)
1 parent be9ec8f commit 5dae136

File tree

12 files changed

+343
-25
lines changed

12 files changed

+343
-25
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
(#not-parent-type? @statement variable_declaration)
2+
---
3+
4+
[Range] = 0:19-0:50
5+
>-------------------------------<
6+
0| (#not-parent-type? @statement variable_declaration)
7+
8+
[Domain] = 0:0-0:51
9+
>---------------------------------------------------<
10+
0| (#not-parent-type? @statement variable_declaration)
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
(#not-parent-type? @statement variable_declaration)
2+
---
3+
4+
[#1 Content] =
5+
[#1 Domain] = 0:19-0:29
6+
>----------<
7+
0| (#not-parent-type? @statement variable_declaration)
8+
9+
[#1 Removal] = 0:19-0:30
10+
>-----------<
11+
0| (#not-parent-type? @statement variable_declaration)
12+
13+
[#1 Leading delimiter] = 0:18-0:19
14+
>-<
15+
0| (#not-parent-type? @statement variable_declaration)
16+
17+
[#1 Trailing delimiter] = 0:29-0:30
18+
>-<
19+
0| (#not-parent-type? @statement variable_declaration)
20+
21+
[#1 Insertion delimiter] = " "
22+
23+
24+
[#2 Content] =
25+
[#2 Domain] = 0:30-0:50
26+
>--------------------<
27+
0| (#not-parent-type? @statement variable_declaration)
28+
29+
[#2 Removal] = 0:29-0:50
30+
>---------------------<
31+
0| (#not-parent-type? @statement variable_declaration)
32+
33+
[#2 Leading delimiter] = 0:29-0:30
34+
>-<
35+
0| (#not-parent-type? @statement variable_declaration)
36+
37+
[#2 Insertion delimiter] = " "
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
;; Hello world
2+
---
3+
4+
[Content] =
5+
[Removal] =
6+
[Domain] = 0:0-0:14
7+
>--------------<
8+
0| ;; Hello world
9+
10+
[Insertion delimiter] = "\n"
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
(#not-parent-type? @statement variable_declaration)
2+
---
3+
4+
[Content] =
5+
[Removal] =
6+
[Domain] = 0:0-0:51
7+
>---------------------------------------------------<
8+
0| (#not-parent-type? @statement variable_declaration)
9+
10+
[Insertion delimiter] = " "
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
(#not-parent-type? @statement variable_declaration)
2+
---
3+
4+
[Content] =
5+
[Removal] = 0:2-0:18
6+
>----------------<
7+
0| (#not-parent-type? @statement variable_declaration)
8+
9+
[Trailing delimiter] = 0:18-0:19
10+
>-<
11+
0| (#not-parent-type? @statement variable_declaration)
12+
13+
[Domain] = 0:0-0:51
14+
>---------------------------------------------------<
15+
0| (#not-parent-type? @statement variable_declaration)
16+
17+
[Insertion delimiter] = " "

data/fixtures/scopes/scm/list.scope

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
[
2+
(foo)
3+
(bar)
4+
] @list
5+
---
6+
7+
[Content] = 0:0-3:1
8+
>-
9+
0| [
10+
1| (foo)
11+
2| (bar)
12+
3| ] @list
13+
-<
14+
15+
[Removal] = 0:0-3:2
16+
>-
17+
0| [
18+
1| (foo)
19+
2| (bar)
20+
3| ] @list
21+
--<
22+
23+
[Trailing delimiter] = 3:1-3:2
24+
>-<
25+
3| ] @list
26+
27+
[Domain] = 0:0-3:7
28+
>-
29+
0| [
30+
1| (foo)
31+
2| (bar)
32+
3| ] @list
33+
-------<
34+
35+
[Insertion delimiter] = " "
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
"hello world"
2+
---
3+
4+
[Content] =
5+
[Removal] =
6+
[Domain] = 0:0-0:13
7+
>-------------<
8+
0| "hello world"
9+
10+
[Insertion delimiter] = " "
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
;; Hello world
2+
---
3+
4+
[Content] =
5+
[Removal] =
6+
[Domain] = 0:0-0:14
7+
>--------------<
8+
0| ;; Hello world
9+
10+
[Insertion delimiter] = " "
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
"hello world"
2+
---
3+
4+
[Content] =
5+
[Removal] =
6+
[Domain] = 0:1-0:12
7+
>-----------<
8+
0| "hello world"
9+
10+
[Insertion delimiter] = " "
Lines changed: 165 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,172 @@
11
import type { LanguageScopeSupportFacetMap } from "./scopeSupportFacets.types";
22
import { ScopeSupportFacetLevel } from "./scopeSupportFacets.types";
33

4-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
5-
const { supported, unsupported, notApplicable } = ScopeSupportFacetLevel;
4+
const { supported, notApplicable } = ScopeSupportFacetLevel;
65

76
export const scmScopeSupport: LanguageScopeSupportFacetMap = {
87
statement: supported,
8+
9+
"argument.actual": supported,
10+
"argument.actual.iteration": supported,
11+
"comment.line": supported,
12+
functionCall: supported,
13+
functionCallee: supported,
14+
"string.singleLine": supported,
15+
"textFragment.comment.line": supported,
16+
"textFragment.string.singleLine": supported,
17+
list: supported,
18+
19+
// Not applicable
20+
21+
anonymousFunction: notApplicable,
22+
"argument.actual.constructor": notApplicable,
23+
"argument.actual.constructor.iteration": notApplicable,
24+
"argument.actual.method": notApplicable,
25+
"argument.actual.method.iteration": notApplicable,
26+
"argument.formal": notApplicable,
27+
"argument.formal.constructor": notApplicable,
28+
"argument.formal.constructor.iteration": notApplicable,
29+
"argument.formal.iteration": notApplicable,
30+
"argument.formal.method": notApplicable,
31+
"argument.formal.method.iteration": notApplicable,
32+
attribute: notApplicable,
33+
"branch.if": notApplicable,
34+
"branch.if.iteration": notApplicable,
35+
"branch.loop": notApplicable,
36+
"branch.switchCase": notApplicable,
37+
"branch.switchCase.iteration": notApplicable,
38+
"branch.ternary": notApplicable,
39+
"branch.try": notApplicable,
40+
"branch.try.iteration": notApplicable,
41+
class: notApplicable,
42+
"class.iteration.block": notApplicable,
43+
"class.iteration.document": notApplicable,
44+
className: notApplicable,
45+
"className.iteration.block": notApplicable,
46+
"className.iteration.document": notApplicable,
47+
command: notApplicable,
48+
"comment.block": notApplicable,
49+
"condition.doWhile": notApplicable,
50+
"condition.for": notApplicable,
51+
"condition.if": notApplicable,
52+
"condition.switchCase": notApplicable,
53+
"condition.switchCase.iteration": notApplicable,
54+
"condition.ternary": notApplicable,
55+
"condition.while": notApplicable,
56+
"collectionItem.unenclosed": notApplicable,
57+
"collectionItem.unenclosed.iteration": notApplicable,
58+
disqualifyDelimiter: notApplicable,
59+
element: notApplicable,
60+
endTag: notApplicable,
61+
environment: notApplicable,
62+
fieldAccess: notApplicable,
63+
"functionCall.constructor": notApplicable,
64+
"functionCallee.constructor": notApplicable,
65+
functionName: notApplicable,
66+
"functionName.constructor": notApplicable,
67+
"functionName.iteration.block": notApplicable,
68+
"functionName.iteration.document": notApplicable,
69+
"functionName.method": notApplicable,
70+
"functionName.method.iteration.class": notApplicable,
71+
ifStatement: notApplicable,
72+
"interior.cell": notApplicable,
73+
"interior.class": notApplicable,
74+
"interior.command": notApplicable,
75+
"interior.element": notApplicable,
76+
"interior.function": notApplicable,
77+
"interior.if": notApplicable,
78+
"interior.lambda": notApplicable,
79+
"interior.loop": notApplicable,
80+
"interior.resource": notApplicable,
81+
"interior.switchCase": notApplicable,
82+
"interior.ternary": notApplicable,
83+
"interior.try": notApplicable,
84+
"key.attribute": notApplicable,
85+
"key.mapPair": notApplicable,
86+
"key.mapPair.iteration": notApplicable,
87+
map: notApplicable,
88+
"name.argument.actual": notApplicable,
89+
"name.argument.actual.iteration": notApplicable,
90+
"name.argument.formal": notApplicable,
91+
"name.argument.formal.constructor": notApplicable,
92+
"name.argument.formal.constructor.iteration": notApplicable,
93+
"name.argument.formal.iteration": notApplicable,
94+
"name.argument.formal.method": notApplicable,
95+
"name.argument.formal.method.iteration": notApplicable,
96+
"name.assignment": notApplicable,
97+
"name.assignment.pattern": notApplicable,
98+
"name.class": notApplicable,
99+
"name.constructor": notApplicable,
100+
"name.field": notApplicable,
101+
"name.foreach": notApplicable,
102+
"name.function": notApplicable,
103+
"name.iteration.block": notApplicable,
104+
"name.iteration.document": notApplicable,
105+
"name.method": notApplicable,
106+
"name.resource": notApplicable,
107+
"name.resource.iteration": notApplicable,
108+
"name.variable": notApplicable,
109+
"name.variable.pattern": notApplicable,
110+
namedFunction: notApplicable,
111+
"namedFunction.constructor": notApplicable,
112+
"namedFunction.iteration.block": notApplicable,
113+
"namedFunction.iteration.document": notApplicable,
114+
"namedFunction.method": notApplicable,
115+
"namedFunction.method.iteration.class": notApplicable,
116+
notebookCell: notApplicable,
117+
pairDelimiter: notApplicable,
118+
regularExpression: notApplicable,
119+
section: notApplicable,
120+
"section.iteration.document": notApplicable,
121+
"section.iteration.parent": notApplicable,
122+
startTag: notApplicable,
123+
"statement.class": notApplicable,
124+
"statement.iteration.block": notApplicable,
125+
"statement.iteration.document": notApplicable,
126+
"string.multiLine": notApplicable,
127+
switchStatementSubject: notApplicable,
128+
tags: notApplicable,
129+
"textFragment.comment.block": notApplicable,
130+
"textFragment.element": notApplicable,
131+
"textFragment.string.multiLine": notApplicable,
132+
"type.alias": notApplicable,
133+
"type.argument.formal": notApplicable,
134+
"type.argument.formal.constructor": notApplicable,
135+
"type.argument.formal.constructor.iteration": notApplicable,
136+
"type.argument.formal.iteration": notApplicable,
137+
"type.argument.formal.method": notApplicable,
138+
"type.argument.formal.method.iteration": notApplicable,
139+
"type.cast": notApplicable,
140+
"type.class": notApplicable,
141+
"type.enum": notApplicable,
142+
"type.field": notApplicable,
143+
"type.field.iteration": notApplicable,
144+
"type.foreach": notApplicable,
145+
"type.interface": notApplicable,
146+
"type.return": notApplicable,
147+
"type.typeArgument": notApplicable,
148+
"type.typeArgument.iteration": notApplicable,
149+
"type.variable": notApplicable,
150+
"value.argument.actual": notApplicable,
151+
"value.argument.actual.iteration": notApplicable,
152+
"value.argument.formal": notApplicable,
153+
"value.argument.formal.constructor": notApplicable,
154+
"value.argument.formal.constructor.iteration": notApplicable,
155+
"value.argument.formal.iteration": notApplicable,
156+
"value.argument.formal.method": notApplicable,
157+
"value.argument.formal.method.iteration": notApplicable,
158+
"value.assignment": notApplicable,
159+
"value.attribute": notApplicable,
160+
"value.field": notApplicable,
161+
"value.foreach": notApplicable,
162+
"value.mapPair": notApplicable,
163+
"value.mapPair.iteration": notApplicable,
164+
"value.resource": notApplicable,
165+
"value.resource.iteration": notApplicable,
166+
"value.return": notApplicable,
167+
"value.return.lambda": notApplicable,
168+
"value.typeAlias": notApplicable,
169+
"value.variable": notApplicable,
170+
"value.variable.pattern": notApplicable,
171+
"value.yield": notApplicable,
9172
};

0 commit comments

Comments
 (0)