diff --git a/CodeGeneration/Sources/SyntaxSupport/AttributeNodes.swift b/CodeGeneration/Sources/SyntaxSupport/AttributeNodes.swift index 9a7098b04c4..b7a9dbe5bea 100644 --- a/CodeGeneration/Sources/SyntaxSupport/AttributeNodes.swift +++ b/CodeGeneration/Sources/SyntaxSupport/AttributeNodes.swift @@ -203,7 +203,8 @@ public let ATTRIBUTE_NODES: [Node] = [ Child( name: "platformVersion", deprecatedName: "availabilityVersionRestriction", - kind: .node(kind: .platformVersion) + kind: .node(kind: .platformVersion), + documentation: "The platform/version pair, e.g. `iOS 10.1`" ), Child( name: "trailingComma", @@ -292,15 +293,19 @@ public let ATTRIBUTE_NODES: [Node] = [ children: [ Child( name: "witnessMethodLabel", - kind: .token(choices: [.keyword(.witness_method)]) + kind: .token(choices: [.keyword(.witness_method)]), + documentation: #"The `witnessMethod` label."# ), Child( name: "colon", - kind: .token(choices: [.token(.colon)]) + kind: .token(choices: [.token(.colon)]), + documentation: #"The colon separating the `witnessMethod` label and the original protocol name."# + ), Child( name: "protocolName", - kind: .token(choices: [.token(.identifier)]) + kind: .token(choices: [.token(.identifier)]), + documentation: "The original protocol name." ), ] ), @@ -454,6 +459,7 @@ public let ATTRIBUTE_NODES: [Node] = [ name: "kindSpecifier", deprecatedName: "diffKind", kind: .token(choices: [.keyword(._forward), .keyword(.reverse), .keyword(._linear)]), + documentation: "The differentiability kind, if it exists.", isOptional: true ), Child( @@ -467,6 +473,7 @@ public let ATTRIBUTE_NODES: [Node] = [ name: "arguments", deprecatedName: "diffParams", kind: .node(kind: .differentiabilityWithRespectToArgument), + documentation: "The differentiability arguments, if any exists.", isOptional: true ), Child( @@ -675,11 +682,13 @@ public let ATTRIBUTE_NODES: [Node] = [ name: "name", kind: .node(kind: .token), nameForDiagnostics: "name", + documentation: "The identifier name for a nullary selection, if it exists.", isOptional: true ), Child( name: "colon", kind: .token(choices: [.token(.colon)]), + documentation: "The colon separating the label and the value or a colon representing an unlabeled argument", isOptional: true ), ] diff --git a/Sources/SwiftSyntax/generated/syntaxNodes/SyntaxNodesC.swift b/Sources/SwiftSyntax/generated/syntaxNodes/SyntaxNodesC.swift index 7f0b314579f..4a26bf16428 100644 --- a/Sources/SwiftSyntax/generated/syntaxNodes/SyntaxNodesC.swift +++ b/Sources/SwiftSyntax/generated/syntaxNodes/SyntaxNodesC.swift @@ -4524,6 +4524,9 @@ public struct ConventionWitnessMethodAttributeArgumentsSyntax: SyntaxProtocol, S /// - Parameters: /// - leadingTrivia: Trivia to be prepended to the leading trivia of the node’s first token. If the node is empty, there is no token to attach the trivia to and the parameter is ignored. + /// - witnessMethodLabel: The `witnessMethod` label. + /// - colon: The colon separating the `witnessMethod` label and the original protocol name. + /// - protocolName: The original protocol name. /// - trailingTrivia: Trivia to be appended to the trailing trivia of the node’s last token. If the node is empty, there is no token to attach the trivia to and the parameter is ignored. public init( leadingTrivia: Trivia? = nil, @@ -4578,6 +4581,8 @@ public struct ConventionWitnessMethodAttributeArgumentsSyntax: SyntaxProtocol, S } } + /// The `witnessMethod` label. + /// /// ### Tokens /// /// For syntax trees generated by the parser, this is guaranteed to be `witness_method`. @@ -4599,6 +4604,8 @@ public struct ConventionWitnessMethodAttributeArgumentsSyntax: SyntaxProtocol, S } } + /// The colon separating the `witnessMethod` label and the original protocol name. + /// /// ### Tokens /// /// For syntax trees generated by the parser, this is guaranteed to be `:`. @@ -4620,6 +4627,8 @@ public struct ConventionWitnessMethodAttributeArgumentsSyntax: SyntaxProtocol, S } } + /// The original protocol name. + /// /// ### Tokens /// /// For syntax trees generated by the parser, this is guaranteed to be ``. diff --git a/Sources/SwiftSyntax/generated/syntaxNodes/SyntaxNodesD.swift b/Sources/SwiftSyntax/generated/syntaxNodes/SyntaxNodesD.swift index ce9c9bac45f..09173a3c496 100644 --- a/Sources/SwiftSyntax/generated/syntaxNodes/SyntaxNodesD.swift +++ b/Sources/SwiftSyntax/generated/syntaxNodes/SyntaxNodesD.swift @@ -2817,7 +2817,9 @@ public struct DifferentiableAttributeArgumentsSyntax: SyntaxProtocol, SyntaxHash /// - Parameters: /// - leadingTrivia: Trivia to be prepended to the leading trivia of the node’s first token. If the node is empty, there is no token to attach the trivia to and the parameter is ignored. + /// - kindSpecifier: The differentiability kind, if it exists. /// - kindSpecifierComma: The comma following the differentiability kind, if it exists. + /// - arguments: The differentiability arguments, if any exists. /// - argumentsComma: The comma following the differentiability arguments clause, if it exists. /// - genericWhereClause: A `where` clause that places additional constraints on generic parameters like `where T: Differentiable`. /// - trailingTrivia: Trivia to be appended to the trailing trivia of the node’s last token. If the node is empty, there is no token to attach the trivia to and the parameter is ignored. @@ -2886,6 +2888,8 @@ public struct DifferentiableAttributeArgumentsSyntax: SyntaxProtocol, SyntaxHash } } + /// The differentiability kind, if it exists. + /// /// ### Tokens /// /// For syntax trees generated by the parser, this is guaranteed to be one of the following kinds: @@ -2933,6 +2937,7 @@ public struct DifferentiableAttributeArgumentsSyntax: SyntaxProtocol, SyntaxHash } } + /// The differentiability arguments, if any exists. public var arguments: DifferentiabilityWithRespectToArgumentSyntax? { get { return Syntax(self).child(at: 5)?.cast(DifferentiabilityWithRespectToArgumentSyntax.self) diff --git a/Sources/SwiftSyntax/generated/syntaxNodes/SyntaxNodesOP.swift b/Sources/SwiftSyntax/generated/syntaxNodes/SyntaxNodesOP.swift index 1403ee2ea3f..d27d33ced51 100644 --- a/Sources/SwiftSyntax/generated/syntaxNodes/SyntaxNodesOP.swift +++ b/Sources/SwiftSyntax/generated/syntaxNodes/SyntaxNodesOP.swift @@ -36,6 +36,8 @@ public struct ObjCSelectorPieceSyntax: SyntaxProtocol, SyntaxHashable, _LeafSynt /// - Parameters: /// - leadingTrivia: Trivia to be prepended to the leading trivia of the node’s first token. If the node is empty, there is no token to attach the trivia to and the parameter is ignored. + /// - name: The identifier name for a nullary selection, if it exists. + /// - colon: The colon separating the label and the value or a colon representing an unlabeled argument /// - trailingTrivia: Trivia to be appended to the trailing trivia of the node’s last token. If the node is empty, there is no token to attach the trivia to and the parameter is ignored. public init( leadingTrivia: Trivia? = nil, @@ -84,6 +86,7 @@ public struct ObjCSelectorPieceSyntax: SyntaxProtocol, SyntaxHashable, _LeafSynt } } + /// The identifier name for a nullary selection, if it exists. public var name: TokenSyntax? { get { return Syntax(self).child(at: 1)?.cast(TokenSyntax.self) @@ -102,6 +105,8 @@ public struct ObjCSelectorPieceSyntax: SyntaxProtocol, SyntaxHashable, _LeafSynt } } + /// The colon separating the label and the value or a colon representing an unlabeled argument + /// /// ### Tokens /// /// For syntax trees generated by the parser, this is guaranteed to be `:`. @@ -2101,6 +2106,7 @@ public struct PlatformVersionItemSyntax: SyntaxProtocol, SyntaxHashable, _LeafSy /// - Parameters: /// - leadingTrivia: Trivia to be prepended to the leading trivia of the node’s first token. If the node is empty, there is no token to attach the trivia to and the parameter is ignored. + /// - platformVersion: The platform/version pair, e.g. `iOS 10.1` /// - trailingComma: A trailing comma if the argument is followed by another argument /// - trailingTrivia: Trivia to be appended to the trailing trivia of the node’s last token. If the node is empty, there is no token to attach the trivia to and the parameter is ignored. public init( @@ -2150,6 +2156,7 @@ public struct PlatformVersionItemSyntax: SyntaxProtocol, SyntaxHashable, _LeafSy } } + /// The platform/version pair, e.g. `iOS 10.1` public var platformVersion: PlatformVersionSyntax { get { return Syntax(self).child(at: 1)!.cast(PlatformVersionSyntax.self)