Skip to content

Commit 5da59ad

Browse files
feat: update bindings
1 parent 9dca2b6 commit 5da59ad

File tree

19 files changed

+405
-111
lines changed

19 files changed

+405
-111
lines changed

.gitattributes

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*/src/tree_sitter/* linguist-generated
99

1010
# C bindings
11-
*/bindings/c/* linguist-generated
11+
*/bindings/c/** linguist-generated
1212

1313
# Rust bindings
1414
bindings/rust/build.rs linguist-generated
@@ -35,3 +35,7 @@ go.sum linguist-generated
3535
*/bindings/swift/** linguist-generated
3636
Package.swift linguist-generated
3737
Package.resolved linguist-generated
38+
39+
# Zig bindings
40+
build.zig linguist-generated
41+
build.zig.zon linguist-generated

.gitignore

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,15 @@
11
# Rust artifacts
2-
Cargo.lock
32
target/
43

54
# Node artifacts
65
build/
76
prebuilds/
87
node_modules/
9-
*.tgz
108

119
# Swift artifacts
1210
.build/
1311

1412
# Go artifacts
15-
go.sum
1613
_obj/
1714

1815
# Python artifacts
@@ -28,6 +25,13 @@ dist/
2825
*.dylib
2926
*.dll
3027
*.pc
28+
*.exp
29+
*.lib
30+
31+
# Zig artifacts
32+
.zig-cache/
33+
zig-cache/
34+
zig-out/
3135

3236
# Example dirs
3337
/examples/*/
@@ -37,7 +41,13 @@ dist/
3741
*.obj
3842
*.o
3943

44+
# Archives
45+
*.tar.gz
46+
*.tgz
47+
*.zip
48+
4049
# Moved bindings
41-
bindings/c/
42-
bindings/swift/TreeSitterMarkdown/
43-
bindings/swift/TreeSitterMarkdownInline/
50+
/bindings/c/
51+
/bindings/go/binding.go
52+
/bindings/swift/TreeSitterMarkdown/
53+
/bindings/swift/TreeSitterMarkdownInline/

CMakeLists.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,9 @@ macro(add_parser name)
5252
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/bindings/c/tree-sitter-${name}.pc.in"
5353
"${CMAKE_CURRENT_BINARY_DIR}/tree-sitter-${name}.pc" @ONLY)
5454

55-
install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/bindings/c/tree-sitter-${name}.h"
56-
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/tree_sitter")
55+
install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/bindings/c/tree_sitter"
56+
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}"
57+
FILES_MATCHING PATTERN "*.h")
5758
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/tree-sitter-${name}.pc"
5859
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/pkgconfig")
5960
install(TARGETS tree-sitter-${name}

Cargo.lock

Lines changed: 199 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,13 @@ path = "bindings/rust/lib.rs"
3232

3333
[dependencies]
3434
tree-sitter-language = "0.1"
35-
tree-sitter = { version = "0.24", optional = true }
35+
tree-sitter = { version = "0.25", optional = true }
3636

3737
[dev-dependencies]
38-
tree-sitter = "0.24.3"
38+
tree-sitter = "0.25.3"
3939

4040
[build-dependencies]
41-
cc = "1.1.22"
41+
cc = "1.2"
4242

4343
[[bin]]
4444
name = "benchmark"

Package.resolved

Lines changed: 12 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Package.swift

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

bindings/node/index.js

Lines changed: 7 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

bindings/python/tree_sitter_markdown/binding.c

Lines changed: 11 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

common/common.mak

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,11 @@ $(LANGUAGE_NAME).pc: bindings/c/$(LANGUAGE_NAME).pc.in
6666
-e 's|@CMAKE_INSTALL_PREFIX@|$(PREFIX)|' \
6767
-e 's|@TS_REQUIRES@|$(REQUIRES)|' $< > $@
6868

69-
$(PARSER): $(SRC_DIR)/grammar.js
69+
$(PARSER): $(SRC_DIR)/grammar.json
7070
$(TS) generate $^
7171

7272
install: all
73-
install -Dm644 bindings/c/$(LANGUAGE_NAME).h '$(DESTDIR)$(INCLUDEDIR)'/tree_sitter/$(LANGUAGE_NAME).h
73+
install -Dm644 bindings/c/tree_sitter/$(LANGUAGE_NAME).h '$(DESTDIR)$(INCLUDEDIR)'/tree_sitter/$(LANGUAGE_NAME).h
7474
install -Dm644 $(LANGUAGE_NAME).pc '$(DESTDIR)$(PCLIBDIR)'/$(LANGUAGE_NAME).pc
7575
install -Dm755 lib$(LANGUAGE_NAME).a '$(DESTDIR)$(LIBDIR)'/lib$(LANGUAGE_NAME).a
7676
install -m755 lib$(LANGUAGE_NAME).$(SOEXT) '$(DESTDIR)$(LIBDIR)'/lib$(LANGUAGE_NAME).$(SOEXTVER)

0 commit comments

Comments
 (0)