Skip to content

Commit

Permalink
feat: update to tree-sitter 0.24
Browse files Browse the repository at this point in the history
  • Loading branch information
ObserverOfTime committed Nov 5, 2024
1 parent 0e0acea commit 60d50a2
Show file tree
Hide file tree
Showing 37 changed files with 1,255 additions and 138 deletions.
42 changes: 36 additions & 6 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,45 @@ root = true

[*]
charset = utf-8
end_of_line = lf

[*.{json,toml,yml,gyp}]
indent_style = space
indent_size = 2

[*.js]
indent_style = space
max_line_length = 120
insert_final_newline = true
trim_trailing_whitespace = true
indent_size = 2

[grammar.js]
quote_type = single
[*.scm]
indent_style = space
indent_size = 2

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

[*.rs]
indent_style = space
indent_size = 4

[*.{py,pyi}]
indent_style = space
indent_size = 4

[*.swift]
indent_style = space
indent_size = 4

[*.go]
indent_style = tab
indent_size = 8

[Makefile]
indent_style = tab
indent_size = 8

[parser.c]
indent_size = 2

[{alloc,array,parser}.h]
indent_size = 2
39 changes: 35 additions & 4 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,6 +1,37 @@
* text eol=lf
* text=auto eol=lf

src/** linguist-generated
bindings/** linguist-generated
binding.gyp linguist-generated
# Generated source files
src/*.json linguist-generated
src/parser.c linguist-generated
src/tree_sitter/* linguist-generated

# C bindings
bindings/c/* linguist-generated
CMakeLists.txt linguist-generated
Makefile linguist-generated

# Rust bindings
bindings/rust/* linguist-generated
Cargo.toml linguist-generated
Cargo.lock linguist-generated

# Node.js bindings
bindings/node/* linguist-generated
binding.gyp linguist-generated
package.json linguist-generated
package-lock.json linguist-generated

# Python bindings
bindings/python/** linguist-generated
setup.py linguist-generated
pyproject.toml linguist-generated

# Go bindings
bindings/go/* linguist-generated
go.mod linguist-generated
go.sum linguist-generated

# Swift bindings
bindings/swift/** linguist-generated
Package.swift linguist-generated
Package.resolved linguist-generated
14 changes: 6 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,9 @@ jobs:
matrix:
os: [ubuntu-latest, windows-latest, macos-14]
steps:
- name: Set up repository
uses: tree-sitter-grammars/actions/setup@main
with:
node-version: ${{vars.NODE_VERSION}}
- name: Run tests
uses: tree-sitter-grammars/actions/test@main
with:
test-library: ${{runner.os == 'Linux'}}
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up tree-sitter
uses: tree-sitter/setup-action/cli@v1
- name: Run parser and binding tests
uses: tree-sitter/parser-test-action@v2
10 changes: 8 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,17 @@ on:
tags: ["*"]

jobs:
release:
uses: tree-sitter/workflows/.github/workflows/release.yml@main
permissions:
contents: write
id-token: write
attestations: write
npm:
uses: tree-sitter-grammars/.github/.github/workflows/package-npm.yml@main
uses: tree-sitter/workflows/.github/workflows/package-npm.yml@main
secrets:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
crates:
uses: tree-sitter-grammars/.github/.github/workflows/package-crates.yml@main
uses: tree-sitter/workflows/.github/workflows/package-crates.yml@main
secrets:
CARGO_REGISTRY_TOKEN: ${{secrets.CARGO_TOKEN}}
41 changes: 37 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,40 @@
node_modules/
yarn.lock
Cargo.lock
# Rust artifacts
target/

# Node artifacts
build/
target/
prebuilds/
node_modules/

# Swift artifacts
.build/

# Go artifacts
_obj/

# Python artifacts
.venv/
dist/
*.egg-info
*.whl

# C artifacts
*.a
*.so
*.so.*
*.dylib
*.dll
*.pc

# Example dirs
/examples/*/

# Grammar volatiles
*.wasm
*.obj
*.o

# Archives
*.tar.gz
*.tgz
*.zip
58 changes: 58 additions & 0 deletions CMakeLists.txt

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

96 changes: 96 additions & 0 deletions Cargo.lock

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

30 changes: 17 additions & 13 deletions Cargo.toml

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

Loading

0 comments on commit 60d50a2

Please sign in to comment.