Skip to content

Commit 5c02eb5

Browse files
committed
Underscore _SwiftSyntaxMacros because it is So Very Experimental
1 parent 38d7dfc commit 5c02eb5

File tree

12 files changed

+10
-10
lines changed

12 files changed

+10
-10
lines changed

Package.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ let package = Package(
5050
.library(name: "SwiftSyntax", type: .static, targets: ["SwiftSyntax"]),
5151
.library(name: "SwiftSyntaxParser", type: .static, targets: ["SwiftSyntaxParser"]),
5252
.library(name: "SwiftSyntaxBuilder", type: .static, targets: ["SwiftSyntaxBuilder"]),
53-
.library(name: "SwiftSyntaxMacros", type: .static, targets: ["SwiftSyntaxMacros"]),
53+
.library(name: "_SwiftSyntaxMacros", type: .static, targets: ["_SwiftSyntaxMacros"]),
5454
],
5555
targets: [
5656
.target(
@@ -142,7 +142,7 @@ let package = Package(
142142
]
143143
),
144144
.target(
145-
name: "SwiftSyntaxMacros",
145+
name: "_SwiftSyntaxMacros",
146146
dependencies: [
147147
"SwiftSyntax", "SwiftSyntaxBuilder", "SwiftParser", "SwiftDiagnostics"
148148
],
@@ -155,7 +155,7 @@ let package = Package(
155155
),
156156
.executableTarget(
157157
name: "swift-parser-cli",
158-
dependencies: ["SwiftDiagnostics", "SwiftSyntax", "SwiftParser", "SwiftOperators", "SwiftSyntaxMacros",
158+
dependencies: ["SwiftDiagnostics", "SwiftSyntax", "SwiftParser", "SwiftOperators", "_SwiftSyntaxMacros",
159159
.product(name: "ArgumentParser", package: "swift-argument-parser")]
160160
),
161161
.testTarget(
@@ -179,7 +179,7 @@ let package = Package(
179179
name: "SwiftSyntaxMacrosTest",
180180
dependencies: ["SwiftDiagnostics", "SwiftOperators", "SwiftParser",
181181
"_SwiftSyntaxTestSupport", "SwiftSyntaxBuilder",
182-
"SwiftSyntaxMacros"]
182+
"_SwiftSyntaxMacros"]
183183
),
184184
.testTarget(
185185
name: "PerformanceTest",

Sources/SwiftSyntaxMacros/SwiftSyntaxMacros.docc/Info.plist renamed to Sources/_SwiftSyntaxMacros/_SwiftSyntaxMacros.docc/Info.plist

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
<plist version="1.0">
44
<dict>
55
<key>CFBundleName</key>
6-
<string>SwiftSyntaxMacros</string>
6+
<string>_SwiftSyntaxMacros</string>
77
<key>CFBundleDisplayName</key>
8-
<string>SwiftSyntaxMacros</string>
8+
<string>_SwiftSyntaxMacros</string>
99
<key>CFBundleIdentifier</key>
1010
<string>com.apple.swift-syntax-macros</string>
1111
<key>CFBundleDevelopmentRegion</key>

Sources/SwiftSyntaxMacros/SwiftSyntaxMacros.docc/SwiftSyntaxMacros.md renamed to Sources/_SwiftSyntaxMacros/_SwiftSyntaxMacros.docc/_SwiftSyntaxMacros.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# ``SwiftSyntaxMacros``
1+
# ``_SwiftSyntaxMacros``
22

33

44

@@ -34,4 +34,4 @@ New example macros can be added by defining new types that conform to the approp
3434

3535
## What's the future for this library?
3636

37-
Well, that depends. The `SwiftSyntaxMacros` module is part of a potential vision for a macros feature in Swift, where the effect of macro evaluation is as it works here---executable Swift code that transforms a given syntax tree into another syntax tree. That design also integrates macros into the type checker, so that macros are only evaluated on well-typed inputs and are expected to either produce well-typed syntax trees as output or emit diagnostics along the way. If that design is accepted as the design for Swift, much of this module will remain as it is---but the examples themselves will be divided into a builtin set of macros that are always available to the compiler (e.g., to provide the implementation for things like `#line`) or moved into a separate examples module to provide documentation on how to use the feature.
37+
Well, that depends. The `_SwiftSyntaxMacros` module is part of a potential vision for a macros feature in Swift, where the effect of macro evaluation is as it works here---executable Swift code that transforms a given syntax tree into another syntax tree. That design also integrates macros into the type checker, so that macros are only evaluated on well-typed inputs and are expected to either produce well-typed syntax trees as output or emit diagnostics along the way. If that design is accepted as the design for Swift, much of this module will remain as it is---but the examples themselves will be divided into a builtin set of macros that are always available to the compiler (e.g., to provide the implementation for things like `#line`) or moved into a separate examples module to provide documentation on how to use the feature.

Sources/swift-parser-cli/swift-parser-cli.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
import SwiftDiagnostics
1414
import SwiftSyntax
15-
@_spi(Testing) import SwiftSyntaxMacros
15+
@_spi(Testing) import _SwiftSyntaxMacros
1616
import SwiftParser
1717
import SwiftOperators
1818
import Foundation

Tests/SwiftSyntaxMacrosTest/MacroSystemTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import XCTest
22
import SwiftSyntax
33
import SwiftSyntaxBuilder
4-
@_spi(Testing) import SwiftSyntaxMacros
4+
@_spi(Testing) import _SwiftSyntaxMacros
55
import _SwiftSyntaxTestSupport
66

77
final class MacroSystemTests: XCTestCase {

0 commit comments

Comments
 (0)