Skip to content

Commit 9ff9c8d

Browse files
committed
[Swiftify] add Package.swift to enable LSP
1 parent e8a9286 commit 9ff9c8d

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed

lib/Macros/Package.swift

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
// swift-tools-version: 6.2
2+
3+
// Although this could in theory be used to build macros, it's not actually wired up to CMake.
4+
// This is here purely to provide LSP IDE features when working on Swift macros.
5+
6+
import PackageDescription
7+
import CompilerPluginSupport
8+
9+
let package = Package(
10+
name: "SwiftifyImport",
11+
platforms: [.macOS(.v11)],
12+
products: [
13+
.library(
14+
name: "SwiftifyImport",
15+
targets: [
16+
"SwiftifyImport"
17+
]
18+
),
19+
.library(
20+
name: "SwiftifyImportMacro",
21+
targets: [
22+
"SwiftifyImportMacro"
23+
]
24+
)
25+
],
26+
dependencies: [
27+
.package(path: "../../../swift-syntax")
28+
],
29+
targets: [
30+
.macro(
31+
name: "SwiftifyImportMacro",
32+
dependencies: [
33+
.product(name: "SwiftCompilerPlugin", package: "swift-syntax"),
34+
.product(name: "SwiftDiagnostics", package: "swift-syntax"),
35+
.product(name: "SwiftParser", package: "swift-syntax"),
36+
.product(name: "SwiftSyntax", package: "swift-syntax"),
37+
.product(name: "SwiftSyntaxBuilder", package: "swift-syntax"),
38+
.product(name: "SwiftSyntaxMacro", package: "swift-syntax")
39+
]
40+
),
41+
.target(
42+
name: "SwiftifyImport",
43+
dependencies: ["SwiftifyImportMacro"]
44+
)
45+
]
46+
)

0 commit comments

Comments
 (0)