You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+8-8
Original file line number
Diff line number
Diff line change
@@ -2,10 +2,10 @@
2
2
3
3
SwiftSyntax is a set of Swift bindings for the
4
4
[libSyntax](https://github.com/apple/swift/tree/main/lib/Syntax) library. It
5
-
allows for Swift tools to parse, inspect, generate, and transform Swift source
5
+
allows Swift tools to parse, inspect, generate, and transform Swift source
6
6
code.
7
7
8
-
Its API is designed for performancecritical applications. It uses value types almost exclusively and aims to avoid existential conversions where possible.
8
+
Its API is designed for performance-critical applications. It uses value types almost exclusively and aims to avoid existential conversions where possible.
9
9
10
10
> Note: SwiftSyntax is still in development, and the API is not guaranteed to
11
11
> be stable. It's subject to change without warning.
@@ -54,7 +54,7 @@ Then, import `SwiftSyntax` in your Swift code.
54
54
$ export TOOLCHAINS=swift
55
55
```
56
56
57
-
3. To make sure everything is setup correctly, check the result of `xcrun --find swift`. It should point inside the OSS toolchain.
57
+
3. To make sure everything is set up correctly, check the result of `xcrun --find swift`. It should point inside the OSS toolchain.
58
58
59
59
4. Add this entry to the `Package.swift` manifest of your project:
60
60
@@ -73,7 +73,7 @@ let package = Package(
73
73
)
74
74
```
75
75
76
-
Tags will be created for every nightly build in the form of `swift-DEVELOPMENT-SNAPSHOT-<DATE>`. Revision field
76
+
Tags will be created for every nightly build in the form of `swift-DEVELOPMENT-SNAPSHOT-<DATE>`. The revision field
77
77
should be specified with the intended tag.
78
78
79
79
Different from building SwiftSyntax from source, declaring SwiftSyntax as a SwiftPM dependency doesn't require
@@ -157,18 +157,18 @@ To build the `main` branch of SwiftSyntax, follow the following instructions:
157
157
$ export TOOLCHAINS=swift
158
158
```
159
159
160
-
4. To make sure everything is setup correctly, check the return statement of `xcrun --find swift`. It should point inside the latest installed trunk development toolchain. If it points inside an Xcode toolchain, check that you exported the `TOOLCHAINS` environment variable correctly. If it points inside a versionspecific toolchain (like Swift 5.0-dev), you'll need to remove that toolchain.
160
+
4. To make sure everything is set up correctly, check the return statement of `xcrun --find swift`. It should point inside the latest installed trunk development toolchain. If it points inside an Xcode toolchain, check that you exported the `TOOLCHAINS` environment variable correctly. If it points inside a version-specific toolchain (like Swift 5.0-dev), you'll need to remove that toolchain.
161
161
5. Run `swift-syntax/build-script.py`.
162
162
163
-
If, despite following those instructions, you get compiler errors, the Swift toolchain might be too old to contain recent changes in Swift's SwiftSyntaxParser C library. In that case, you'll have to build the compiler and SwiftSyntax together with the following command:
163
+
If despite following those instructions, you get compiler errors, the Swift toolchain might be too old to contain recent changes in Swift's SwiftSyntaxParser C library. In that case, you'll have to build the compiler and SwiftSyntax together with the following command:
Swift-CI will automatically run the code generation step whenever a new toolchain (development snapshot or release) is published. It should thus almost never be necessary to perform the above build yourself.
170
170
171
-
Afterwards, SwiftPM can also generate an Xcode project to develop SwiftSyntax by running `swift package generate-xcodeproj`.
171
+
Afterward, SwiftPM can also generate an Xcode project to develop SwiftSyntax by running `swift package generate-xcodeproj`.
172
172
173
173
If you also want to run tests locally, read the section below as testing has additional requirements.
0 commit comments