Skip to content

Commit 28378e7

Browse files
committed
build: update bindings
1 parent dd7fe4d commit 28378e7

38 files changed

+425416
-424939
lines changed

.editorconfig

+5-5
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

+11-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,11 @@
1-
/src/** linguist-vendored
2-
/examples/* linguist-vendored
1+
* text=auto eol=lf
2+
3+
src/*.json linguist-generated
4+
src/parser.c linguist-generated
5+
src/tree_sitter/* linguist-generated
6+
7+
bindings/** linguist-generated
8+
binding.gyp linguist-generated
9+
setup.py linguist-generated
10+
Makefile linguist-generated
11+
Package.swift linguist-generated

.github/workflows/ci.yml

+2-3
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,6 @@ jobs:
7777
shell: bash
7878
run: |
7979
npm install
80-
npm run build
8180
npm test
8281
8382
- name: Check fidelity of checked-in C code
@@ -112,11 +111,11 @@ jobs:
112111
id: verify-changed-files
113112
with:
114113
files: |
115-
queries/scala/*.scm
114+
queries/*.scm
116115
117116
- name: Test quries if out of sync with nvim-treesitter
118117
if: steps.verify-changed-files.outputs.files_changed == 'true'
119118
run: |
120119
echo "::warning Queries in ${{ steps.verify-changed-files.outputs.changed_files }} in this repo are out of sync with nvim-treesitter"
121-
git diff queries/scala/
120+
git diff queries/
122121
npm run test

.github/workflows/fuzz.yml

+10-14
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,21 @@
1-
name: Fuzz parser
1+
name: Fuzz Parser
22

3-
# Run this workflow on changes to the external scanner
43
on:
5-
workflow_dispatch:
64
push:
5+
branches: [master]
76
paths:
8-
- src/scanner.c
9-
- src/stack.h
7+
- src/scanner.c
108
pull_request:
119
paths:
12-
- src/scanner.c
13-
- src/stack.h
10+
- src/scanner.c
1411

1512
jobs:
16-
test:
17-
name: Parser fuzzing
13+
fuzz:
1814
runs-on: ubuntu-latest
1915
steps:
20-
- uses: actions/checkout@v4
21-
- uses: vigoux/tree-sitter-fuzz-action@v1
16+
- name: Checkout repository
17+
uses: actions/checkout@v4
18+
- name: Run fuzzer
19+
uses: tree-sitter/fuzz-action@v4
2220
with:
23-
language: scala
24-
external-scanner: src/scanner.c
25-
time: 60
21+
tree-sitter-version: v0.22.2

.github/workflows/publish.yml

+10-13
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Publish package
1+
name: Publish packages
22

33
on:
44
push:
@@ -10,17 +10,14 @@ concurrency:
1010

1111
jobs:
1212
npm:
13-
uses: tree-sitter/workflows/.github/workflows/package-npm.yml@66df2de139d7a77a89644f67a88c803d4a8cf67e
13+
uses: tree-sitter/workflows/.github/workflows/package-npm.yml@main
1414
secrets:
1515
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
16-
# TODO: comment this out for now since we publish the crate manually
17-
# crates:
18-
# uses: tree-sitter/workflows/.github/workflows/package-crates.yml@main
19-
# secrets:
20-
# CARGO_REGISTRY_TOKEN: ${{secrets.CARGO_REGISTRY_TOKEN}}
21-
22-
# TODO: uncomment when it works
23-
# pypi:
24-
# uses: tree-sitter/workflows/.github/workflows/package-pypi.yml@main
25-
# secrets:
26-
# PYPI_API_TOKEN: ${{secrets.PYPI_API_TOKEN}}
16+
crates:
17+
uses: tree-sitter/workflows/.github/workflows/package-crates.yml@main
18+
secrets:
19+
CARGO_REGISTRY_TOKEN: ${{secrets.CARGO_REGISTRY_TOKEN}}
20+
pypi:
21+
uses: tree-sitter/workflows/.github/workflows/package-pypi.yml@main
22+
secrets:
23+
PYPI_API_TOKEN: ${{secrets.PYPI_API_TOKEN}}

.gitignore

+37-15
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,37 @@
1-
node_modules
2-
build
3-
/.build
4-
target
5-
*.log
6-
test.scala
7-
Cargo.lock
8-
.scalafmt.conf
9-
*worksheet.sc
10-
*.out
11-
.direnv
12-
.metals
13-
report-*
14-
./scala
15-
./dotty
1+
# Rust artifacts
2+
target/
3+
4+
# Node artifacts
5+
build/
6+
prebuilds/
7+
node_modules/
8+
*.tgz
9+
10+
# Swift artifacts
11+
.build/
12+
Package.resolved
13+
14+
# Go artifacts
15+
_obj/
16+
17+
# Python artifacts
18+
.venv/
19+
dist/
20+
*.egg-info
21+
*.whl
22+
23+
# C artifacts
24+
*.a
25+
*.so
26+
*.so.*
27+
*.dylib
28+
*.dll
29+
*.pc
30+
31+
# Example dirs
32+
/examples/*/
33+
34+
# Grammar volatiles
35+
*.wasm
36+
*.obj
37+
*.o

.npmignore

-3
This file was deleted.

Cargo.lock

+89
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+10-11
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,25 @@
11
[package]
22
name = "tree-sitter-scala"
3-
description = "scala grammar for the tree-sitter parsing library"
3+
description = "Scala grammar for tree-sitter"
44
version = "0.22.1"
5-
keywords = ["incremental", "parsing", "scala"]
5+
license = "MIT"
6+
keywords = ["incremental", "parsing", "tree-sitter", "scala"]
67
categories = ["parsing", "text-editors"]
78
repository = "https://github.com/tree-sitter/tree-sitter-scala"
89
edition = "2021"
9-
license = "MIT"
10+
autoexamples = false
1011

1112
build = "bindings/rust/build.rs"
12-
include = [
13-
"bindings/rust/*",
14-
"grammar.js",
15-
"queries/*",
16-
"src/*",
17-
]
13+
include = ["bindings/rust/*", "grammar.js", "queries/*", "src/*"]
1814

1915
[lib]
2016
path = "bindings/rust/lib.rs"
2117

2218
[dependencies]
23-
tree-sitter = "0.22.6"
19+
tree-sitter-language = "0.1.0"
2420

2521
[build-dependencies]
26-
cc = "1.0"
22+
cc = "1.1.15"
23+
24+
[dev-dependencies]
25+
tree-sitter = "0.23"

Makefile

+16-14
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)