Refactor Library And Start Runtime

Signed-off-by: Will Hawkins <hawkinsw@obs.cr>
This commit is contained in:
Will Hawkins
2026-01-20 07:10:58 -05:00
parent 45a8baa323
commit 4bec71dcf4
11 changed files with 472 additions and 65 deletions
+16 -5
View File
@@ -8,28 +8,39 @@ let package = Package(
products: [
// Products define the executables and libraries a package produces, making them visible to other packages.
.library(
name: "p4lm",
targets: ["p4lm"]
name: "Parser",
targets: ["Parser"]
),
.library(
name: "P4",
targets: ["P4"]
)
],
dependencies: [
.package(path: "./tree-sitter-p4"),
.package(url: "https://github.com/tree-sitter/swift-tree-sitter", revision: "main"),
.package(url: "https://github.com/apple/swift-docc-plugin", from: "1.0.0"),
],
targets: [
// Targets are the basic building blocks of a package, defining a module or a test suite.
// Targets can depend on other targets in this package and products from dependencies.
.target(
name: "p4lm",
name: "Parser",
dependencies: [
.product(name: "SwiftTreeSitter", package: "swift-tree-sitter"),
.product(name: "SwiftTreeSitterLayer", package: "swift-tree-sitter"),
.product(name: "TreeSitterP4", package: "tree-sitter-p4"),
.target(name: "P4")
],
),
// Targets are the basic building blocks of a package, defining a module or a test suite.
// Targets can depend on other targets in this package and products from dependencies.
.target(
name: "P4",
),
.testTarget(
name: "p4lmTests",
dependencies: ["p4lm"]
name: "ParserTests",
dependencies: ["Parser", "P4"]
),
]
)