Skip to content

Commit 6b47ef2

Browse files
committed
Fixes typos in PackageAttributeArguments
1 parent f6057d6 commit 6b47ef2

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

CodeGeneration/Sources/SyntaxSupport/gyb_generated/AttributeNodes.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ public let ATTRIBUTE_NODES: [Node] = [
196196
]),
197197

198198
Node(name: "PackageAttributeArguments",
199-
nameForDiagnostics: "@_package arguemnts",
199+
nameForDiagnostics: "@_package arguments",
200200
description: "The arguments for the `@_package` attribute imitating `PackageDescription`",
201201
kind: "Syntax",
202202
children: [

Sources/SwiftParser/Attributes.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -885,7 +885,7 @@ extension Parser {
885885
let requirement: RawExprSyntax?
886886
if locationLabel.tokenKind != .keyword(.path) {
887887
(unexpectedBeforeRequirementComma, requirementComma) = self.expect(.comma)
888-
if self.at(any: [.keyword(.from), .keyword(.exact), .keyword(.branch), .keyword(.revision)]) {
888+
if self.at(any: [.colon, .keyword(.from), .keyword(.exact), .keyword(.branch), .keyword(.revision)]) {
889889
(unexpectedBeforeRequirementLabel, requirementLabel) = self.expectAny([.keyword(.from), .keyword(.exact), .keyword(.branch), .keyword(.revision)], default: .keyword(.from))
890890
(unexpectedBeforeRequirementColon, requirementColon) = self.expect(.colon)
891891
requirement = self.parseStringLiteral().as(RawExprSyntax.self)

Sources/SwiftSyntax/generated/Misc.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1182,7 +1182,7 @@ extension SyntaxKind {
11821182
case .packReferenceType:
11831183
return "pack reference"
11841184
case .packageAttributeArguments:
1185-
return "@_package arguemnts"
1185+
return "@_package arguments"
11861186
case .parameterClause:
11871187
return "parameter clause"
11881188
case .patternBindingList:

gyb_syntax_support/AttributeNodes.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -207,13 +207,13 @@
207207
# package-attr-arguments -> package-location-label ':' package-location
208208
# ( ',' package-requirement-label? ':'? package-requirement )?
209209
# ( ',' 'product' ':' package-product-name )?
210-
Node('PackageAttributeArguments', name_for_diagnostics='@_package arguemnts',
210+
Node('PackageAttributeArguments', name_for_diagnostics='@_package arguments',
211211
kind='Syntax',
212212
description='''
213213
The arguments for the `@_package` attribute imitating `PackageDescription`
214214
''',
215215
children=[
216-
Child('LocationLabel', kind='IdentifierToken',
216+
Child('LocationLabel', kind='KeywordToken',
217217
token_choices=['KeywordToken|id', 'KeywordToken|path', 'KeywordToken|url'],
218218
description='The location label.'),
219219
Child('LocationColon', kind='ColonToken'),
@@ -223,7 +223,7 @@
223223
is_optional=True, description='''
224224
The comma before the package requirement, if it exists.
225225
'''),
226-
Child('RequirementLabel', kind='IdentifierToken',
226+
Child('RequirementLabel', kind='KeywordToken',
227227
token_choices=['KeywordToken|branch', 'KeywordToken|exact', 'KeywordToken|from', 'KeywordToken|revision'],
228228
description='The requirement label.', is_optional=True),
229229
Child('RequirementColon', kind='ColonToken', is_optional=True),

0 commit comments

Comments
 (0)