Merge pull request #29 from mattmassicotte/feature/spm

SPM support
This commit is contained in:
Camden Cheek 2022-12-03 14:21:21 -07:00 committed by GitHub
commit 09e316dba3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 55 additions and 1 deletions

38
Package.swift Normal file
View file

@ -0,0 +1,38 @@
// swift-tools-version:5.3
import PackageDescription
let package = Package(
name: "TreeSitterDockerfile",
platforms: [.macOS(.v10_13), .iOS(.v11)],
products: [
.library(name: "TreeSitterDockerfile", targets: ["TreeSitterDockerfile"]),
],
dependencies: [],
targets: [
.target(name: "TreeSitterDockerfile",
path: ".",
exclude: [
"binding.gyp",
"bindings",
"Cargo.toml",
"corpus",
"examples",
"grammar.js",
"LICENSE",
"Makefile",
"package.json",
"README.md",
"src/grammar.json",
"src/node-types.json",
],
sources: [
"src/parser.c",
],
resources: [
.copy("queries")
],
publicHeadersPath: "bindings/swift",
cSettings: [.headerSearchPath("src")])
]
)

View file

@ -0,0 +1,16 @@
#ifndef TREE_SITTER_DOCKERFILE_H_
#define TREE_SITTER_DOCKERFILE_H_
typedef struct TSLanguage TSLanguage;
#ifdef __cplusplus
extern "C" {
#endif
extern TSLanguage *tree_sitter_dockerfile();
#ifdef __cplusplus
}
#endif
#endif // TREE_SITTER_DOCKERFILE_H_