-
Notifications
You must be signed in to change notification settings - Fork 107
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #113 from lukepistrol/feature/spm
Swift Package Manager
- Loading branch information
Showing
3 changed files
with
53 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,3 +15,4 @@ test.java | |
*.o | ||
bindings/c/*.h | ||
bindings/c/tree-sitter-*.pc | ||
.build/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
// swift-tools-version:5.3 | ||
import PackageDescription | ||
|
||
let package = Package( | ||
name: "TreeSitterJava", | ||
products: [ | ||
.library(name: "TreeSitterJava", targets: ["TreeSitterJava"]), | ||
], | ||
dependencies: [], | ||
targets: [ | ||
.target(name: "TreeSitterJava", | ||
path: ".", | ||
exclude: [ | ||
"binding.gyp", | ||
"bindings", | ||
"Cargo.toml", | ||
"corpus", | ||
"grammar.js", | ||
"LICENSE", | ||
"Makefile", | ||
"package.json", | ||
"README.md", | ||
"script", | ||
"src/grammar.json", | ||
"src/node-types.json", | ||
], | ||
sources: [ | ||
"src/parser.c", | ||
], | ||
resources: [ | ||
.copy("queries") | ||
], | ||
publicHeadersPath: "bindings/swift", | ||
cSettings: [.headerSearchPath("src")]) | ||
] | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#ifndef TREE_SITTER_JAVA_H_ | ||
#define TREE_SITTER_JAVA_H_ | ||
|
||
typedef struct TSLanguage TSLanguage; | ||
|
||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif | ||
|
||
extern TSLanguage *tree_sitter_java(); | ||
|
||
#ifdef __cplusplus | ||
} | ||
#endif | ||
|
||
#endif // TREE_SITTER_JAVA_H_ |