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 8, 2024
1 parent 8f58696 commit 18a1d18
Show file tree
Hide file tree
Showing 45 changed files with 3,381 additions and 1,826 deletions.
44 changes: 39 additions & 5 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +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
indent_size = 2

[*.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
insert_final_newline = true
trim_trailing_whitespace = true
indent_size = 4

[grammar.js]
quote_type = single
[*.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: 8 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ jobs:
name: Test parser
runs-on: ubuntu-latest
steps:
- name: Set up repository
uses: tree-sitter/[email protected]
with:
node-version: ${{vars.NODE_VERSION}}
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up tree-sitter
uses: tree-sitter/setup-action/cli@v1
- name: Clone systemd rules
uses: actions/checkout@v4
with:
Expand All @@ -42,9 +42,11 @@ jobs:
path: examples/udev-extra-rules
repository: openSUSE/udev-extra-rules
- name: Run tests
uses: tree-sitter/[email protected]
uses: tree-sitter/parser-test-action@v2
- name: Parse sample files
uses: tree-sitter/parse-action@v4
with:
corpus-files: |-
files: |-
examples/systemd/rules.d/*.rules
examples/systemd/test/fuzz/fuzz-udev-rules/*.rules
examples/udev-extra-rules/*.rules
11 changes: 11 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: Publish package

on:
push:
tags: ["*"]

jobs:
release:
uses: tree-sitter/workflows/.github/workflows/release.yml@main
permissions:
contents: write
40 changes: 36 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +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.

27 changes: 14 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 18a1d18

Please sign in to comment.