@@ -202,10 +202,12 @@ public let ATTRIBUTE_NODES: [Node] = [
202
202
children: [
203
203
Child ( name: " Description " ,
204
204
kind: . nodeChoices( choices: [
205
- Child ( name: " Remote " ,
206
- kind: . node( kind: " RemotePackageDescription " ) ) ,
207
- Child ( name: " Local " ,
208
- kind: . node( kind: " LocalPackageDescription " ) )
205
+ Child ( name: " FileSystem " ,
206
+ kind: . node( kind: " FileSystemPackageDescription " ) ) ,
207
+ Child ( name: " SourceControl " ,
208
+ kind: . node( kind: " SourceControlPackageDescription " ) ) ,
209
+ Child ( name: " Registry " ,
210
+ kind: . node( kind: " RegistryPackageDescription " ) )
209
211
] ) ) ,
210
212
Child ( name: " Comma " ,
211
213
kind: . token( choices: [ . token( tokenKind: " CommaToken " ) ] ) ,
@@ -232,7 +234,7 @@ public let ATTRIBUTE_NODES: [Node] = [
232
234
description: " The exact product name from package " )
233
235
] ) ,
234
236
235
- Node ( name: " LocalPackageDescription " ,
237
+ Node ( name: " FileSystemPackageDescription " ,
236
238
nameForDiagnostics: " local package description " ,
237
239
description: " The description of a local package " ,
238
240
kind: " Syntax " ,
@@ -247,35 +249,61 @@ public let ATTRIBUTE_NODES: [Node] = [
247
249
description: " The package path " )
248
250
] ) ,
249
251
250
- Node ( name: " RemotePackageDescription " ,
252
+ Node ( name: " SourceControlPackageDescription " ,
253
+ nameForDiagnostics: " remote package description (source control) " ,
254
+ description: " The description of a remote package using source control " ,
255
+ kind: " Syntax " ,
256
+ children: [
257
+ Child ( name: " Label " ,
258
+ kind: . token( choices: [ . keyword( text: " url " ) ] ) ,
259
+ description: " The URL label " ) ,
260
+ Child ( name: " Colon " ,
261
+ kind: . token( choices: [ . token( tokenKind: " ColonToken " ) ] ) ) ,
262
+ Child ( name: " URL " ,
263
+ kind: . node( kind: " StringLiteralExpr " ) ,
264
+ description: " The Git URL of package " ) ,
265
+ Child ( name: " Comma " ,
266
+ kind: . token( choices: [ . token( tokenKind: " CommaToken " ) ] ) ,
267
+ description: " The comma between the package URL and requirement " ) ,
268
+ Child ( name: " Requirement " ,
269
+ kind: . nodeChoices( choices: [
270
+ Child ( name: " Labeled " ,
271
+ kind: . node( kind: " SourceControlRequirement " ) ) ,
272
+ Child ( name: " Range " ,
273
+ kind: . node( kind: " Expr " ) )
274
+ ] ) ,
275
+ description: " Version requirement of the remote package " )
276
+ ] ) ,
277
+
278
+ Node ( name: " RegistryPackageDescription " ,
251
279
nameForDiagnostics: " remote package description " ,
252
280
description: " The description of a remote package " ,
253
281
kind: " Syntax " ,
254
282
children: [
255
- Child ( name: " LocationLabel " ,
256
- kind: . token( choices: [ . keyword( text: " id " ) , . keyword ( text : " url " ) ] ) ,
257
- description: " The location label. " ) ,
258
- Child ( name: " LocationColon " ,
283
+ Child ( name: " Label " ,
284
+ kind: . token( choices: [ . keyword( text: " id " ) ] ) ,
285
+ description: " The ID label " ) ,
286
+ Child ( name: " Colon " ,
259
287
kind: . token( choices: [ . token( tokenKind: " ColonToken " ) ] ) ) ,
260
- Child ( name: " Location " ,
288
+ Child ( name: " Identifier " ,
261
289
kind: . node( kind: " StringLiteralExpr " ) ,
262
- description: " The URL or identifier of package. " ) ,
290
+ description: " The identifier of package " ) ,
263
291
Child ( name: " Comma " ,
264
292
kind: . token( choices: [ . token( tokenKind: " CommaToken " ) ] ) ,
265
- description: " The comma between the package location and requirement " ) ,
293
+ description: " The comma between the package identifier and requirement " ) ,
266
294
Child ( name: " Requirement " ,
267
295
kind: . nodeChoices( choices: [
268
296
Child ( name: " Labeled " ,
269
- kind: . node( kind: " LabeledPackageRequirement " ) ) ,
270
- Child ( name: " Wildcard " ,
297
+ kind: . node( kind: " RegistryRequirement " ) ) ,
298
+ Child ( name: " Range " ,
271
299
kind: . node( kind: " Expr " ) )
272
300
] ) ,
273
- description: " Version requirement of remote package " )
301
+ description: " Version requirement of the remote package " )
274
302
] ) ,
275
303
276
- Node ( name: " LabeledPackageRequirement " ,
277
- nameForDiagnostics: " labeled package requirement " ,
278
- description: " Labeled requirement of a remote package " ,
304
+ Node ( name: " SourceControlRequirement " ,
305
+ nameForDiagnostics: " labeled package requirement (source control) " ,
306
+ description: " Labeled requirement of a source-control package " ,
279
307
kind: " Syntax " ,
280
308
children: [
281
309
Child ( name: " Label " ,
@@ -290,6 +318,23 @@ public let ATTRIBUTE_NODES: [Node] = [
290
318
description: " Requirement description of remote package " )
291
319
] ) ,
292
320
321
+ Node ( name: " RegistryRequirement " ,
322
+ nameForDiagnostics: " labeled package requirement (registry) " ,
323
+ description: " Labeled requirement of a registry package " ,
324
+ kind: " Syntax " ,
325
+ children: [
326
+ Child ( name: " Label " ,
327
+ kind: . token( choices: [ . keyword( text: " exact " ) , . keyword( text: " from " ) ] ) ,
328
+ description: " The requirement label " ,
329
+ isOptional: true ) ,
330
+ Child ( name: " Colon " ,
331
+ kind: . token( choices: [ . token( tokenKind: " ColonToken " ) ] ) ,
332
+ isOptional: true ) ,
333
+ Child ( name: " Requirement " ,
334
+ kind: . node( kind: " StringLiteralExpr " ) ,
335
+ description: " Requirement description of remote package " )
336
+ ] ) ,
337
+
293
338
Node ( name: " ObjCSelectorPiece " ,
294
339
nameForDiagnostics: " Objective-C selector piece " ,
295
340
description: " A piece of an Objective-C selector. Either consisting of just an identifier for a nullary selector, an identifier and a colon for a labeled argument or just a colon for an unlabeled argument " ,
0 commit comments