Skip to content

Commit d9af173

Browse files
authored
Merge pull request #519 from evnik/ResultBuilders
Element List initializers accepting result builder
2 parents cafd34b + 0ae380c commit d9af173

File tree

3 files changed

+286
-20
lines changed

3 files changed

+286
-20
lines changed

Sources/SwiftSyntaxBuilder/ResultBuilders.swift.gyb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,4 +102,10 @@ public struct ${type.result_builder()} {
102102
}
103103
}
104104

105+
public extension ${type.buildable()} {
106+
init(@${type.result_builder()} itemsBuilder: () -> ${type.buildable()}) {
107+
self = itemsBuilder()
108+
}
109+
}
110+
105111
% end

0 commit comments

Comments
 (0)