[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-6947":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":16,"stars7d":17,"stars30d":18,"stars90d":16,"forks30d":16,"starsTrendScore":19,"compositeScore":20,"rankGlobal":10,"rankLanguage":10,"license":21,"archived":22,"fork":22,"defaultBranch":23,"hasWiki":22,"hasPages":22,"topics":24,"createdAt":10,"pushedAt":10,"updatedAt":25,"readmeContent":26,"aiSummary":27,"trendingCount":16,"starSnapshotCount":16,"syncStatus":19,"lastSyncTime":28,"discoverSource":29},6947,"swift-syntax","swiftlang\u002Fswift-syntax","swiftlang","A set of Swift libraries for parsing, inspecting, generating, and transforming Swift source code.","",null,"Swift",3665,518,173,80,0,6,24,2,30.15,"Apache License 2.0",false,"main",[],"2026-06-12 02:01:32","# Swift Syntax\n\nThe swift-syntax package is a set of libraries that work on a source-accurate tree representation of Swift source code, called the SwiftSyntax tree. The SwiftSyntax tree forms the backbone of Swift’s macro system – the macro expansion nodes are represented as SwiftSyntax nodes and a macro generates a SwiftSyntax tree to be inserted into the source file.\n\n## Documentation\n\nYou can read SwiftSyntax’s documentation on [swiftpackageindex.com](https:\u002F\u002Fswiftpackageindex.com\u002Fswiftlang\u002Fswift-syntax\u002Fdocumentation).\n\nA great way to interactively explore the SwiftSyntax tree of a source file is https:\u002F\u002Fswift-ast-explorer.com, developed by [@kishikawakatsumi](https:\u002F\u002Fgithub.com\u002Fkishikawakatsumi).\n\nA set of example usages of swift-syntax can be found in [Examples](Examples).\n\n## Releases\n\nReleases of SwiftSyntax are aligned with corresponding language and tooling releases, for example the major version 509 of swift-syntax is aligned with Swift 5.9. \n \nTo depend on swift-syntax in a SwiftPM package, add the following to your `Package.swift`.\n\n\n```swift\ndependencies: [\n  .package(url: \"https:\u002F\u002Fgithub.com\u002Fswiftlang\u002Fswift-syntax.git\", from: \"\u003C#latest swift-syntax tag#>\"),\n],\n```\n \nTo add swift-syntax as a dependency of your Xcode project, go to the *Package Dependencies* tab of your Xcode project, click the plus button and search for https:\u002F\u002Fgithub.com\u002Fswiftlang\u002Fswift-syntax.git.\n\n## Reporting Issues\n\nIf you should hit any issues while using SwiftSyntax, we appreciate bug reports on [GitHub Issue](https:\u002F\u002Fgithub.com\u002Fswiftlang\u002Fswift-syntax\u002Fissues).\n\n## Contributing\n\nStart contributing to SwiftSyntax see [this guide](CONTRIBUTING.md) for more information.\n\n## Bazel\n\nSwiftSyntax provides an experimental [Bazel](https:\u002F\u002Fbazel.build) build configuration, maintained by Keith Smiley. \nTo use it, you can pull the source archive from the relevant release tag\ninto your `MODULE.bazel` file (preferred and recommended) with `bazel_dep`. Bzlmod support was added starting release of `509.0.0` and above. All available versions can be found in the [Bazel Central Registry](https:\u002F\u002Fregistry.bazel.build\u002Fmodules\u002Fswift-syntax)\n\n```python3\nbazel_dep(name = \"swift-syntax\", version = \"600.0.1\")\n```\n\nYou can also pull source archive with `WORKSPACE` but note that it is preferred to use `MODULE.bazel`. To use `WORKSPACE` and swift-syntax, you can use `http_archive` as such\n\n```python3\nhttp_archive(\n    name = \"SwiftSyntax\",\n    sha256 = \"f070fd44db9b33f430fd5b5d2700f1e2001c0028711859600e80cc975074fab0\",\n    strip_prefix = \"swift-syntax-509.1.0\",\n    url = \"https:\u002F\u002Fgithub.com\u002Fapple\u002Fswift-syntax\u002Farchive\u002Frefs\u002Ftags\u002F509.1.0.tar.gz\",\n)\n```\n\nand depend on the libraries you need from the\n[`BUILD.bazel`](BUILD.bazel) file. Each library also has an associated\n`Library_opt` target (such as `SwiftSyntax_opt`) which forces\nSwiftSyntax to always build with optimizations enabled. This may help\nlocal runtime performance at the cost of debuggability, and initial\nbuild time. Please tag any [issues](https:\u002F\u002Fgithub.com\u002Fswiftlang\u002Fswift-syntax\u002Fissues) related to the Bazel configuration with the label \"Bazel\".\n\n## License\n\nPlease see [LICENSE](LICENSE.txt) for more information.\n","Swift Syntax 是一套用于解析、检查、生成和转换 Swift 源代码的 Swift 库。它基于一个名为 SwiftSyntax 的源代码准确树表示，为宏系统的扩展节点提供支持，并允许宏生成要插入到源文件中的 SwiftSyntax 树。项目采用 Swift 语言编写，具备高度的可定制性和灵活性，适用于需要对 Swift 代码进行静态分析、重构或自动生成的场景。此外，Swift Syntax 的版本与 Swift 语言及工具链版本保持一致，确保了兼容性与稳定性。对于希望利用程序化方式处理 Swift 代码的开发者而言，Swift Syntax 提供了一个强大且可靠的解决方案。","2026-06-11 03:09:40","top_language"]