Skip to content

Commit

Permalink
Merge pull request #73 from m-novikov/return-autogen
Browse files Browse the repository at this point in the history
Return autogenerated files
  • Loading branch information
m-novikov authored Mar 6, 2023
2 parents 98d9b30 + e326479 commit 63cd042
Show file tree
Hide file tree
Showing 11 changed files with 1,187,965 additions and 43 deletions.
16 changes: 12 additions & 4 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, windows-2019, macos-latest]
node-version: [14.x, 16.x, 18.x]
node-version: [16.x, 18.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
Expand All @@ -27,10 +27,18 @@ jobs:
- run: npm run build --if-present
- run: npx prettier --check .
- run: npm run gen
- name: Verify generated code
if: runner.os == 'Linux'
run: |
if ! git diff --quiet --ignore-submodules -- src/
then
echo >&2 "Generated files in src/ differ, please run 'npm run gen' to update generated code"
git diff-index --name-status -r --ignore-submodules HEAD src/ >&2
fi
- run: npm test
- name: Parse real world examples (ignoring errors for now)
continue-on-error: true
run: npm acceptance
#- name: Parse real world examples (ignoring errors for now)
# continue-on-error: true
# run: npm acceptance

compile:
strategy:
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,11 @@ env:

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: install treesitter-cli
run: cargo install tree-sitter-cli
- name: generate parser
run: tree-sitter generate
- name: Build
run: cargo build --verbose
- name: Run tests
Expand Down
4 changes: 0 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,3 @@ target/
build/
venv/
yarn.lock
src/grammar.json
src/grammar.json.rej
src/node-types.json
src/parser.c
29 changes: 0 additions & 29 deletions binding.gyp
Original file line number Diff line number Diff line change
@@ -1,33 +1,5 @@
{
"targets": [
{
"target_name": "tree_sitter_generate",
"type": "none",
"conditions": [
['OS!="win"', {
"actions": [
{
"action_name": "generate_parser",
"message": "Generating Parser UNIX...",
"inputs": [],
"outputs": ["src/parser.c", "grammar.json", "node-types.json", "node-types.json.rej"],
"action": ["eval", "npm run gen"]
}
]
}],
['OS=="win"', {
"actions": [
{
"action_name": "generate_parser",
"message": "Generating Parser Windows ...",
"inputs": [],
"outputs": ["src/parser.c", "grammar.json", "node-types.json", "node-types.json.rej"],
"action": ["npm run gen"]
}
]
}]
]
},
{
"target_name": "tree_sitter_sql_binding",
"include_dirs": [
Expand All @@ -39,7 +11,6 @@
"src/parser.c",
"src/scanner.cc"
],
"dependencies": ["tree_sitter_generate"],
"cflags_c": [
"-std=c99",
]
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"author": "Maksim Novikov <[email protected]>",
"license": "MIT",
"dependencies": {
"nan": "^2.16.0"
"nan": "^2.14.2"
},
"devDependencies": {
"prettier": "^2.4.1",
Expand Down
Loading

0 comments on commit 63cd042

Please sign in to comment.