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.
1 parent 4495871 commit 5b46142Copy full SHA for 5b46142
Sources/SwiftSyntaxBuilder/README.md
@@ -0,0 +1,30 @@
1
+# SwiftSyntaxBuilder
2
+
3
+Declarative and type-safe wrapper around SwiftSyntax.
4
5
+## Example Usage
6
7
+```swift
8
+let sourceFile = SourceFile {
9
+ Import("SwiftSyntax")
10
11
+ Struct("ExampleStruct") {
12
+ Let("syntax", of: "Syntax")
13
+ }
14
+}
15
16
+let syntax = sourceFile.buildSyntax(format: format, leadingTrivia: .zero)
17
18
+var text = ""
19
+syntax.write(to: &text)
20
+print(text)
21
+```
22
23
+prints:
24
25
26
+import SwiftSyntax
27
+struct ExampleStruct {
28
+ let syntax: Syntax
29
30
0 commit comments