Skip to content

Commit 017696b

Browse files
feat: update to tree-sitter 0.24
1 parent 415ebc8 commit 017696b

33 files changed

+552
-265
lines changed

.editorconfig

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@ root = true
22

33
[*]
44
charset = utf-8
5-
end_of_line = lf
6-
insert_final_newline = true
7-
trim_trailing_whitespace = true
85

96
[*.{json,toml,yml,gyp}]
107
indent_style = space
@@ -14,11 +11,15 @@ indent_size = 2
1411
indent_style = space
1512
indent_size = 2
1613

17-
[*.rs]
14+
[*.scm]
15+
indent_style = space
16+
indent_size = 2
17+
18+
[*.{c,cc,h}]
1819
indent_style = space
1920
indent_size = 4
2021

21-
[*.{c,cc,h,ino}]
22+
[*.rs]
2223
indent_style = space
2324
indent_size = 4
2425

@@ -37,3 +38,9 @@ indent_size = 8
3738
[Makefile]
3839
indent_style = tab
3940
indent_size = 8
41+
42+
[parser.c]
43+
indent_size = 2
44+
45+
[{alloc,array,parser}.h]
46+
indent_size = 2

.gitattributes

Lines changed: 29 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,37 @@
1-
* text eol=lf
1+
* text=auto eol=lf
22

3+
# Generated source files
34
src/*.json linguist-generated
45
src/parser.c linguist-generated
56
src/tree_sitter/* linguist-generated
67

7-
bindings/** linguist-generated
8+
# C bindings
9+
bindings/c/* linguist-generated
10+
CMakeLists.txt linguist-generated
11+
Makefile linguist-generated
12+
13+
# Rust bindings
14+
bindings/rust/* linguist-generated
15+
Cargo.toml linguist-generated
16+
Cargo.lock linguist-generated
17+
18+
# Node.js bindings
19+
bindings/node/* linguist-generated
820
binding.gyp linguist-generated
21+
package.json linguist-generated
22+
package-lock.json linguist-generated
23+
24+
# Python bindings
25+
bindings/python/** linguist-generated
926
setup.py linguist-generated
10-
Makefile linguist-generated
27+
pyproject.toml linguist-generated
28+
29+
# Go bindings
30+
bindings/go/* linguist-generated
31+
go.mod linguist-generated
32+
go.sum linguist-generated
33+
34+
# Swift bindings
35+
bindings/swift/** linguist-generated
1136
Package.swift linguist-generated
37+
Package.resolved linguist-generated

.github/workflows/ci.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,18 @@ jobs:
3535
with:
3636
submodules: true
3737
- name: Set up tree-sitter
38-
uses: tree-sitter/setup-action/cli@v1
38+
uses: tree-sitter/setup-action/cli@v2
39+
- name: Set up Node.js
40+
uses: actions/setup-node@v4
41+
with:
42+
node-version: ${{vars.NODE_VERSION}}
43+
- name: Install dependencies
44+
run: npm ci
3945
- name: Run tests
4046
uses: tree-sitter/parser-test-action@v2
4147
with:
48+
test-node: true
49+
node-version: ${{vars.NODE_VERSION}}
4250
test-rust: ${{runner.os == 'Linux'}}
4351
- name: Parse examples
4452
uses: tree-sitter/parse-action@v4

.github/workflows/publish.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,14 @@ concurrency:
99
cancel-in-progress: true
1010

1111
jobs:
12+
github:
13+
uses: tree-sitter/workflows/.github/workflows/release.yml@main
14+
with:
15+
attestations: true
16+
permissions:
17+
contents: write
18+
id-token: write
19+
attestations: write
1220
npm:
1321
uses: tree-sitter/workflows/.github/workflows/package-npm.yml@main
1422
secrets:

.gitignore

Lines changed: 8 additions & 3 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
@@ -29,7 +26,15 @@ dist/
2926
*.dll
3027
*.pc
3128

29+
# Example dirs
30+
/examples/*/
31+
3232
# Grammar volatiles
3333
*.wasm
3434
*.obj
3535
*.o
36+
37+
# Archives
38+
*.tar.gz
39+
*.tgz
40+
*.zip

CMakeLists.txt

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

Cargo.lock

Lines changed: 96 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: 8 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)