SPM support
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -8,3 +8,4 @@ npm-debug.log
|
|||||||
log.html
|
log.html
|
||||||
.env
|
.env
|
||||||
.DS_Store
|
.DS_Store
|
||||||
|
/.build
|
||||||
|
|||||||
39
Package.swift
Normal file
39
Package.swift
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
// swift-tools-version:5.3
|
||||||
|
|
||||||
|
import PackageDescription
|
||||||
|
|
||||||
|
let package = Package(
|
||||||
|
name: "TreeSitterHCL",
|
||||||
|
platforms: [.macOS(.v10_13), .iOS(.v11)],
|
||||||
|
products: [
|
||||||
|
.library(name: "TreeSitterHCL", targets: ["TreeSitterHCL"]),
|
||||||
|
],
|
||||||
|
dependencies: [],
|
||||||
|
targets: [
|
||||||
|
.target(name: "TreeSitterHCL",
|
||||||
|
path: ".",
|
||||||
|
exclude: [
|
||||||
|
"binding.gyp",
|
||||||
|
"bindings",
|
||||||
|
"Cargo.toml",
|
||||||
|
"CHANGELOG.md",
|
||||||
|
"docs",
|
||||||
|
"example",
|
||||||
|
"grammar.js",
|
||||||
|
"LICENSE",
|
||||||
|
"package.json",
|
||||||
|
"README.md",
|
||||||
|
"shell.nix",
|
||||||
|
"src/grammar.json",
|
||||||
|
"src/node-types.json",
|
||||||
|
"test",
|
||||||
|
],
|
||||||
|
sources: [
|
||||||
|
"src/parser.c",
|
||||||
|
"src/scanner.cc",
|
||||||
|
],
|
||||||
|
publicHeadersPath: "bindings/swift",
|
||||||
|
cSettings: [.headerSearchPath("src")],
|
||||||
|
linkerSettings: [.linkedLibrary("c++")])
|
||||||
|
]
|
||||||
|
)
|
||||||
16
bindings/swift/TreeSitterHCL/hcl.h
Normal file
16
bindings/swift/TreeSitterHCL/hcl.h
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
#ifndef TREE_SITTER_HCL_H_
|
||||||
|
#define TREE_SITTER_HCL_H_
|
||||||
|
|
||||||
|
typedef struct TSLanguage TSLanguage;
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
extern TSLanguage *tree_sitter_hcl();
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif // TREE_SITTER_HCL_H_
|
||||||
Reference in New Issue
Block a user