Skip to content

Commit 5eb94d7

Browse files
authored
Merge pull request swiftlang#219 from akyrtzi/update-changelog-readme
Update Changelog and Readme
2 parents f067727 + 1324a65 commit 5eb94d7

File tree

2 files changed

+29
-0
lines changed

2 files changed

+29
-0
lines changed

Changelog.md

+8
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,14 @@
22

33
Note: This is in reverse chronological order, so newer entries are added to the top.
44

5+
## Swift 5.3
6+
7+
* Introduced `FunctionCallExprSyntax.additionalTrailingClosures` property with type `MultipleTrailingClosureElementListSyntax?` for supporting [SE-0279 Multiple Trailing Closures](https://github.com/apple/swift-evolution/blob/master/proposals/0279-multiple-trailing-closures.md).
8+
9+
* Introduced `syntaxNodeType` property for all types conforming to `SyntaxProtocol`, which returns the underlying syntax node type. It is primarily intended as a debugging aid during development.
10+
11+
* Provided a clearer error message for the "parser compatibility" error.
12+
513
## Swift 5.2
614

715
- `ReversedSyntaxChildren` has been removed

README.md

+21
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,27 @@ should be specified with the intended tag.
7979
Different from building SwiftSyntax from source, declaring SwiftSyntax as a SwiftPM dependency doesn't require
8080
the Swift compiler source because we always push gyb-generated files to a tag.
8181

82+
### Embedding SwiftSyntax in an Application
83+
84+
SwiftSyntax depends on the `lib_InternalSwiftSyntaxParser.dylib/.so` library which provides a C interface to the underlying Swift C++ parser. When you do `swift build` SwiftSyntax links and uses the library included in the Swift toolchain. If you are building an application make sure to embed `_InternalSwiftSyntaxParser` as part of your application's libraries.
85+
86+
You can either copy `lib_InternalSwiftSyntaxParser.dylib/.so` directly from the toolchain or even build it yourself from the [Swift repository](https://github.com/apple/swift), as long as you are matching the same tags or branches in both the SwiftSyntax and Swift repositories. To build it for the host os (macOS/linux) use the following steps:
87+
88+
```
89+
git clone https://github.com/apple/swift.git
90+
./swift/utils/update-checkout --clone
91+
./swift/utils/build-parser-lib --release --no-assertions --build-dir /tmp/parser-lib-build
92+
```
93+
94+
### Embedding in an iOS Application
95+
96+
You need to build `lib_InternalSwiftSyntaxParser.dylib` yourself, you cannot copy it from the toolchain. Follow the instructions above and change the invocation of `build-parser-lib` accordingly:
97+
98+
```
99+
./swift/utils/build-parser-lib --release --no-assertions --build-dir /tmp/parser-lib-build-iossim --host iphonesimulator --architectures x86_64
100+
./swift/utils/build-parser-lib --release --no-assertions --build-dir /tmp/parser-lib-build-ios --host iphoneos --architectures arm64
101+
```
102+
82103
### Some Example Users
83104

84105
[**Swift AST Explorer**](https://swift-ast-explorer.kishikawakatsumi.com/): a Swift AST visualizer.

0 commit comments

Comments
 (0)