Skip to content

Commit 71c1759

Browse files
More clean up
1 parent 736a4a2 commit 71c1759

File tree

2 files changed

+105
-78
lines changed

2 files changed

+105
-78
lines changed

packages/common/src/scopeSupportFacets/c.ts

Lines changed: 105 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ export const cCoreScopeSupport: LanguageScopeSupportFacetMap = {
6969
"className.iteration.block": unsupported,
7070

7171
"functionName.iteration.document": unsupported,
72+
"namedFunction.iteration.document": unsupported,
7273

7374
"interior.class": unsupported,
7475
"interior.function": unsupported,
@@ -103,128 +104,155 @@ export const cCoreScopeSupport: LanguageScopeSupportFacetMap = {
103104

104105
"value.return": unsupported,
105106
"value.field": unsupported,
106-
"type.field.iteration": unsupported,
107107

108+
"type.field.iteration": unsupported,
108109
"type.argument.formal.iteration": unsupported,
109110

110111
// Not applicable (C and C++)
111112

112-
map: notApplicable,
113-
command: notApplicable,
114-
notebookCell: notApplicable,
115-
pairDelimiter: notApplicable,
113+
// Element and tags
114+
element: notApplicable,
115+
tags: notApplicable,
116+
startTag: notApplicable,
117+
endTag: notApplicable,
118+
"interior.element": notApplicable,
119+
"textFragment.element": notApplicable,
120+
121+
// Resource syntax
116122
"interior.resource": notApplicable,
117123
"type.resource": notApplicable,
118124
"type.resource.iteration": notApplicable,
119125
"name.resource": notApplicable,
120126
"name.resource.iteration": notApplicable,
121127
"value.resource": notApplicable,
122128
"value.resource.iteration": notApplicable,
123-
element: notApplicable,
124-
tags: notApplicable,
125-
startTag: notApplicable,
126-
endTag: notApplicable,
129+
130+
// Map literal
131+
map: notApplicable,
132+
"key.mapPair": notApplicable,
133+
"key.mapPair.iteration": notApplicable,
134+
"value.mapPair": notApplicable,
135+
"value.mapPair.iteration": notApplicable,
136+
137+
// Keyword argument
138+
"name.argument.actual": notApplicable,
139+
"name.argument.actual.iteration": notApplicable,
140+
"value.argument.actual": notApplicable,
141+
"value.argument.actual.iteration": notApplicable,
142+
143+
// Multiline string
144+
"string.multiLine": notApplicable,
145+
"textFragment.string.multiLine": notApplicable,
146+
147+
// Section
127148
section: notApplicable,
128149
"section.iteration.document": notApplicable,
129150
"section.iteration.parent": notApplicable,
130-
environment: notApplicable,
131-
regularExpression: notApplicable,
132-
"interior.element": notApplicable,
133-
"interior.command": notApplicable,
134-
"interior.cell": notApplicable,
135-
"string.multiLine": notApplicable,
136-
"textFragment.string.multiLine": notApplicable,
137-
"textFragment.element": notApplicable,
151+
152+
// Pattern destructing
138153
"name.assignment.pattern": notApplicable,
139154
"name.variable.pattern": notApplicable,
140155
"value.variable.pattern": notApplicable,
141-
"name.argument.actual": notApplicable,
142-
"name.argument.actual.iteration": notApplicable,
156+
157+
// Command
158+
command: notApplicable,
159+
"interior.command": notApplicable,
160+
161+
// Type alias
162+
"type.alias": notApplicable,
163+
"value.typeAlias": notApplicable,
164+
165+
// Notebook cell
166+
notebookCell: notApplicable,
167+
"interior.cell": notApplicable,
168+
169+
// Miscellaneous
143170
"key.attribute": notApplicable,
144-
"key.mapPair": notApplicable,
145-
"key.mapPair.iteration": notApplicable,
146-
"value.mapPair": notApplicable,
147-
"value.mapPair.iteration": notApplicable,
148-
"value.yield": notApplicable,
149-
"value.attribute": notApplicable,
150-
"value.argument.actual": notApplicable,
151-
"value.argument.actual.iteration": notApplicable,
152171
"type.interface": notApplicable,
153-
"value.typeAlias": notApplicable,
154-
"type.alias": notApplicable,
172+
"value.attribute": notApplicable,
173+
"value.yield": notApplicable,
174+
environment: notApplicable,
175+
pairDelimiter: notApplicable,
176+
regularExpression: notApplicable,
155177
};
156178

157179
export const cScopeSupport: LanguageScopeSupportFacetMap = {
158180
...cCoreScopeSupport,
159181

182+
// Not applicable for C, but supported for C++
160183
// These are defined here because we don't want C++ to import them and
161184
// accidentally forget to add support for them.
162185

163186
attribute: notApplicable,
164-
anonymousFunction: notApplicable,
187+
188+
// Lambda
189+
"argument.formal.lambda.iteration": notApplicable,
190+
"argument.formal.lambda": notApplicable,
191+
"argumentList.formal.lambda.empty": notApplicable,
192+
"argumentList.formal.lambda.multiLine": notApplicable,
193+
"argumentList.formal.lambda.singleLine": notApplicable,
165194
"interior.lambda": notApplicable,
195+
"value.return.lambda": notApplicable,
196+
anonymousFunction: notApplicable,
166197

167-
"argument.actual.constructor": notApplicable,
198+
// Constructor
168199
"argument.actual.constructor.iteration": notApplicable,
169-
"argument.formal.method": notApplicable,
170-
"argument.formal.method.iteration": notApplicable,
171-
"argument.formal.constructor": notApplicable,
200+
"argument.actual.constructor": notApplicable,
172201
"argument.formal.constructor.iteration": notApplicable,
173-
"argument.formal.lambda": notApplicable,
174-
"argument.formal.lambda.iteration": notApplicable,
175-
176-
"argumentList.actual.method.empty": notApplicable,
177-
"argumentList.actual.method.singleLine": notApplicable,
178-
"argumentList.actual.method.multiLine": notApplicable,
202+
"argument.formal.constructor": notApplicable,
179203
"argumentList.actual.constructor.empty": notApplicable,
180-
"argumentList.actual.constructor.singleLine": notApplicable,
181204
"argumentList.actual.constructor.multiLine": notApplicable,
205+
"argumentList.actual.constructor.singleLine": notApplicable,
182206
"argumentList.formal.constructor.empty": notApplicable,
183-
"argumentList.formal.constructor.singleLine": notApplicable,
184207
"argumentList.formal.constructor.multiLine": notApplicable,
185-
"argumentList.formal.lambda.empty": notApplicable,
186-
"argumentList.formal.lambda.singleLine": notApplicable,
187-
"argumentList.formal.lambda.multiLine": notApplicable,
188-
"argumentList.formal.method.empty": notApplicable,
189-
"argumentList.formal.method.singleLine": notApplicable,
190-
"argumentList.formal.method.multiLine": notApplicable,
191-
192-
"value.argument.formal": notApplicable,
193-
"value.argument.formal.iteration": notApplicable,
194-
"value.argument.formal.method": notApplicable,
195-
"value.argument.formal.method.iteration": notApplicable,
196-
"value.argument.formal.constructor": notApplicable,
208+
"argumentList.formal.constructor.singleLine": notApplicable,
209+
"functionCall.constructor": notApplicable,
210+
"functionCallee.constructor": notApplicable,
211+
"functionName.constructor": notApplicable,
212+
"name.argument.formal.constructor.iteration": notApplicable,
213+
"name.argument.formal.constructor": notApplicable,
214+
"name.constructor": notApplicable,
215+
"namedFunction.constructor": notApplicable,
216+
"type.argument.formal.constructor.iteration": notApplicable,
217+
"type.argument.formal.constructor": notApplicable,
197218
"value.argument.formal.constructor.iteration": notApplicable,
198-
"value.foreach": notApplicable,
199-
"value.return.lambda": notApplicable,
219+
"value.argument.formal.constructor": notApplicable,
200220

201-
"name.argument.formal.method": notApplicable,
221+
// Method
222+
"argument.formal.method.iteration": notApplicable,
223+
"argument.formal.method": notApplicable,
224+
"argumentList.actual.method.empty": notApplicable,
225+
"argumentList.actual.method.multiLine": notApplicable,
226+
"argumentList.actual.method.singleLine": notApplicable,
227+
"argumentList.formal.method.empty": notApplicable,
228+
"argumentList.formal.method.multiLine": notApplicable,
229+
"argumentList.formal.method.singleLine": notApplicable,
230+
"functionName.method.iteration.class": notApplicable,
231+
"functionName.method": notApplicable,
202232
"name.argument.formal.method.iteration": notApplicable,
203-
"name.argument.formal.constructor": notApplicable,
204-
"name.argument.formal.constructor.iteration": notApplicable,
233+
"name.argument.formal.method": notApplicable,
205234
"name.method": notApplicable,
206-
"name.constructor": notApplicable,
207-
"name.foreach": notApplicable,
208-
209-
"namedFunction.iteration.block": notApplicable,
210-
"namedFunction.iteration.document": notApplicable,
211-
"namedFunction.method": notApplicable,
212235
"namedFunction.method.iteration.class": notApplicable,
213-
"namedFunction.constructor": notApplicable,
236+
"namedFunction.method": notApplicable,
237+
"type.argument.formal.method.iteration": notApplicable,
238+
"type.argument.formal.method": notApplicable,
239+
"value.argument.formal.method.iteration": notApplicable,
240+
"value.argument.formal.method": notApplicable,
214241

215-
"functionName.iteration.block": notApplicable,
216-
"functionName.constructor": notApplicable,
217-
"functionName.method": notApplicable,
218-
"functionName.method.iteration.class": notApplicable,
242+
// Foreach
243+
"name.foreach": notApplicable,
244+
"type.foreach": notApplicable,
245+
"value.foreach": notApplicable,
219246

220-
"functionCall.constructor": notApplicable,
221-
"functionCallee.constructor": notApplicable,
247+
// Default argument value
248+
"value.argument.formal": notApplicable,
249+
"value.argument.formal.iteration": notApplicable,
222250

223-
"type.argument.formal.method": notApplicable,
224-
"type.argument.formal.method.iteration": notApplicable,
225-
"type.argument.formal.constructor": notApplicable,
226-
"type.argument.formal.constructor.iteration": notApplicable,
251+
// Generic type
227252
"type.typeArgument": notApplicable,
228253
"type.typeArgument.iteration": notApplicable,
229-
"type.foreach": notApplicable,
254+
255+
// Nested function
256+
"functionName.iteration.block": notApplicable,
257+
"namedFunction.iteration.block": notApplicable,
230258
};

packages/common/src/scopeSupportFacets/cpp.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@ export const cppScopeSupport: LanguageScopeSupportFacetMap = {
6767
"name.foreach": unsupported,
6868
"name.method": unsupported,
6969
"namedFunction.iteration.block": unsupported,
70-
"namedFunction.iteration.document": unsupported,
7170
"namedFunction.method.iteration.class": unsupported,
7271

7372
"value.foreach": unsupported,

0 commit comments

Comments
 (0)