Skip to content

Commit 545a5fd

Browse files
authored
Merge pull request #501 from CodaFi/missingno
Allow for Creating Missing Blank Syntax Nodes
2 parents 7c2f054 + fb4b539 commit 545a5fd

File tree

2 files changed

+496
-496
lines changed

2 files changed

+496
-496
lines changed

Sources/SwiftSyntax/SyntaxFactory.swift.gyb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ public enum SyntaxFactory {
8383
% end
8484

8585
% if not node.is_base():
86-
public static func makeBlank${node.syntax_kind}() -> ${node.name} {
86+
public static func makeBlank${node.syntax_kind}(presence: SourcePresence = .present) -> ${node.name} {
8787
let data = SyntaxData.forRoot(RawSyntax.create(kind: .${node.swift_syntax_kind},
8888
layout: [
8989
% for child in node.children:
@@ -93,7 +93,7 @@ public enum SyntaxFactory {
9393
${make_missing_swift_child(child)},
9494
% end
9595
% end
96-
], length: .zero, presence: .present))
96+
], length: .zero, presence: presence))
9797
return ${node.name}(data)
9898
}
9999
% end

0 commit comments

Comments
 (0)