We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents cca42d0 + 84b6a7c commit 60e41b0Copy full SHA for 60e41b0
CodeGeneration/Sources/SyntaxSupport/Node.swift
@@ -151,6 +151,11 @@ public class Node {
151
152
/// A doc comment that lists all the nodes in which this node occurs as a child in.
153
public var containedIn: SwiftSyntax.Trivia {
154
+ if kind == .unexpectedNodes {
155
+ // We don't want to generate a 'Contained In' section for UnexpectedNodesSyntax
156
+ // because all nodes contain an UnexpectedNodesSyntax.
157
+ return []
158
+ }
159
var childIn: [(node: SyntaxNodeKind, child: Child?)] = []
160
for node in SYNTAX_NODES {
161
if let layout = node.layoutNode {
0 commit comments