Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update bindings #98

Merged
merged 6 commits into from
Jul 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@ root = true

[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

[*.{json,toml,yml,gyp}]
indent_style = space
Expand All @@ -14,11 +11,11 @@ indent_size = 2
indent_style = space
indent_size = 2

[*.rs]
[*.{c,cc,h}]
indent_style = space
indent_size = 4

[*.{c,cc,h}]
[*.rs]
indent_style = space
indent_size = 4

Expand All @@ -37,3 +34,6 @@ indent_size = 8
[Makefile]
indent_style = tab
indent_size = 8

[parser.c]
indent_size = 2
2 changes: 1 addition & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
* text eol=lf
* text=auto eol=lf

grammars/ocaml/src/*.json linguist-generated
grammars/ocaml/src/parser.c linguist-generated
Expand Down
20 changes: 20 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,26 @@ jobs:
- name: Test
run: npm run test-binding

test-python:
name: Test Python binding
runs-on: ${{matrix.os}}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
cache: pip
python-version: 3.12
cache-dependency-path: pyproject.toml
- name: Build
run: pip install -e .[core]
- name: Test
run: python -munittest discover -v -s bindings/python/tests

test-rust:
name: Test Rust binding
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ _obj/
# Python artifacts
.venv/
dist/
*.pyc
*.egg-info
*.whl

Expand Down
4 changes: 2 additions & 2 deletions Package.swift

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 12 additions & 3 deletions binding.gyp

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion bindings/node/binding.cc

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

36 changes: 36 additions & 0 deletions bindings/python/tests/test_binding.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

49 changes: 47 additions & 2 deletions bindings/python/tree_sitter_ocaml/__init__.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions bindings/python/tree_sitter_ocaml/__init__.pyi

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions bindings/python/tree_sitter_ocaml/binding.c

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions bindings/rust/build.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions grammars/interface/src/grammar.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading