Skip to content

Commit

Permalink
Merge pull request #193 from mads-hartmann/upgrade-tree-sitter-bash
Browse files Browse the repository at this point in the history
Upgrade tree sitter bash
  • Loading branch information
skovhus authored Mar 4, 2020
2 parents 32b1b97 + 6bc92fe commit 6afc5df
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 10 deletions.
2 changes: 1 addition & 1 deletion server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"turndown": "^4.0.2",
"urijs": "^1.19.1",
"vscode-languageserver": "^5.2.1",
"web-tree-sitter": "^0.15.9"
"web-tree-sitter": "^0.16.2"
},
"scripts": {
"compile": "rm -rf out && ../node_modules/.bin/tsc -p ./",
Expand Down
15 changes: 10 additions & 5 deletions server/src/parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,18 @@ export async function initializeParser(): Promise<Parser> {
/**
* See https://github.com/tree-sitter/tree-sitter/tree/master/lib/binding_web#generate-wasm-language-files
*
* To compile:
* yarn add --dev tree-sitter-cli
* npx tree-sitter build-wasm node_modules/tree-sitter-bash
* To compile and use a new tree-sitter-bash version:
* cd server
* yarn add web-tree-sitter
* yarn add --dev tree-sitter-bash tree-sitter-cli
* npx tree-sitter build-wasm node_modules/tree-sitter-bash
*
* Note down the versions (from the package.json) below and then run
* yarn remove tree-sitter-bash tree-sitter-cli
*
* The current files was compiled with:
* "tree-sitter-bash": "^0.16.0",
* "tree-sitter-cli": "^0.15.9"
* "tree-sitter-bash": "^0.16.1",
* "tree-sitter-cli": "^0.16.5"
*/
const lang = await Parser.Language.load(`${__dirname}/../tree-sitter-bash.wasm`)

Expand Down
Binary file modified server/tree-sitter-bash.wasm
Binary file not shown.
8 changes: 4 additions & 4 deletions server/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -768,10 +768,10 @@ w3c-hr-time@^1.0.1:
dependencies:
browser-process-hrtime "^0.1.2"

web-tree-sitter@^0.15.9:
version "0.15.9"
resolved "https://registry.yarnpkg.com/web-tree-sitter/-/web-tree-sitter-0.15.9.tgz#f93ec2e02cfc01ca3fa85d600114b982eef7b33c"
integrity sha512-1lf4lnmi8oxuEzI6gpUok2FQlHXOmV1iipltkQvmR785JWnUbjhw1sZnwSCkisQP+/g/aezpMGcW3mjz0uVhMw==
web-tree-sitter@^0.16.2:
version "0.16.2"
resolved "https://registry.yarnpkg.com/web-tree-sitter/-/web-tree-sitter-0.16.2.tgz#fc6b62681d7ca524a9ffc8498448f8e23be7b1ea"
integrity sha512-vxZHqu4nItCARmE+oGvTgjFBrMbhEuGI9PWYSgF4ET/nLuW3K11KQQIVhAsoGtYvTI9jdbjc/THj38P7nhYwow==

webidl-conversions@^4.0.2:
version "4.0.2"
Expand Down

0 comments on commit 6afc5df

Please sign in to comment.