Skip to content

Commit 00c45d0

Browse files
committed
Avoid printing experimental nodes in doc comments
1 parent 65adda3 commit 00c45d0

File tree

4 files changed

+2
-6
lines changed

4 files changed

+2
-6
lines changed

CodeGeneration/Sources/SyntaxSupport/Node.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ public class Node {
199199
return []
200200
}
201201
var childIn: [(node: SyntaxNodeKind, child: Child?)] = []
202-
for node in SYNTAX_NODES {
202+
for node in SYNTAX_NODES where !node.isExperimental {
203203
if let layout = node.layoutNode {
204204
for child in layout.children {
205205
if child.kinds.contains(self.kind) {
@@ -248,7 +248,7 @@ public class Node {
248248

249249
let list =
250250
SYNTAX_NODES
251-
.filter { $0.base == self.kind }
251+
.filter { $0.base == self.kind && !$0.isExperimental }
252252
.map { "- ``\($0.kind.syntaxType)``" }
253253
.joined(separator: "\n")
254254

Sources/SwiftSyntax/generated/SyntaxBaseNodes.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -474,7 +474,6 @@ public extension Syntax {
474474
/// - ``DeclReferenceExprSyntax``
475475
/// - ``DictionaryExprSyntax``
476476
/// - ``DiscardAssignmentExprSyntax``
477-
/// - ``DoExprSyntax``
478477
/// - ``EditorPlaceholderExprSyntax``
479478
/// - ``FloatLiteralExprSyntax``
480479
/// - ``ForceUnwrapExprSyntax``
@@ -1099,7 +1098,6 @@ public extension Syntax {
10991098
/// - ``MissingStmtSyntax``
11001099
/// - ``RepeatStmtSyntax``
11011100
/// - ``ReturnStmtSyntax``
1102-
/// - ``ThenStmtSyntax``
11031101
/// - ``ThrowStmtSyntax``
11041102
/// - ``WhileStmtSyntax``
11051103
/// - ``YieldStmtSyntax``

Sources/SwiftSyntax/generated/SyntaxCollections.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,6 @@ public struct AvailabilityArgumentListSyntax: SyntaxCollection, SyntaxHashable {
229229
///
230230
/// ### Contained in
231231
///
232-
/// - ``DoExprSyntax``.``DoExprSyntax/catchClauses``
233232
/// - ``DoStmtSyntax``.``DoStmtSyntax/catchClauses``
234233
public struct CatchClauseListSyntax: SyntaxCollection, SyntaxHashable {
235234
public typealias Element = CatchClauseSyntax

Sources/SwiftSyntax/generated/syntaxNodes/SyntaxNodesC.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3226,7 +3226,6 @@ public struct CodeBlockItemSyntax: SyntaxProtocol, SyntaxHashable, _LeafSyntaxNo
32263226
/// - ``CatchClauseSyntax``.``CatchClauseSyntax/body``
32273227
/// - ``DeferStmtSyntax``.``DeferStmtSyntax/body``
32283228
/// - ``DeinitializerDeclSyntax``.``DeinitializerDeclSyntax/body``
3229-
/// - ``DoExprSyntax``.``DoExprSyntax/body``
32303229
/// - ``DoStmtSyntax``.``DoStmtSyntax/body``
32313230
/// - ``ForStmtSyntax``.``ForStmtSyntax/body``
32323231
/// - ``FunctionDeclSyntax``.``FunctionDeclSyntax/body``

0 commit comments

Comments
 (0)