Skip to content

Add DocC to SwiftSyntax #468

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 3, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// swift-tools-version:5.3
// swift-tools-version:5.6

import PackageDescription
import Foundation
Expand Down Expand Up @@ -94,11 +94,11 @@ let package = Package(
name: "_SwiftSyntaxTestSupport",
dependencies: ["SwiftSyntax"]
),
.target(
.executableTarget(
name: "lit-test-helper",
dependencies: ["SwiftSyntax", "SwiftSyntaxParser"]
),
.target(
.executableTarget(
name: "SwiftSyntaxBuilderGeneration",
dependencies: ["SwiftSyntaxBuilder"],
exclude: [
Expand Down Expand Up @@ -142,3 +142,7 @@ let package = Package(
),
]
)

if ProcessInfo.processInfo.environment["SWIFT_BUILD_SCRIPT_ENVIRONMENT"] == nil {
package.dependencies.append(.package(url: "https://github.com/apple/swift-docc-plugin", from: "1.0.0"))
}
5 changes: 5 additions & 0 deletions Sources/SwiftSyntax/Documentation.docc/Index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# ``SwiftSyntax``

SwiftSyntax is a source accurate tree representation of Swift source code. 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.
3 changes: 3 additions & 0 deletions Sources/SwiftSyntaxBuilder/Documentation.docc/Index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# ``SwiftSyntaxBuilder``

SwiftSyntaxBuiler is a tool for generating Swift code in a convenient way using result builders.
3 changes: 3 additions & 0 deletions Sources/SwiftSyntaxParser/Documentation.docc/Index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# ``SwiftSyntaxParser``

SwiftSyntaxParser allows parsing Swift source code into a SwiftSyntax tree.