Skip to content

Commit a22fb3d

Browse files
committed
Fix name to make validation successful
1 parent 42de0a8 commit a22fb3d

File tree

5 files changed

+70
-72
lines changed

5 files changed

+70
-72
lines changed

CodeGeneration/Sources/SyntaxSupport/TypeNodes.swift

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -575,18 +575,16 @@ public let TYPE_NODES: [Node] = [
575575
],
576576
children: [
577577
Child(
578-
name: "specifier",
579-
kind: .token(choices: [
580-
.keyword(.dependsOn)
581-
]),
578+
name: "dependsOnKeyword",
579+
kind: .token(choices: [.keyword(.dependsOn)]),
582580
documentation: "The specifier token that's attached to the type."
583581
),
584582
Child(
585583
name: "leftParen",
586584
kind: .token(choices: [.token(.leftParen)])
587585
),
588586
Child(
589-
name: "scoped",
587+
name: "scopedKeyword",
590588
kind: .token(choices: [.keyword(.scoped)]),
591589
isOptional: true
592590
),

Sources/SwiftParser/Types.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -916,9 +916,9 @@ extension Parser {
916916
arena: self.arena
917917
)
918918
let lifetimeSpecifier = RawLifetimeTypeSpecifierSyntax(
919-
specifier: specifier,
919+
dependsOnKeyword: specifier,
920920
leftParen: missingToken(.leftParen),
921-
scoped: nil,
921+
scopedKeyword: nil,
922922
arguments: arguments,
923923
rightParen: missingToken(.rightParen),
924924
arena: self.arena
@@ -952,9 +952,9 @@ extension Parser {
952952
arena: self.arena
953953
)
954954
let lifetimeSpecifier = RawLifetimeTypeSpecifierSyntax(
955-
specifier: specifier,
955+
dependsOnKeyword: specifier,
956956
leftParen: leftParen,
957-
scoped: scoped,
957+
scopedKeyword: scoped,
958958
arguments: argumentsSyntax,
959959
unexpectedBeforeRightParen,
960960
rightParen: rightParen,

Sources/SwiftSyntax/generated/ChildNameForKeyPath.swift

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2015,20 +2015,20 @@ public func childName(_ keyPath: AnyKeyPath) -> String? {
20152015
return "arguments"
20162016
case \LifetimeSpecifierArgumentsSyntax.unexpectedAfterArguments:
20172017
return "unexpectedAfterArguments"
2018-
case \LifetimeTypeSpecifierSyntax.unexpectedBeforeSpecifier:
2019-
return "unexpectedBeforeSpecifier"
2020-
case \LifetimeTypeSpecifierSyntax.specifier:
2021-
return "specifier"
2022-
case \LifetimeTypeSpecifierSyntax.unexpectedBetweenSpecifierAndLeftParen:
2023-
return "unexpectedBetweenSpecifierAndLeftParen"
2018+
case \LifetimeTypeSpecifierSyntax.unexpectedBeforeDependsOnKeyword:
2019+
return "unexpectedBeforeDependsOnKeyword"
2020+
case \LifetimeTypeSpecifierSyntax.dependsOnKeyword:
2021+
return "dependsOnKeyword"
2022+
case \LifetimeTypeSpecifierSyntax.unexpectedBetweenDependsOnKeywordAndLeftParen:
2023+
return "unexpectedBetweenDependsOnKeywordAndLeftParen"
20242024
case \LifetimeTypeSpecifierSyntax.leftParen:
20252025
return "leftParen"
2026-
case \LifetimeTypeSpecifierSyntax.unexpectedBetweenLeftParenAndScoped:
2027-
return "unexpectedBetweenLeftParenAndScoped"
2028-
case \LifetimeTypeSpecifierSyntax.scoped:
2029-
return "scoped"
2030-
case \LifetimeTypeSpecifierSyntax.unexpectedBetweenScopedAndArguments:
2031-
return "unexpectedBetweenScopedAndArguments"
2026+
case \LifetimeTypeSpecifierSyntax.unexpectedBetweenLeftParenAndScopedKeyword:
2027+
return "unexpectedBetweenLeftParenAndScopedKeyword"
2028+
case \LifetimeTypeSpecifierSyntax.scopedKeyword:
2029+
return "scopedKeyword"
2030+
case \LifetimeTypeSpecifierSyntax.unexpectedBetweenScopedKeywordAndArguments:
2031+
return "unexpectedBetweenScopedKeywordAndArguments"
20322032
case \LifetimeTypeSpecifierSyntax.arguments:
20332033
return "arguments"
20342034
case \LifetimeTypeSpecifierSyntax.unexpectedBetweenArgumentsAndRightParen:

Sources/SwiftSyntax/generated/raw/RawSyntaxNodesJKLMN.swift

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1143,13 +1143,13 @@ public struct RawLifetimeTypeSpecifierSyntax: RawSyntaxNodeProtocol {
11431143
}
11441144

11451145
public init(
1146-
_ unexpectedBeforeSpecifier: RawUnexpectedNodesSyntax? = nil,
1147-
specifier: RawTokenSyntax,
1148-
_ unexpectedBetweenSpecifierAndLeftParen: RawUnexpectedNodesSyntax? = nil,
1146+
_ unexpectedBeforeDependsOnKeyword: RawUnexpectedNodesSyntax? = nil,
1147+
dependsOnKeyword: RawTokenSyntax,
1148+
_ unexpectedBetweenDependsOnKeywordAndLeftParen: RawUnexpectedNodesSyntax? = nil,
11491149
leftParen: RawTokenSyntax,
1150-
_ unexpectedBetweenLeftParenAndScoped: RawUnexpectedNodesSyntax? = nil,
1151-
scoped: RawTokenSyntax?,
1152-
_ unexpectedBetweenScopedAndArguments: RawUnexpectedNodesSyntax? = nil,
1150+
_ unexpectedBetweenLeftParenAndScopedKeyword: RawUnexpectedNodesSyntax? = nil,
1151+
scopedKeyword: RawTokenSyntax?,
1152+
_ unexpectedBetweenScopedKeywordAndArguments: RawUnexpectedNodesSyntax? = nil,
11531153
arguments: RawLifetimeSpecifierArgumentsSyntax,
11541154
_ unexpectedBetweenArgumentsAndRightParen: RawUnexpectedNodesSyntax? = nil,
11551155
rightParen: RawTokenSyntax,
@@ -1159,13 +1159,13 @@ public struct RawLifetimeTypeSpecifierSyntax: RawSyntaxNodeProtocol {
11591159
let raw = RawSyntax.makeLayout(
11601160
kind: .lifetimeTypeSpecifier, uninitializedCount: 11, arena: arena) { layout in
11611161
layout.initialize(repeating: nil)
1162-
layout[0] = unexpectedBeforeSpecifier?.raw
1163-
layout[1] = specifier.raw
1164-
layout[2] = unexpectedBetweenSpecifierAndLeftParen?.raw
1162+
layout[0] = unexpectedBeforeDependsOnKeyword?.raw
1163+
layout[1] = dependsOnKeyword.raw
1164+
layout[2] = unexpectedBetweenDependsOnKeywordAndLeftParen?.raw
11651165
layout[3] = leftParen.raw
1166-
layout[4] = unexpectedBetweenLeftParenAndScoped?.raw
1167-
layout[5] = scoped?.raw
1168-
layout[6] = unexpectedBetweenScopedAndArguments?.raw
1166+
layout[4] = unexpectedBetweenLeftParenAndScopedKeyword?.raw
1167+
layout[5] = scopedKeyword?.raw
1168+
layout[6] = unexpectedBetweenScopedKeywordAndArguments?.raw
11691169
layout[7] = arguments.raw
11701170
layout[8] = unexpectedBetweenArgumentsAndRightParen?.raw
11711171
layout[9] = rightParen.raw
@@ -1174,31 +1174,31 @@ public struct RawLifetimeTypeSpecifierSyntax: RawSyntaxNodeProtocol {
11741174
self.init(unchecked: raw)
11751175
}
11761176

1177-
public var unexpectedBeforeSpecifier: RawUnexpectedNodesSyntax? {
1177+
public var unexpectedBeforeDependsOnKeyword: RawUnexpectedNodesSyntax? {
11781178
layoutView.children[0].map(RawUnexpectedNodesSyntax.init(raw:))
11791179
}
11801180

1181-
public var specifier: RawTokenSyntax {
1181+
public var dependsOnKeyword: RawTokenSyntax {
11821182
layoutView.children[1].map(RawTokenSyntax.init(raw:))!
11831183
}
11841184

1185-
public var unexpectedBetweenSpecifierAndLeftParen: RawUnexpectedNodesSyntax? {
1185+
public var unexpectedBetweenDependsOnKeywordAndLeftParen: RawUnexpectedNodesSyntax? {
11861186
layoutView.children[2].map(RawUnexpectedNodesSyntax.init(raw:))
11871187
}
11881188

11891189
public var leftParen: RawTokenSyntax {
11901190
layoutView.children[3].map(RawTokenSyntax.init(raw:))!
11911191
}
11921192

1193-
public var unexpectedBetweenLeftParenAndScoped: RawUnexpectedNodesSyntax? {
1193+
public var unexpectedBetweenLeftParenAndScopedKeyword: RawUnexpectedNodesSyntax? {
11941194
layoutView.children[4].map(RawUnexpectedNodesSyntax.init(raw:))
11951195
}
11961196

1197-
public var scoped: RawTokenSyntax? {
1197+
public var scopedKeyword: RawTokenSyntax? {
11981198
layoutView.children[5].map(RawTokenSyntax.init(raw:))
11991199
}
12001200

1201-
public var unexpectedBetweenScopedAndArguments: RawUnexpectedNodesSyntax? {
1201+
public var unexpectedBetweenScopedKeywordAndArguments: RawUnexpectedNodesSyntax? {
12021202
layoutView.children[6].map(RawUnexpectedNodesSyntax.init(raw:))
12031203
}
12041204

Sources/SwiftSyntax/generated/syntaxNodes/SyntaxNodesJKLMN.swift

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1911,9 +1911,9 @@ public struct LifetimeSpecifierArgumentsSyntax: SyntaxProtocol, SyntaxHashable,
19111911
///
19121912
/// ### Children
19131913
///
1914-
/// - `specifier`: `dependsOn`
1914+
/// - `dependsOnKeyword`: `dependsOn`
19151915
/// - `leftParen`: `(`
1916-
/// - `scoped`: `scoped`?
1916+
/// - `scopedKeyword`: `scoped`?
19171917
/// - `arguments`: `LifetimeSpecifierArgumentsSyntax`
19181918
/// - `rightParen`: `)`
19191919
///
@@ -1935,17 +1935,17 @@ public struct LifetimeTypeSpecifierSyntax: SyntaxProtocol, SyntaxHashable, _Leaf
19351935

19361936
/// - Parameters:
19371937
/// - 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.
1938-
/// - specifier: The specifier token that's attached to the type.
1938+
/// - dependsOnKeyword: The specifier token that's attached to the type.
19391939
/// - 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.
19401940
public init(
19411941
leadingTrivia: Trivia? = nil,
1942-
_ unexpectedBeforeSpecifier: UnexpectedNodesSyntax? = nil,
1943-
specifier: TokenSyntax = .keyword(.dependsOn),
1944-
_ unexpectedBetweenSpecifierAndLeftParen: UnexpectedNodesSyntax? = nil,
1942+
_ unexpectedBeforeDependsOnKeyword: UnexpectedNodesSyntax? = nil,
1943+
dependsOnKeyword: TokenSyntax = .keyword(.dependsOn),
1944+
_ unexpectedBetweenDependsOnKeywordAndLeftParen: UnexpectedNodesSyntax? = nil,
19451945
leftParen: TokenSyntax = .leftParenToken(),
1946-
_ unexpectedBetweenLeftParenAndScoped: UnexpectedNodesSyntax? = nil,
1947-
scoped: TokenSyntax? = nil,
1948-
_ unexpectedBetweenScopedAndArguments: UnexpectedNodesSyntax? = nil,
1946+
_ unexpectedBetweenLeftParenAndScopedKeyword: UnexpectedNodesSyntax? = nil,
1947+
scopedKeyword: TokenSyntax? = nil,
1948+
_ unexpectedBetweenScopedKeywordAndArguments: UnexpectedNodesSyntax? = nil,
19491949
arguments: LifetimeSpecifierArgumentsSyntax,
19501950
_ unexpectedBetweenArgumentsAndRightParen: UnexpectedNodesSyntax? = nil,
19511951
rightParen: TokenSyntax = .rightParenToken(),
@@ -1956,26 +1956,26 @@ public struct LifetimeTypeSpecifierSyntax: SyntaxProtocol, SyntaxHashable, _Leaf
19561956
// Extend the lifetime of all parameters so their arenas don't get destroyed
19571957
// before they can be added as children of the new arena.
19581958
self = withExtendedLifetime((SyntaxArena(), (
1959-
unexpectedBeforeSpecifier,
1960-
specifier,
1961-
unexpectedBetweenSpecifierAndLeftParen,
1959+
unexpectedBeforeDependsOnKeyword,
1960+
dependsOnKeyword,
1961+
unexpectedBetweenDependsOnKeywordAndLeftParen,
19621962
leftParen,
1963-
unexpectedBetweenLeftParenAndScoped,
1964-
scoped,
1965-
unexpectedBetweenScopedAndArguments,
1963+
unexpectedBetweenLeftParenAndScopedKeyword,
1964+
scopedKeyword,
1965+
unexpectedBetweenScopedKeywordAndArguments,
19661966
arguments,
19671967
unexpectedBetweenArgumentsAndRightParen,
19681968
rightParen,
19691969
unexpectedAfterRightParen
19701970
))) { (arena, _) in
19711971
let layout: [RawSyntax?] = [
1972-
unexpectedBeforeSpecifier?.raw,
1973-
specifier.raw,
1974-
unexpectedBetweenSpecifierAndLeftParen?.raw,
1972+
unexpectedBeforeDependsOnKeyword?.raw,
1973+
dependsOnKeyword.raw,
1974+
unexpectedBetweenDependsOnKeywordAndLeftParen?.raw,
19751975
leftParen.raw,
1976-
unexpectedBetweenLeftParenAndScoped?.raw,
1977-
scoped?.raw,
1978-
unexpectedBetweenScopedAndArguments?.raw,
1976+
unexpectedBetweenLeftParenAndScopedKeyword?.raw,
1977+
scopedKeyword?.raw,
1978+
unexpectedBetweenScopedKeywordAndArguments?.raw,
19791979
arguments.raw,
19801980
unexpectedBetweenArgumentsAndRightParen?.raw,
19811981
rightParen.raw,
@@ -1993,7 +1993,7 @@ public struct LifetimeTypeSpecifierSyntax: SyntaxProtocol, SyntaxHashable, _Leaf
19931993
}
19941994
}
19951995

1996-
public var unexpectedBeforeSpecifier: UnexpectedNodesSyntax? {
1996+
public var unexpectedBeforeDependsOnKeyword: UnexpectedNodesSyntax? {
19971997
get {
19981998
return Syntax(self).child(at: 0)?.cast(UnexpectedNodesSyntax.self)
19991999
}
@@ -2007,7 +2007,7 @@ public struct LifetimeTypeSpecifierSyntax: SyntaxProtocol, SyntaxHashable, _Leaf
20072007
/// ### Tokens
20082008
///
20092009
/// For syntax trees generated by the parser, this is guaranteed to be `dependsOn`.
2010-
public var specifier: TokenSyntax {
2010+
public var dependsOnKeyword: TokenSyntax {
20112011
get {
20122012
return Syntax(self).child(at: 1)!.cast(TokenSyntax.self)
20132013
}
@@ -2016,7 +2016,7 @@ public struct LifetimeTypeSpecifierSyntax: SyntaxProtocol, SyntaxHashable, _Leaf
20162016
}
20172017
}
20182018

2019-
public var unexpectedBetweenSpecifierAndLeftParen: UnexpectedNodesSyntax? {
2019+
public var unexpectedBetweenDependsOnKeywordAndLeftParen: UnexpectedNodesSyntax? {
20202020
get {
20212021
return Syntax(self).child(at: 2)?.cast(UnexpectedNodesSyntax.self)
20222022
}
@@ -2037,7 +2037,7 @@ public struct LifetimeTypeSpecifierSyntax: SyntaxProtocol, SyntaxHashable, _Leaf
20372037
}
20382038
}
20392039

2040-
public var unexpectedBetweenLeftParenAndScoped: UnexpectedNodesSyntax? {
2040+
public var unexpectedBetweenLeftParenAndScopedKeyword: UnexpectedNodesSyntax? {
20412041
get {
20422042
return Syntax(self).child(at: 4)?.cast(UnexpectedNodesSyntax.self)
20432043
}
@@ -2049,7 +2049,7 @@ public struct LifetimeTypeSpecifierSyntax: SyntaxProtocol, SyntaxHashable, _Leaf
20492049
/// ### Tokens
20502050
///
20512051
/// For syntax trees generated by the parser, this is guaranteed to be `scoped`.
2052-
public var scoped: TokenSyntax? {
2052+
public var scopedKeyword: TokenSyntax? {
20532053
get {
20542054
return Syntax(self).child(at: 5)?.cast(TokenSyntax.self)
20552055
}
@@ -2058,7 +2058,7 @@ public struct LifetimeTypeSpecifierSyntax: SyntaxProtocol, SyntaxHashable, _Leaf
20582058
}
20592059
}
20602060

2061-
public var unexpectedBetweenScopedAndArguments: UnexpectedNodesSyntax? {
2061+
public var unexpectedBetweenScopedKeywordAndArguments: UnexpectedNodesSyntax? {
20622062
get {
20632063
return Syntax(self).child(at: 6)?.cast(UnexpectedNodesSyntax.self)
20642064
}
@@ -2108,13 +2108,13 @@ public struct LifetimeTypeSpecifierSyntax: SyntaxProtocol, SyntaxHashable, _Leaf
21082108

21092109
public static var structure: SyntaxNodeStructure {
21102110
return .layout([
2111-
\Self.unexpectedBeforeSpecifier,
2112-
\Self.specifier,
2113-
\Self.unexpectedBetweenSpecifierAndLeftParen,
2111+
\Self.unexpectedBeforeDependsOnKeyword,
2112+
\Self.dependsOnKeyword,
2113+
\Self.unexpectedBetweenDependsOnKeywordAndLeftParen,
21142114
\Self.leftParen,
2115-
\Self.unexpectedBetweenLeftParenAndScoped,
2116-
\Self.scoped,
2117-
\Self.unexpectedBetweenScopedAndArguments,
2115+
\Self.unexpectedBetweenLeftParenAndScopedKeyword,
2116+
\Self.scopedKeyword,
2117+
\Self.unexpectedBetweenScopedKeywordAndArguments,
21182118
\Self.arguments,
21192119
\Self.unexpectedBetweenArgumentsAndRightParen,
21202120
\Self.rightParen,

0 commit comments

Comments
 (0)