swiftlang/swift-syntax

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

View on GitHub ↗Jump to charts ↓Open shareable report

Summary Information

Updated 8 minutes ago
Added to GitGenius on September 18th, 2026
Created on July 31st, 2018
Open Issues & Pull Requests: 186 (+0)
GitHub issues: Enabled
Number of forks: 555
Total Stargazers: 3,701 (+0)
Total Subscribers: 170 (+0)

Repository Insights (GitGenius)

Median issue/PR response: 0.5 hours
Mean response time: 18.1 days
90th percentile: 3.9 days
Tracked items: 336

Most active contributors

Sign in to see contributor activity.

How this project is maintained

77% of open issues come from outside the core team, so the backlog reflects real-world use rather than internal planning. Three people close 74% of everything that gets resolved.

Charts & Analytics

Fetching additional details & charts...

Issue Activity (beta)

Open issues: 52
New in 7 days: 3
Closed in 7 days: 2
Avg open age: 750 days
Stale 30+ days: 47
Stale 90+ days: 46

Recent activity

Opened in 7 days: 3
Closed in 7 days: 2
Comments in 7 days: 0
Events in 7 days: 1

Top labels

  • SwiftParser (108)
  • good first issue (38)
  • enhancement (14)
  • Macros (9)
  • BasicFormat (4)
  • Source Breaking (1)
  • SwiftSyntaxBuilder (1)

Detailed Description

Swift Syntax is a set of Swift libraries for parsing, inspecting, generating, and transforming Swift source code.

The tool addresses the need to work programmatically with Swift code by providing a source-accurate tree representation called the SwiftSyntax tree. This tree forms the backbone of Swift's macro system, where macro expansion nodes are represented as SwiftSyntax nodes and macros generate SwiftSyntax trees to be inserted into source files. Developers can parse Swift source code into this tree structure, inspect its nodes, generate new code, and apply transformations.

Anyone building Swift macros or tools that need to analyze or generate Swift code should consider this library. It is the foundational infrastructure for Swift's macro expansion system, making it essential for macro authors. The project provides documentation on the Swift Package Index and an interactive AST explorer for learning the tree structure. Example usages are available in the repository to help developers understand how to work with the library. The tool integrates with both SwiftPM and Xcode for dependency management, and experimental Bazel support is available for those using that build system.

The project maintains release versions aligned with Swift language versions, ensuring compatibility with specific tooling releases. Development activity shows consistent engagement with bug reports and contributions through GitHub, supported by a documented contribution guide. The maintainers provide experimental build system support beyond the standard Swift tooling, indicating willingness to support diverse integration scenarios.