A set of Swift libraries for parsing, inspecting, generating, and transforming Swift source code.

What's New



This is the 0.50700.1 release of SwiftSyntax that vends the parser library (_InternalSwiftSyntaxParser.dylib) as a binary framework dependency on macOS.

To use this snapshot add the following dependency to your Package.swift:

.package(url: "https://github.com/apple/swift-syntax", branch: "0.50700.1")

Or, if using a swift-tools-version ≤ 5.4:

.package(url: "https://github.com/apple/swift-syntax", .branch("0.50700.1"))

⚠️ Important: This release of SwiftSyntax is incompatible with the parser library included in the swift-5.7-RELEASE toolchain. On Linux, download a recent swift-5.7-DEVELOPMENT-SNAPSHOT toolchain to use this SwiftSyntax version. On macOS, this version of SwiftSyntax is compatible with any recent Swift or Xcode toolchain because it includes the parser library as a binary dependency.


SwiftSyntax is a set of Swift bindings for the libSyntax library. It allows Swift tools to parse, inspect, generate, and transform Swift source code.

Its API is designed for performance-critical applications. It uses value types almost exclusively and aims to avoid existential conversions where possible.

Note: SwiftSyntax is still in development, and the API is not guaranteed to be stable. It's subject to change without warning.

Declare SwiftPM dependency with release tag

Add this repository to the Package.swift manifest of your project:

// swift-tools-version:5.3
import PackageDescription

let package = Package(
  name: "MyTool",
  dependencies: [
    .package(name: "SwiftSyntax", url: "https://github.com/apple/swift-syntax.git", .exact("<#Specify Release tag#>")),
  targets: [
    .target(name: "MyTool", dependencies: ["SwiftSyntax"]),

Replace <#Specify Release tag#> by the version of SwiftSyntax that you want to use (see the following table for mapping details).

Xcode Release Swift Release Tag SwiftSyntax Release Tag
Xcode 13.3 swift-5.6-RELEASE 0.50600.1
Xcode 13.0 swift-5.5-RELEASE 0.50500.0
Xcode 12.5 swift-5.4-RELEASE 0.50400.0
Xcode 12.0 swift-5.3-RELEASE 0.50300.0
Xcode 11.4 swift-5.2-RELEASE 0.50200.0

Then, import SwiftSyntax in your Swift code.


Documentation can be found here and some examples of using SwiftSyntax can be found here.


Start contributing to SwiftSyntax see this guide for more information.

Reporting Issues

If you should hit any issues while using SwiftSyntax, we appreciate bug reports on bugs.swift.org in the SwiftSyntax component.


Please see LICENSE for more information.


  • Swift Tools 5.3.0
View More Packages from this Author


  • None
Last updated: Sat Nov 26 2022 14:48:55 GMT-0500 (GMT-05:00)