Skip to content

Commit a515a28

Browse files
committed
Add a when translating a multi-line description from Python to CodeGeneration
# Conflicts: # CodeGeneration/Sources/SyntaxSupport/gyb_generated/AttributeNodes.swift # CodeGeneration/Sources/SyntaxSupport/gyb_generated/AvailabilityNodes.swift # CodeGeneration/Sources/SyntaxSupport/gyb_generated/DeclNodes.swift
1 parent 8984572 commit a515a28

File tree

9 files changed

+49
-49
lines changed

9 files changed

+49
-49
lines changed

CodeGeneration/Sources/SyntaxSupport/gyb_generated/AttributeNodes.swift

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ public let ATTRIBUTE_NODES: [Node] = [
7373
Child(name: "DocumentationArguments",
7474
kind: .node(kind: "DocumentationAttributeArguments"))
7575
]),
76-
description: "The arguments of the attribute. In case the attributetakes multiple arguments, they are gather in theappropriate takes first.",
76+
description: "The arguments of the attribute. In case the attribute takes multiple arguments, they are gather in the appropriate takes first.",
7777
isOptional: true),
7878
Child(name: "RightParen",
7979
kind: .token(choices: [.token(tokenKind: "RightParenToken")]),
@@ -116,7 +116,7 @@ public let ATTRIBUTE_NODES: [Node] = [
116116

117117
Node(name: "LabeledSpecializeEntry",
118118
nameForDiagnostics: "attribute argument",
119-
description: "A labeled argument for the `@_specialize` attribute like`exported: true`",
119+
description: "A labeled argument for the `@_specialize` attribute like `exported: true`",
120120
kind: "Syntax",
121121
traits: [
122122
"WithTrailingComma"
@@ -139,7 +139,7 @@ public let ATTRIBUTE_NODES: [Node] = [
139139

140140
Node(name: "TargetFunctionEntry",
141141
nameForDiagnostics: "attribute argument",
142-
description: "A labeled argument for the `@_specialize` attribute with a functiondecl value like`target: myFunc(_:)`",
142+
description: "A labeled argument for the `@_specialize` attribute with a function decl value like `target: myFunc(_:)`",
143143
kind: "Syntax",
144144
traits: [
145145
"WithTrailingComma"
@@ -169,18 +169,18 @@ public let ATTRIBUTE_NODES: [Node] = [
169169
description: "The base name of the protocol's requirement."),
170170
Child(name: "DeclNameArguments",
171171
kind: .node(kind: "DeclNameArguments"),
172-
description: "The argument labels of the protocol's requirement if itis a function requirement.",
172+
description: "The argument labels of the protocol's requirement if it is a function requirement.",
173173
isOptional: true)
174174
]),
175175

176176
Node(name: "ImplementsAttributeArguments",
177177
nameForDiagnostics: "@_implements arguemnts",
178-
description: "The arguments for the `@_implements` attribute of the form`Type, methodName(arg1Label:arg2Label:)`",
178+
description: "The arguments for the `@_implements` attribute of the form `Type, methodName(arg1Label:arg2Label:)`",
179179
kind: "Syntax",
180180
children: [
181181
Child(name: "Type",
182182
kind: .node(kind: "Type"),
183-
description: "The type for which the method with this attributeimplements a requirement."),
183+
description: "The type for which the method with this attribute implements a requirement."),
184184
Child(name: "Comma",
185185
kind: .token(choices: [.token(tokenKind: "CommaToken")]),
186186
description: "The comma separating the type and method name"),
@@ -189,13 +189,13 @@ public let ATTRIBUTE_NODES: [Node] = [
189189
description: "The base name of the protocol's requirement."),
190190
Child(name: "DeclNameArguments",
191191
kind: .node(kind: "DeclNameArguments"),
192-
description: "The argument labels of the protocol's requirement if itis a function requirement.",
192+
description: "The argument labels of the protocol's requirement if it is a function requirement.",
193193
isOptional: true)
194194
]),
195195

196196
Node(name: "ObjCSelectorPiece",
197197
nameForDiagnostics: "Objective-C selector piece",
198-
description: "A piece of an Objective-C selector. Either consisting of just anidentifier for a nullary selector, an identifier and a colon for alabeled argument or just a colon for an unlabeled argument",
198+
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",
199199
kind: "Syntax",
200200
children: [
201201
Child(name: "Name",
@@ -213,7 +213,7 @@ public let ATTRIBUTE_NODES: [Node] = [
213213

214214
Node(name: "DifferentiableAttributeArguments",
215215
nameForDiagnostics: "'@differentiable' arguments",
216-
description: "The arguments for the `@differentiable` attribute: an optionaldifferentiability kind, an optional differentiability parameter clause,and an optional 'where' clause.",
216+
description: "The arguments for the `@differentiable` attribute: an optional differentiability kind, an optional differentiability parameter clause, and an optional 'where' clause.",
217217
kind: "Syntax",
218218
children: [
219219
Child(name: "DiffKind",
@@ -228,7 +228,7 @@ public let ATTRIBUTE_NODES: [Node] = [
228228
isOptional: true),
229229
Child(name: "DiffParamsComma",
230230
kind: .token(choices: [.token(tokenKind: "CommaToken")]),
231-
description: "The comma following the differentiability parameters clause,if it exists.",
231+
description: "The comma following the differentiability parameters clause, if it exists.",
232232
isOptional: true),
233233
Child(name: "WhereClause",
234234
kind: .node(kind: "GenericWhereClause"),
@@ -276,7 +276,7 @@ public let ATTRIBUTE_NODES: [Node] = [
276276

277277
Node(name: "DifferentiabilityParam",
278278
nameForDiagnostics: "differentiability parameter",
279-
description: "A differentiability parameter: either the \"self\" identifier, a functionparameter name, or a function parameter index.",
279+
description: "A differentiability parameter: either the \"self\" identifier, a function parameter name, or a function parameter index.",
280280
kind: "Syntax",
281281
traits: [
282282
"WithTrailingComma"
@@ -291,21 +291,21 @@ public let ATTRIBUTE_NODES: [Node] = [
291291

292292
Node(name: "DerivativeRegistrationAttributeArguments",
293293
nameForDiagnostics: "attribute arguments",
294-
description: "The arguments for the '@derivative(of:)' and '@transpose(of:)'attributes: the 'of:' label, the original declaration name, and anoptional differentiability parameter list.",
294+
description: "The arguments for the '@derivative(of:)' and '@transpose(of:)' attributes: the 'of:' label, the original declaration name, and an optional differentiability parameter list.",
295295
kind: "Syntax",
296296
children: [
297297
Child(name: "OfLabel",
298298
kind: .token(choices: [.keyword(text: "of")]),
299299
description: "The \"of\" label."),
300300
Child(name: "Colon",
301301
kind: .token(choices: [.token(tokenKind: "ColonToken")]),
302-
description: "The colon separating the \"of\" label and the originaldeclaration name."),
302+
description: "The colon separating the \"of\" label and the original declaration name."),
303303
Child(name: "OriginalDeclName",
304304
kind: .node(kind: "QualifiedDeclName"),
305305
description: "The referenced original declaration name."),
306306
Child(name: "Period",
307307
kind: .token(choices: [.token(tokenKind: "PeriodToken")]),
308-
description: "The period separating the original declaration name and theaccessor name.",
308+
description: "The period separating the original declaration name and the accessor name.",
309309
isOptional: true),
310310
Child(name: "AccessorKind",
311311
kind: .token(choices: [.keyword(text: "get"), .keyword(text: "set")]),
@@ -321,7 +321,7 @@ public let ATTRIBUTE_NODES: [Node] = [
321321

322322
Node(name: "QualifiedDeclName",
323323
nameForDiagnostics: "declaration name",
324-
description: "An optionally qualified function declaration name (e.g. `+(_:_:)`,`A.B.C.foo(_:_:)`).",
324+
description: "An optionally qualified function declaration name (e.g. `+(_:_:)`, `A.B.C.foo(_:_:)`).",
325325
kind: "Syntax",
326326
children: [
327327
Child(name: "BaseType",
@@ -336,7 +336,7 @@ public let ATTRIBUTE_NODES: [Node] = [
336336
description: "The base name of the referenced function."),
337337
Child(name: "Arguments",
338338
kind: .node(kind: "DeclNameArguments"),
339-
description: "The argument labels of the referenced function, optionallyspecified.",
339+
description: "The argument labels of the referenced function, optionally specified.",
340340
isOptional: true)
341341
]),
342342

@@ -353,7 +353,7 @@ public let ATTRIBUTE_NODES: [Node] = [
353353
description: "The colon separating \"before\" and the parameter list."),
354354
Child(name: "VersionList",
355355
kind: .collection(kind: "AvailabilityVersionRestrictionList", collectionElementName: "Availability"),
356-
description: "The list of OS versions in which the declaration became ABIstable.")
356+
description: "The list of OS versions in which the declaration became ABI stable.")
357357
]),
358358

359359
Node(name: "AvailabilityVersionRestrictionList",
@@ -371,7 +371,7 @@ public let ATTRIBUTE_NODES: [Node] = [
371371
classification: "Keyword"),
372372
Child(name: "TrailingComma",
373373
kind: .token(choices: [.token(tokenKind: "CommaToken")]),
374-
description: "A trailing comma if the argument is followed by anotherargument",
374+
description: "A trailing comma if the argument is followed by another argument",
375375
isOptional: true)
376376
]),
377377

CodeGeneration/Sources/SyntaxSupport/gyb_generated/AvailabilityNodes.swift

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public let AVAILABILITY_NODES: [Node] = [
2020

2121
Node(name: "AvailabilityArgument",
2222
nameForDiagnostics: "availability argument",
23-
description: "A single argument to an `@available` argument like `*`, `iOS 10.1`,or `message: \"This has been deprecated\"`.",
23+
description: "A single argument to an `@available` argument like `*`, `iOS 10.1`, or `message: \"This has been deprecated\"`.",
2424
kind: "Syntax",
2525
children: [
2626
Child(name: "Entry",
@@ -35,13 +35,13 @@ public let AVAILABILITY_NODES: [Node] = [
3535
description: "The actual argument"),
3636
Child(name: "TrailingComma",
3737
kind: .token(choices: [.token(tokenKind: "CommaToken")]),
38-
description: "A trailing comma if the argument is followed by anotherargument",
38+
description: "A trailing comma if the argument is followed by another argument",
3939
isOptional: true)
4040
]),
4141

4242
Node(name: "AvailabilityLabeledArgument",
4343
nameForDiagnostics: "availability argument",
44-
description: "A argument to an `@available` attribute that consists of a label anda value, e.g. `message: \"This has been deprecated\"`.",
44+
description: "A argument to an `@available` attribute that consists of a label and a value, e.g. `message: \"This has been deprecated\"`.",
4545
kind: "Syntax",
4646
children: [
4747
Child(name: "Label",
@@ -62,12 +62,12 @@ public let AVAILABILITY_NODES: [Node] = [
6262

6363
Node(name: "AvailabilityVersionRestriction",
6464
nameForDiagnostics: "version restriction",
65-
description: "An argument to `@available` that restricts the availability on acertain platform to a version, e.g. `iOS 10` or `swift 3.4`.",
65+
description: "An argument to `@available` that restricts the availability on a certain platform to a version, e.g. `iOS 10` or `swift 3.4`.",
6666
kind: "Syntax",
6767
children: [
6868
Child(name: "Platform",
6969
kind: .token(choices: [.token(tokenKind: "IdentifierToken")]),
70-
description: "The name of the OS on which the availability should berestricted or 'swift' if the availability should berestricted based on a Swift version.",
70+
description: "The name of the OS on which the availability should be restricted or 'swift' if the availability should be restricted based on a Swift version.",
7171
classification: "Keyword"),
7272
Child(name: "Version",
7373
kind: .node(kind: "VersionTuple"),
@@ -76,15 +76,15 @@ public let AVAILABILITY_NODES: [Node] = [
7676

7777
Node(name: "VersionTuple",
7878
nameForDiagnostics: "version tuple",
79-
description: "A version number of the form major.minor.patch in which the minorand patch part may be omitted.",
79+
description: "A version number of the form major.minor.patch in which the minor and patch part may be omitted.",
8080
kind: "Syntax",
8181
children: [
8282
Child(name: "MajorMinor",
8383
kind: .token(choices: [.token(tokenKind: "IntegerLiteralToken"), .token(tokenKind: "FloatingLiteralToken")]),
84-
description: "In case the version consists only of the major version, aninteger literal that specifies the major version. In casethe version consists of major and minor version number, afloating literal in which the decimal part is interpretedas the minor version."),
84+
description: "In case the version consists only of the major version, an integer literal that specifies the major version. In case the version consists of major and minor version number, a floating literal in which the decimal part is interpreted as the minor version."),
8585
Child(name: "PatchPeriod",
8686
kind: .token(choices: [.token(tokenKind: "PeriodToken")]),
87-
description: "If the version contains a patch number, the periodseparating the minor from the patch number.",
87+
description: "If the version contains a patch number, the period separating the minor from the patch number.",
8888
isOptional: true),
8989
Child(name: "PatchVersion",
9090
kind: .token(choices: [.token(tokenKind: "IntegerLiteralToken")]),

CodeGeneration/Sources/SyntaxSupport/gyb_generated/CommonNodes.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ public let COMMON_NODES: [Node] = [
7575

7676
Node(name: "CodeBlockItem",
7777
nameForDiagnostics: nil,
78-
description: "A CodeBlockItem is any Syntax node that appears on its own line insidea CodeBlock.",
78+
description: "A CodeBlockItem is any Syntax node that appears on its own line inside a CodeBlock.",
7979
kind: "Syntax",
8080
children: [
8181
Child(name: "Item",
@@ -151,7 +151,7 @@ public let COMMON_NODES: [Node] = [
151151

152152
Node(name: "UnexpectedNodes",
153153
nameForDiagnostics: nil,
154-
description: "A collection of syntax nodes that occurred in the source code butcould not be used to form a valid syntax tree.",
154+
description: "A collection of syntax nodes that occurred in the source code but could not be used to form a valid syntax tree.",
155155
kind: "SyntaxCollection",
156156
element: "Syntax"),
157157

0 commit comments

Comments
 (0)