forked from tree-sitter/tree-sitter-c
-
Notifications
You must be signed in to change notification settings - Fork 0
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 #3 from tree-sitter/master
Sync
- Loading branch information
Showing
48 changed files
with
85,924 additions
and
103,728 deletions.
There are no files selected for viewing
This file was deleted.
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,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 was deleted.
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,10 +1,13 @@ | ||
/src/** linguist-vendored | ||
/examples/* linguist-vendored | ||
* text=auto eol=lf | ||
|
||
src/grammar.json linguist-generated | ||
src/node-types.json linguist-generated | ||
examples/* linguist-vendored | ||
|
||
src/*.json linguist-generated | ||
src/parser.c linguist-generated | ||
src/tree_sitter/* linguist-generated | ||
|
||
src/grammar.json -diff | ||
src/node-types.json -diff | ||
src/parser.c -diff | ||
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,8 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: "weekly" | ||
commit-message: | ||
prefix: "ci" |
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,30 +1,44 @@ | ||
name: CI | ||
|
||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
push: | ||
branches: [master] | ||
paths: | ||
- grammar.js | ||
- src/** | ||
- test/** | ||
- bindings/** | ||
- binding.gyp | ||
pull_request: | ||
paths: | ||
- grammar.js | ||
- src/** | ||
- test/** | ||
- bindings/** | ||
- binding.gyp | ||
|
||
concurrency: | ||
group: ${{github.workflow}}-${{github.ref}} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
test: | ||
runs-on: ${{ matrix.os }} | ||
name: Test parser | ||
runs-on: ${{matrix.os}} | ||
strategy: | ||
fail-fast: true | ||
fail-fast: false | ||
matrix: | ||
os: [macos-latest, ubuntu-latest] | ||
os: [ubuntu-latest, windows-latest, macos-14] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v4 | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
- name: Set up tree-sitter | ||
uses: tree-sitter/setup-action/cli@v1 | ||
- name: Run tests | ||
uses: tree-sitter/parser-test-action@v2 | ||
with: | ||
node-version: 18 | ||
- run: npm install | ||
- run: npm test | ||
|
||
test_windows: | ||
runs-on: windows-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v4 | ||
test-rust: ${{runner.os == 'Linux'}} | ||
- name: Parse examples | ||
uses: tree-sitter/parse-action@v4 | ||
with: | ||
node-version: 18 | ||
- run: npm install | ||
- run: npm run test-windows | ||
files: examples/* |
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
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,23 @@ | ||
name: Publish packages | ||
|
||
on: | ||
push: | ||
tags: ["*"] | ||
|
||
concurrency: | ||
group: ${{github.workflow}}-${{github.ref}} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
npm: | ||
uses: tree-sitter/workflows/.github/workflows/package-npm.yml@main | ||
secrets: | ||
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} | ||
crates: | ||
uses: tree-sitter/workflows/.github/workflows/package-crates.yml@main | ||
secrets: | ||
CARGO_REGISTRY_TOKEN: ${{secrets.CARGO_REGISTRY_TOKEN}} | ||
pypi: | ||
uses: tree-sitter/workflows/.github/workflows/package-pypi.yml@main | ||
secrets: | ||
PYPI_API_TOKEN: ${{secrets.PYPI_API_TOKEN}} |
This file was deleted.
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,6 +1,32 @@ | ||
# Rust artifacts | ||
Cargo.lock | ||
node_modules | ||
build | ||
package-lock.json | ||
/target/ | ||
.build/ | ||
target/ | ||
|
||
# Node artifacts | ||
build/ | ||
prebuilds/ | ||
node_modules/ | ||
|
||
# Swift artifacts | ||
.build/ | ||
|
||
# Python artifacts | ||
dist/ | ||
*.egg-info | ||
*.whl | ||
|
||
# C artifacts | ||
*.a | ||
*.so | ||
*.so.* | ||
*.dylib | ||
*.dll | ||
*.pc | ||
|
||
# Examples | ||
/examples/*/ | ||
|
||
# Grammar volatiles | ||
*.wasm | ||
*.obj | ||
*.o |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.