Skip to content

Commit 99fc677

Browse files
hendrikvanantwerpenObserverOfTimeamaanq
authored
feat: update to tree-sitter 0.23
Co-authored-by: ObserverOfTime <[email protected]> Co-authored-by: Amaan Qureshi <[email protected]>
1 parent a24dab1 commit 99fc677

31 files changed

+879
-595
lines changed

.editorconfig

Lines changed: 5 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,11 @@ indent_size = 2
1411
indent_style = space
1512
indent_size = 2
1613

17-
[*.rs]
14+
[*.{c,cc,h}]
1815
indent_style = space
1916
indent_size = 4
2017

21-
[*.{c,cc,h}]
18+
[*.rs]
2219
indent_style = space
2320
indent_size = 4
2421

@@ -37,3 +34,6 @@ indent_size = 8
3734
[Makefile]
3835
indent_style = tab
3936
indent_size = 8
37+
38+
[parser.c]
39+
indent_size = 2

.gitattributes

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
* text eol=lf
1+
* text=auto eol=lf
22

33
src/*.json linguist-generated
44
src/parser.c linguist-generated

.github/workflows/ci.yml

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,18 @@ jobs:
3030
matrix:
3131
os: [ubuntu-latest, windows-latest, macos-14]
3232
steps:
33-
- name: Set up repository
34-
uses: tree-sitter/[email protected]
33+
- name: Checkout repository
34+
uses: actions/checkout@v4
35+
- name: Install tree-sitter CLI
36+
uses: tree-sitter/setup-action/cli@v1
37+
- name: Run tests
38+
uses: tree-sitter/parser-test-action@v2
3539
with:
36-
node-version: ${{vars.NODE_VERSION}}
40+
test-rust: ${{runner.os == 'Linux'}}
41+
test-node: true
42+
test-python: true
43+
test-go: true
44+
test-swift: ${{runner.os == 'macOS'}}
3745
- name: Clone apisix corpus
3846
uses: actions/checkout@v4
3947
with:
@@ -73,11 +81,10 @@ jobs:
7381
with:
7482
path: examples/xmake
7583
repository: xmake-io/xmake
76-
- name: Run tests
77-
uses: tree-sitter/parser-test-action@v1.2
84+
- name: Parse examples
85+
uses: tree-sitter/parse-action@v4
7886
with:
79-
test-library: ${{runner.os == 'Linux'}}
80-
corpus-files: |-
87+
files: |-
8188
examples/apisix/**/*.lua
8289
examples/kong/**/*.lua
8390
examples/lua/**/*.lua

.github/workflows/publish.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,7 @@ jobs:
1515
uses: tree-sitter/workflows/.github/workflows/package-crates.yml@main
1616
secrets:
1717
CARGO_REGISTRY_TOKEN: ${{secrets.CARGO_TOKEN}}
18+
pypi:
19+
uses: tree-sitter/workflows/.github/workflows/package-pypi.yml@main
20+
secrets:
21+
PYPI_API_TOKEN: ${{secrets.PYPI_TOKEN}}

.gitignore

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

54
# Node artifacts
65
build/
6+
prebuilds/
77
node_modules/
88
*.tgz
99

1010
# Swift artifacts
1111
.build/
12+
Package.resolved
1213

1314
# Go artifacts
14-
go.sum
1515
_obj/
1616

1717
# Python artifacts
@@ -32,7 +32,6 @@ dist/
3232
/examples/*/
3333

3434
# Grammar volatiles
35-
dsl.d.ts
3635
*.wasm
3736
*.obj
3837
*.o

Cargo.lock

Lines changed: 89 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: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "tree-sitter-lua"
33
description = "Lua grammar for tree-sitter"
4-
version = "0.1.0"
4+
version = "0.2.0"
55
license = "MIT"
66
readme = "README.md"
77
keywords = ["incremental", "parsing", "tree-sitter", "lua"]
@@ -18,7 +18,10 @@ include = ["bindings/rust/*", "grammar.js", "queries/*", "src/*"]
1818
path = "bindings/rust/lib.rs"
1919

2020
[dependencies]
21-
tree-sitter = ">=0.21.0"
21+
tree-sitter-language = "0.1.0"
2222

2323
[build-dependencies]
24-
cc = "^1.0.89"
24+
cc = "1.1.18"
25+
26+
[dev-dependencies]
27+
tree-sitter = "0.23"

Makefile

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

0 commit comments

Comments
 (0)