Skip to content

Commit

Permalink
feat: update to tree-sitter 0.23
Browse files Browse the repository at this point in the history
Co-authored-by: ObserverOfTime <[email protected]>
Co-authored-by: Amaan Qureshi <[email protected]>
  • Loading branch information
3 people authored Sep 9, 2024
1 parent a24dab1 commit 99fc677
Show file tree
Hide file tree
Showing 31 changed files with 879 additions and 595 deletions.
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

src/*.json linguist-generated
src/parser.c linguist-generated
Expand Down
21 changes: 14 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,18 @@ jobs:
matrix:
os: [ubuntu-latest, windows-latest, macos-14]
steps:
- name: Set up repository
uses: tree-sitter/[email protected]
- name: Checkout repository
uses: actions/checkout@v4
- name: Install tree-sitter CLI
uses: tree-sitter/setup-action/cli@v1
- name: Run tests
uses: tree-sitter/parser-test-action@v2
with:
node-version: ${{vars.NODE_VERSION}}
test-rust: ${{runner.os == 'Linux'}}
test-node: true
test-python: true
test-go: true
test-swift: ${{runner.os == 'macOS'}}
- name: Clone apisix corpus
uses: actions/checkout@v4
with:
Expand Down Expand Up @@ -73,11 +81,10 @@ jobs:
with:
path: examples/xmake
repository: xmake-io/xmake
- name: Run tests
uses: tree-sitter/parser-test-action@v1.2
- name: Parse examples
uses: tree-sitter/parse-action@v4
with:
test-library: ${{runner.os == 'Linux'}}
corpus-files: |-
files: |-
examples/apisix/**/*.lua
examples/kong/**/*.lua
examples/lua/**/*.lua
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,7 @@ jobs:
uses: tree-sitter/workflows/.github/workflows/package-crates.yml@main
secrets:
CARGO_REGISTRY_TOKEN: ${{secrets.CARGO_TOKEN}}
pypi:
uses: tree-sitter/workflows/.github/workflows/package-pypi.yml@main
secrets:
PYPI_API_TOKEN: ${{secrets.PYPI_TOKEN}}
5 changes: 2 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
# Rust artifacts
Cargo.lock
target/

# Node artifacts
build/
prebuilds/
node_modules/
*.tgz

# Swift artifacts
.build/
Package.resolved

# Go artifacts
go.sum
_obj/

# Python artifacts
Expand All @@ -32,7 +32,6 @@ dist/
/examples/*/

# Grammar volatiles
dsl.d.ts
*.wasm
*.obj
*.o
89 changes: 89 additions & 0 deletions Cargo.lock

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

9 changes: 6 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "tree-sitter-lua"
description = "Lua grammar for tree-sitter"
version = "0.1.0"
version = "0.2.0"
license = "MIT"
readme = "README.md"
keywords = ["incremental", "parsing", "tree-sitter", "lua"]
Expand All @@ -18,7 +18,10 @@ include = ["bindings/rust/*", "grammar.js", "queries/*", "src/*"]
path = "bindings/rust/lib.rs"

[dependencies]
tree-sitter = ">=0.21.0"
tree-sitter-language = "0.1.0"

[build-dependencies]
cc = "^1.0.89"
cc = "1.1.18"

[dev-dependencies]
tree-sitter = "0.23"
49 changes: 27 additions & 22 deletions Makefile

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

Loading

0 comments on commit 99fc677

Please sign in to comment.