Skip to content

Commit 5447b09

Browse files
committed
Use trailing closure in code generation example
1 parent f661547 commit 5447b09

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Snippets/CodeGenerationUsingSwiftSyntaxBuilder.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ import SwiftSyntaxBuilder
1313
let source = SourceFile {
1414
ImportDecl(path: "Foundation")
1515
ImportDecl(path: "UIKit")
16-
ClassDecl(classKeyword: .class, identifier: "SomeViewController", membersBuilder: {
16+
ClassDecl(identifier: "SomeViewController") {
1717
VariableDecl(.let, name: "tableView", type: "UITableView")
18-
})
18+
}
1919
}
2020

2121
let syntax = source.buildSyntax(format: Format())

0 commit comments

Comments
 (0)