-
Notifications
You must be signed in to change notification settings - Fork 24
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 #76 from nhubbard/master
Add Swift Package Manager support
- Loading branch information
Showing
3 changed files
with
55 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 |
---|---|---|
|
@@ -243,3 +243,6 @@ Cargo.lock | |
build/ | ||
/bindings/c/*.h | ||
/bindings/c/tree-sitter-*.pc | ||
|
||
# Swift Package Manager | ||
.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: "TreeSitterLatex", | ||
products: [ | ||
.library(name: "TreeSitterLatex", targets: ["TreeSitterLatex"]), | ||
], | ||
dependencies: [], | ||
targets: [ | ||
.target(name: "TreeSitterLatex", | ||
path: ".", | ||
exclude: [ | ||
"binding.gyp", | ||
"bindings", | ||
"benches", | ||
".github", | ||
"examples", | ||
"Cargo.toml", | ||
"test", | ||
"grammar.js", | ||
"LICENSE", | ||
"Makefile", | ||
"package.json", | ||
"README.md", | ||
"src/grammar.json", | ||
"src/node-types.json", | ||
], | ||
sources: [ | ||
"src/parser.c", | ||
"src/scanner.c", | ||
], | ||
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_LATEX_H_ | ||
#define TREE_SITTER_LATEX_H_ | ||
|
||
typedef struct TSLanguage TSLanguage; | ||
|
||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif | ||
|
||
extern TSLanguage *tree_sitter_latex(); | ||
|
||
#ifdef __cplusplus | ||
} | ||
#endif | ||
|
||
#endif // TREE_SITTER_LATEX_H_ |