Skip to content
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
5 changes: 2 additions & 3 deletions CodeGeneration/Sources/SyntaxSupport/Child.swift
Original file line number Diff line number Diff line change
Expand Up @@ -185,9 +185,8 @@ public class Child {
documentation: String? = nil,
isOptional: Bool = false
) {
if let firstCharInName = name.first {
precondition(firstCharInName.isUppercase == true, "The first letter of a child’s name should be uppercase")
}
precondition(name.first?.isUppercase ?? true, "The first letter of a child’s name should be uppercase")
precondition(deprecatedName?.first?.isUppercase ?? true, "The first letter of a child’s name should be uppercase")
self.name = name
self.deprecatedName = deprecatedName
self.kind = kind
Expand Down
2 changes: 1 addition & 1 deletion CodeGeneration/Sources/SyntaxSupport/TypeNodes.swift
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ public let TYPE_NODES: [Node] = [
),
Child(
name: "Parameters",
deprecatedName: "arguments",
deprecatedName: "Arguments",
kind: .collection(kind: .tupleTypeElementList, collectionElementName: "Parameter", deprecatedCollectionElementName: "Argument")
),
Child(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3361,7 +3361,7 @@ extension FunctionSignatureSyntax {

extension FunctionTypeSyntax {
@available(*, deprecated, renamed: "unexpectedBetweenLeftParenAndParameters")
public var unexpectedBetweenLeftParenAndarguments: UnexpectedNodesSyntax? {
public var unexpectedBetweenLeftParenAndArguments: UnexpectedNodesSyntax? {
get {
return unexpectedBetweenLeftParenAndParameters
}
Expand All @@ -3386,7 +3386,7 @@ extension FunctionTypeSyntax {
}

@available(*, deprecated, renamed: "unexpectedBetweenParametersAndRightParen")
public var unexpectedBetweenargumentsAndRightParen: UnexpectedNodesSyntax? {
public var unexpectedBetweenArgumentsAndRightParen: UnexpectedNodesSyntax? {
get {
return unexpectedBetweenParametersAndRightParen
}
Expand Down Expand Up @@ -3431,9 +3431,9 @@ extension FunctionTypeSyntax {
leadingTrivia: Trivia? = nil,
_ unexpectedBeforeLeftParen: UnexpectedNodesSyntax? = nil,
leftParen: TokenSyntax = .leftParenToken(),
_ unexpectedBetweenLeftParenAndarguments: UnexpectedNodesSyntax? = nil,
_ unexpectedBetweenLeftParenAndArguments: UnexpectedNodesSyntax? = nil,
arguments: TupleTypeElementListSyntax,
_ unexpectedBetweenargumentsAndRightParen: UnexpectedNodesSyntax? = nil,
_ unexpectedBetweenArgumentsAndRightParen: UnexpectedNodesSyntax? = nil,
rightParen: TokenSyntax = .rightParenToken(),
_ unexpectedBetweenRightParenAndEffectSpecifiers: UnexpectedNodesSyntax? = nil,
effectSpecifiers: TypeEffectSpecifiersSyntax? = nil,
Expand All @@ -3447,9 +3447,9 @@ extension FunctionTypeSyntax {
leadingTrivia: leadingTrivia,
unexpectedBeforeLeftParen,
leftParen: leftParen,
unexpectedBetweenLeftParenAndarguments,
unexpectedBetweenLeftParenAndArguments,
parameters: arguments,
unexpectedBetweenargumentsAndRightParen,
unexpectedBetweenArgumentsAndRightParen,
rightParen: rightParen,
unexpectedBetweenRightParenAndEffectSpecifiers,
effectSpecifiers: effectSpecifiers,
Expand Down