Skip to content

Commit

Permalink
Merge pull request #113 from lukepistrol/feature/spm
Browse files Browse the repository at this point in the history
Swift Package Manager
  • Loading branch information
aryx authored May 30, 2022
2 parents 30962d1 + 13e1bf9 commit ac14b4b
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@ test.java
*.o
bindings/c/*.h
bindings/c/tree-sitter-*.pc
.build/
36 changes: 36 additions & 0 deletions Package.swift
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")])
]
)
16 changes: 16 additions & 0 deletions bindings/swift/TreeSitterJava/java.h
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_

0 comments on commit ac14b4b

Please sign in to comment.