Start Rewrite
Continuous Integration / Grammar Tests (push) Successful in 3m54s
Continuous Integration / Library Format Tests (push) Failing after 4m49s
Continuous Integration / Library Tests (push) Successful in 7m40s

Signed-off-by: Will Hawkins <hawkinsw@obs.cr>
This commit is contained in:
Will Hawkins
2026-06-12 06:24:53 -04:00
parent 6908d9a91d
commit b9ff228362
73 changed files with 1779 additions and 11477 deletions
+10 -26
View File
@@ -18,16 +18,8 @@ let package = Package(
targets: ["Common"]
),
.library(
name: "P4Lang",
targets: ["P4Lang"]
),
.library(
name: "P4Runtime",
targets: ["P4Runtime"]
),
.executable(
name: "p4ce",
targets: ["Cli"]
name: "P4CodeGen",
targets: ["P4CodeGen"]
),
],
dependencies: [
@@ -37,6 +29,7 @@ let package = Package(
.package(url: "https://github.com/swiftlang/swift-syntax", from: "602.0.0"),
.package(url: "https://github.com/apple/swift-argument-parser", from: "1.0.0"),
.package(url: "https://github.com/apple/swift-system", from: "1.6.1"),
//.package(url: "https://github.com/apple/swift-protobuf.git", from: "1.27.0"),
],
targets: [
.macro(
@@ -54,8 +47,6 @@ let package = Package(
.product(name: "TreeSitterP4", package: "tree-sitter-p4"),
.target(name: "TreeSitterExtensions"),
.target(name: "Common"),
.target(name: "P4Lang"),
.target(name: "P4Runtime"),
],
swiftSettings: [.enableExperimentalFeature("CodeItemMacros")],
),
@@ -71,32 +62,25 @@ let package = Package(
dependencies: [
"Macros",
.product(name: "SystemPackage", package: "swift-system"),
.product(name: "SwiftTreeSitter", package: "swift-tree-sitter"),
],
swiftSettings: [.enableExperimentalFeature("CodeItemMacros")],
),
.target(
name: "P4Lang",
dependencies: ["Common"]
),
.target(
name: "P4Runtime",
dependencies: ["P4Lang", "Common"]
),
.executableTarget(
name: "Cli",
name: "P4CodeGen",
dependencies: [
"Common", "P4Lang", "P4Compiler", "P4Runtime", "Macros",
.product(name: "ArgumentParser", package: "swift-argument-parser"),
],
swiftSettings: [.enableExperimentalFeature("CodeItemMacros")],
"P4Compiler", "Common",
//.product(name: "SwiftProtobuf", package: "swift-protobuf"),
]
),
.testTarget(
name: "Tests",
dependencies: [
"P4Compiler", "P4Runtime", "P4Lang", "Macros", "TreeSitterExtensions", "Common",
"P4Compiler", "P4CodeGen", "Macros", "TreeSitterExtensions", "Common",
.product(name: "SystemPackage", package: "swift-system"),
],
//swiftSettings: [.enableExperimentalFeature("CodeItemMacros"), .unsafeFlags(["-Xfrontend", "-dump-macro-expansions"])],
swiftSettings: [.enableExperimentalFeature("CodeItemMacros")],
),
],