Skip to content

Commit 80e91bd

Browse files
Add in documentation for AttributeNodes
1 parent 02a1330 commit 80e91bd

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

CodeGeneration/Sources/SyntaxSupport/AttributeNodes.swift

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,7 @@ public let ATTRIBUTE_NODES: [Node] = [
199199
Child(
200200
name: "platformVersion",
201201
deprecatedName: "availabilityVersionRestriction",
202+
documentation: "The platform/version pair, e.g. `iOS 10.1`",
202203
kind: .node(kind: .platformVersion)
203204
),
204205
Child(
@@ -284,15 +285,19 @@ public let ATTRIBUTE_NODES: [Node] = [
284285
children: [
285286
Child(
286287
name: "witnessMethodLabel",
287-
kind: .token(choices: [.keyword(.witness_method)])
288+
kind: .token(choices: [.keyword(.witness_method)]),
289+
documentation: "The \"witnessMethod\" label."
288290
),
289291
Child(
290292
name: "colon",
291-
kind: .token(choices: [.token(.colon)])
293+
kind: .token(choices: [.token(.colon)]),
294+
documentation: "The colon separating the \"witnessMethod\" label and the original protocol name."
295+
292296
),
293297
Child(
294298
name: "protocolName",
295-
kind: .token(choices: [.token(.identifier)])
299+
kind: .token(choices: [.token(.identifier)]),
300+
documentation: "The original protocol name."
296301
),
297302
]
298303
),
@@ -445,6 +450,7 @@ public let ATTRIBUTE_NODES: [Node] = [
445450
name: "kindSpecifier",
446451
deprecatedName: "diffKind",
447452
kind: .token(choices: [.keyword(._forward), .keyword(.reverse), .keyword(._linear)]),
453+
documentation: "The differentiability kind, if it exists.",
448454
isOptional: true
449455
),
450456
Child(
@@ -458,6 +464,7 @@ public let ATTRIBUTE_NODES: [Node] = [
458464
name: "arguments",
459465
deprecatedName: "diffParams",
460466
kind: .node(kind: .differentiabilityWithRespectToArgument),
467+
documentation: "The differentiability arguments, if any exist.",
461468
isOptional: true
462469
),
463470
Child(
@@ -665,11 +672,13 @@ public let ATTRIBUTE_NODES: [Node] = [
665672
name: "name",
666673
kind: .node(kind: .token),
667674
nameForDiagnostics: "name",
675+
documentation: "The identifier name for a nullary selection, if it exists.",
668676
isOptional: true
669677
),
670678
Child(
671679
name: "colon",
672680
kind: .token(choices: [.token(.colon)]),
681+
documentation: "The colon separating the label and the value or a colon representing an unlabeled argument",
673682
isOptional: true
674683
),
675684
]

0 commit comments

Comments
 (0)