SwiftSyntax is now a SwiftPM project

SourceKit provides a way to interface with the compiler (via a C API) and primarily do semantic things that editors need, like provide code-completion. SwiftSyntax allows you to write swift code and manipulate programmatically the syntactic structure of swift sources. Currently there is only syntactic support, there is no way to do semantic queries via using SwiftSyntax.

SourceKit and SwiftSyntax are complementary, for example there is a SourceKit request to get the libSyntax tree for a swift file and then manipulate it by using SwiftSyntax. If at some point we provide a mechanism to do semantic queries on a SwiftSyntax tree it will most likely "funnel through" the SourceKit framework.

4 Likes