-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from tree-sitter/erik-krogh-patch-1
add CI workflow, and update tree-sitter
- Loading branch information
Showing
36 changed files
with
1,724 additions
and
230 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
end_of_line = lf | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
|
||
[*.{json,toml,yml,gyp}] | ||
indent_style = space | ||
indent_size = 2 | ||
|
||
[*.js] | ||
indent_style = space | ||
indent_size = 2 | ||
|
||
[*.rs] | ||
indent_style = space | ||
indent_size = 4 | ||
|
||
[*.{c,cc,h}] | ||
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
* text eol=lf | ||
|
||
src/*.json linguist-generated | ||
src/parser.c linguist-generated | ||
src/tree_sitter/* linguist-generated | ||
|
||
bindings/** linguist-generated | ||
binding.gyp linguist-generated | ||
setup.py linguist-generated | ||
Makefile linguist-generated | ||
Package.swift linguist-generated |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
name: CI | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- "**" | ||
push: | ||
branches: | ||
- "main" | ||
|
||
concurrency: | ||
group: ${{github.workflow}}-${{github.ref}} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
test: | ||
name: Test parser | ||
runs-on: ${{matrix.os}} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-latest, windows-latest, macos-14] | ||
steps: | ||
- 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 | ||
with: | ||
test-rust: ${{runner.os == 'Linux'}} | ||
test-swift: ${{runner.os == 'macOS'}} | ||
- name: Parse sample files | ||
uses: tree-sitter/parse-action@v4 | ||
id: parse-files | ||
with: | ||
files: examples/** | ||
- name: Upload failures artifact | ||
uses: actions/upload-artifact@v4 | ||
if: "!cancelled() && steps.parse-files.outcome == 'failure'" | ||
with: | ||
name: failures-${{runner.os}} | ||
path: ${{steps.parse-files.outputs.failures}} | ||
fuzz: | ||
name: Fuzz scanner | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 2 | ||
- name: Check for scanner changes | ||
id: scanner-check | ||
run: |- | ||
if git diff --quiet HEAD^ -- src/scanner.c; then | ||
printf 'changed=false\n' >> "$GITHUB_OUTPUT" | ||
else | ||
printf 'changed=true\n' >> "$GITHUB_OUTPUT" | ||
fi | ||
- name: Run the fuzzer | ||
uses: tree-sitter/fuzz-action@v4 | ||
if: steps.scanner-check.outputs.changed == 'true' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
node_modules/ | ||
build/ | ||
target/ | ||
.build/ |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,23 @@ | ||
[package] | ||
name = "tree-sitter-ql-dbscheme" | ||
description = "ql dbscheme grammar for the tree-sitter parsing library" | ||
description = "QlDbscheme grammar for tree-sitter" | ||
version = "0.0.1" | ||
keywords = ["incremental", "parsing", "ql"] | ||
categories = ["parsing", "text-editors"] | ||
repository = "https://github.com/tausbn/tree-sitter-ql-dbscheme" | ||
edition = "2018" | ||
license = "MIT" | ||
readme = "README.md" | ||
keywords = ["incremental", "parsing", "tree-sitter", "ql-dbscheme"] | ||
categories = ["parsing", "text-editors"] | ||
repository = "https://github.com/tree-sitter/tree-sitter-ql-dbscheme" | ||
edition = "2021" | ||
autoexamples = false | ||
|
||
build = "bindings/rust/build.rs" | ||
include = [ | ||
"bindings/rust/*", | ||
"grammar.js", | ||
"queries/*", | ||
"src/*", | ||
] | ||
include = ["bindings/rust/*", "grammar.js", "queries/*", "src/*"] | ||
|
||
[lib] | ||
path = "bindings/rust/lib.rs" | ||
|
||
[dependencies] | ||
tree-sitter = ">= 0.20, < 0.21" | ||
tree-sitter = ">=0.22.5" | ||
|
||
[build-dependencies] | ||
cc = "1.0" | ||
cc = "1.0.87" |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"object": { | ||
"pins": [ | ||
{ | ||
"package": "SwiftTreeSitter", | ||
"repositoryURL": "https://github.com/ChimeHQ/SwiftTreeSitter", | ||
"state": { | ||
"branch": null, | ||
"revision": "2599e95310b3159641469d8a21baf2d3d200e61f", | ||
"version": "0.8.0" | ||
} | ||
} | ||
] | ||
}, | ||
"version": 1 | ||
} |
Oops, something went wrong.