Skip to content

spelling: syntax updates #386

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 29, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Sources/SwiftSyntax/gyb_generated/SyntaxBuilders.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6431,8 +6431,8 @@ public struct TargetFunctionEntrySyntaxBuilder {
layout[idx] = node.raw
}

public mutating func useDelcname(_ node: DeclNameSyntax) {
let idx = TargetFunctionEntrySyntax.Cursor.delcname.rawValue
public mutating func useDeclname(_ node: DeclNameSyntax) {
let idx = TargetFunctionEntrySyntax.Cursor.declname.rawValue
layout[idx] = node.raw
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public enum SyntaxClassification {
case floatingLiteral
/// A string literal including multiline string literals.
case stringLiteral
/// The opening and closing paranthesis of string interpolation.
/// The opening and closing parenthesis of string interpolation.
case stringInterpolationAnchor
/// A `#` keyword like `#warning`.
case poundDirectiveKeyword
Expand Down
4 changes: 2 additions & 2 deletions Sources/SwiftSyntax/gyb_generated/SyntaxFactory.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2922,11 +2922,11 @@ public enum SyntaxFactory {
], length: .zero, presence: .present))
return LabeledSpecializeEntrySyntax(data)
}
public static func makeTargetFunctionEntry(label: TokenSyntax, colon: TokenSyntax, delcname: DeclNameSyntax, trailingComma: TokenSyntax?) -> TargetFunctionEntrySyntax {
public static func makeTargetFunctionEntry(label: TokenSyntax, colon: TokenSyntax, declname: DeclNameSyntax, trailingComma: TokenSyntax?) -> TargetFunctionEntrySyntax {
let layout: [RawSyntax?] = [
label.raw,
colon.raw,
delcname.raw,
declname.raw,
trailingComma?.raw,
]
let raw = RawSyntax.createAndCalcLength(kind: SyntaxKind.targetFunctionEntry,
Expand Down
24 changes: 12 additions & 12 deletions Sources/SwiftSyntax/gyb_generated/syntax_nodes/SyntaxNodes.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6988,7 +6988,7 @@ public struct TargetFunctionEntrySyntax: SyntaxProtocol, SyntaxHashable {
enum Cursor: Int {
case label
case colon
case delcname
case declname
case trailingComma
}

Expand Down Expand Up @@ -7058,24 +7058,24 @@ public struct TargetFunctionEntrySyntax: SyntaxProtocol, SyntaxHashable {
}

/// The value for this argument
public var delcname: DeclNameSyntax {
public var declname: DeclNameSyntax {
get {
let childData = data.child(at: Cursor.delcname,
let childData = data.child(at: Cursor.declname,
parent: Syntax(self))
return DeclNameSyntax(childData!)
}
set(value) {
self = withDelcname(value)
self = withDeclname(value)
}
}

/// Returns a copy of the receiver with its `delcname` replaced.
/// - param newChild: The new `delcname` to replace the node's
/// current `delcname`, if present.
public func withDelcname(
/// Returns a copy of the receiver with its `declname` replaced.
/// - param newChild: The new `declname` to replace the node's
/// current `declname`, if present.
public func withDeclname(
_ newChild: DeclNameSyntax?) -> TargetFunctionEntrySyntax {
let raw = newChild?.raw ?? RawSyntax.missing(SyntaxKind.declName)
let newData = data.replacingChild(raw, at: Cursor.delcname)
let newData = data.replacingChild(raw, at: Cursor.declname)
return TargetFunctionEntrySyntax(newData)
}

Expand Down Expand Up @@ -7151,7 +7151,7 @@ extension TargetFunctionEntrySyntax: CustomReflectable {
return Mirror(self, children: [
"label": Syntax(label).asProtocol(SyntaxProtocol.self),
"colon": Syntax(colon).asProtocol(SyntaxProtocol.self),
"delcname": Syntax(delcname).asProtocol(SyntaxProtocol.self),
"declname": Syntax(declname).asProtocol(SyntaxProtocol.self),
"trailingComma": trailingComma.map(Syntax.init)?.asProtocol(SyntaxProtocol.self) as Any,
])
}
Expand Down Expand Up @@ -7603,7 +7603,7 @@ extension ImplementsAttributeArgumentsSyntax: CustomReflectable {
// MARK: - ObjCSelectorPieceSyntax

///
/// A piece of an Objective-C selector. Either consisiting of just an
/// 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
///
Expand Down Expand Up @@ -13926,7 +13926,7 @@ extension AvailabilityVersionRestrictionSyntax: CustomReflectable {

///
/// A version number of the form major.minor.patch in which the minor
/// and patch part may be ommited.
/// and patch part may be omitted.
///
public struct VersionTupleSyntax: SyntaxProtocol, SyntaxHashable {
enum Cursor: Int {
Expand Down
18 changes: 9 additions & 9 deletions Sources/SwiftSyntaxBuilder/gyb_generated/BuildableNodes.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7927,25 +7927,25 @@ public struct LabeledSpecializeEntry: SyntaxBuildable, ExpressibleAsLabeledSpeci
public struct TargetFunctionEntry: SyntaxBuildable, ExpressibleAsTargetFunctionEntry {
let label: TokenSyntax
let colon: TokenSyntax
let delcname: DeclName
let declname: DeclName
let trailingComma: TokenSyntax?

/// Creates a `TargetFunctionEntry` using the provided parameters.
/// - Parameters:
/// - label: The label of the argument
/// - colon: The colon separating the label and the value
/// - delcname: The value for this argument
/// - declname: The value for this argument
/// - trailingComma: A trailing comma if this argument is followed by another one
public init(
label: TokenSyntax,
colon: TokenSyntax = TokenSyntax.`colon`,
delcname: ExpressibleAsDeclName,
declname: ExpressibleAsDeclName,
trailingComma: TokenSyntax? = nil
) {
self.label = label
self.colon = colon
assert(colon.text == ":")
self.delcname = delcname.createDeclName()
self.declname = declname.createDeclName()
self.trailingComma = trailingComma
assert(trailingComma == nil || trailingComma!.text == ",")
}
Expand All @@ -7956,13 +7956,13 @@ public struct TargetFunctionEntry: SyntaxBuildable, ExpressibleAsTargetFunctionE
public init(
label: String,
colon: TokenSyntax = TokenSyntax.`colon`,
delcname: ExpressibleAsDeclName,
declname: ExpressibleAsDeclName,
trailingComma: TokenSyntax? = nil
) {
self.init(
label: TokenSyntax.identifier(label),
colon: colon,
delcname: delcname,
declname: declname,
trailingComma: trailingComma
)
}
Expand All @@ -7971,7 +7971,7 @@ public struct TargetFunctionEntry: SyntaxBuildable, ExpressibleAsTargetFunctionE
let result = SyntaxFactory.makeTargetFunctionEntry(
label: label,
colon: colon,
delcname: delcname.buildDeclName(format: format, leadingTrivia: nil),
declname: declname.buildDeclName(format: format, leadingTrivia: nil),
trailingComma: trailingComma
)
if let leadingTrivia = leadingTrivia {
Expand Down Expand Up @@ -8163,7 +8163,7 @@ public struct ImplementsAttributeArguments: SyntaxBuildable, ExpressibleAsImplem
}

}
/// A piece of an Objective-C selector. Either consisiting of just anidentifier for a nullary selector, an identifier and a colon for alabeled argument or just a colon for an unlabeled argument
/// 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
public struct ObjCSelectorPiece: SyntaxBuildable, ExpressibleAsObjCSelectorPiece {
let name: TokenSyntax?
let colon: TokenSyntax?
Expand Down Expand Up @@ -13523,7 +13523,7 @@ public struct AvailabilityVersionRestriction: SyntaxBuildable, ExpressibleAsAvai
}

}
/// A version number of the form major.minor.patch in which the minorand patch part may be ommited.
/// A version number of the form major.minor.patch in which the minorand patch part may be omitted.
public struct VersionTuple: SyntaxBuildable, ExpressibleAsVersionTuple {
let majorMinor: SyntaxBuildable
let patchPeriod: TokenSyntax?
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@
extension SyntaxParser {
static func verifyNodeDeclarationHash() -> Bool {
return String(cString: swiftparse_syntax_structure_versioning_identifier()!) ==
"9adb90dde0ca797a8bd9be567fefc6f4e027c3a5"
"91db81d59d0370360363fd7286f85bafe5b7f36f"
}
}