add bindings and fix documentation
This commit is contained in:
1 parent
0e8ef8e7a5
commit
53e1ee2036
34 files changed
+1472
-12
No files matched your search
Generated
+41
@@ -0,0 +1,41 @@
|
||||
// swift-tools-version:5.3
|
||||
|
||||
import Foundation
|
||||
import PackageDescription
|
||||
|
||||
var sources = ["src/parser.c"]
|
||||
if FileManager.default.fileExists(atPath: "src/scanner.c") {
|
||||
sources.append("src/scanner.c")
|
||||
}
|
||||
|
||||
let package = Package(
|
||||
name: "TreeSitterDjango",
|
||||
products: [
|
||||
.library(name: "TreeSitterDjango", targets: ["TreeSitterDjango"]),
|
||||
],
|
||||
dependencies: [
|
||||
.package(url: "https://github.com/tree-sitter/swift-tree-sitter", from: "0.10.0"),
|
||||
],
|
||||
targets: [
|
||||
.target(
|
||||
name: "TreeSitterDjango",
|
||||
dependencies: [],
|
||||
path: ".",
|
||||
sources: sources,
|
||||
resources: [
|
||||
.copy("queries")
|
||||
],
|
||||
publicHeadersPath: "bindings/swift",
|
||||
cSettings: [.headerSearchPath("src")]
|
||||
),
|
||||
.testTarget(
|
||||
name: "TreeSitterDjangoTests",
|
||||
dependencies: [
|
||||
.product(name: "SwiftTreeSitter", package: "swift-tree-sitter"),
|
||||
"TreeSitterDjango",
|
||||
],
|
||||
path: "bindings/swift/TreeSitterDjangoTests"
|
||||
)
|
||||
],
|
||||
cLanguageStandard: .c11
|
||||
)
|
||||
Reference in new issue
Block a user