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 23, 2024
1 parent 592476d commit 908ba6a
Show file tree
Hide file tree
Showing 46 changed files with 2,299 additions and 1,606 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
27 changes: 27 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
version: 2
updates:
- package-ecosystem: github-actions
directory: /
schedule:
interval: weekly
day: sunday
commit-message:
prefix: ci
labels:
- dependencies
groups:
actions:
patterns: ["*"]

- package-ecosystem: gitsubmodule
directory: /
schedule:
interval: weekly
day: sunday
commit-message:
prefix: test(deps)
labels:
- dependencies
groups:
actions:
patterns: ["*"]
16 changes: 10 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,14 @@ on:
paths:
- grammar.js
- src/**
- test/**
- bindings/**
- binding.gyp
pull_request:
paths:
- grammar.js
- src/**
- test/**
- bindings/**
- binding.gyp

Expand All @@ -28,13 +30,15 @@ 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
with:
submodules: true
node-version: ${{vars.NODE_VERSION}}
- name: Set up tree-sitter
uses: tree-sitter/setup-action/cli@v2
- name: Run tests
uses: tree-sitter/[email protected]
uses: tree-sitter/parser-test-action@v2
- name: Parse examples
uses: tree-sitter/parse-action@v4
with:
test-library: ${{runner.os == 'Linux'}}
corpus-files: examples/NeverSink-Filter/**/*.filter
files: examples/NeverSink-Filter/**/*.filter
19 changes: 19 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Release

on:
push:
tags: ["*"]

concurrency:
group: ${{github.workflow}}-${{github.ref}}
cancel-in-progress: true

jobs:
github:
uses: tree-sitter/workflows/.github/workflows/release.yml@main
with:
attestations: true
permissions:
contents: write
id-token: write
attestations: 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.

Loading

0 comments on commit 908ba6a

Please sign in to comment.