From 428cca51dcd773323225d9c11251aa2521252b66 Mon Sep 17 00:00:00 2001 From: Gregory Croisdale Date: Tue, 9 Jul 2024 13:14:21 -0400 Subject: [PATCH] updated build instructions, removed wasm from source code --- README.md | 19 ++++++++++++++++++- grammar.js | 1 - package.json | 3 ++- tree-sitter-hazel.wasm | Bin 65114 -> 0 bytes 4 files changed, 20 insertions(+), 3 deletions(-) delete mode 100755 tree-sitter-hazel.wasm diff --git a/README.md b/README.md index dd2bfa0..f565ea4 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,19 @@ # tree-sitter-hazel -A tree-sitter parser for the Hazel language +[Hazel language grammar](https://github.com/hazelgrove/hazel) for [tree-sitter](https://github.com/tree-sitter/tree-sitter) + +## Install +```bash +npm install +``` + +## Build + +For NodeJS and Rust, run: +```bash +npm run build +``` + +For WebAssembly, (for use in [web-tree-sitter](https://github.com/tree-sitter/tree-sitter/tree/master/lib/binding_web)), run: +```bash +npm run build:wasm +``` diff --git a/grammar.js b/grammar.js index cc2dd54..31676b0 100644 --- a/grammar.js +++ b/grammar.js @@ -17,7 +17,6 @@ module.exports = grammar({ conflicts: $ => [ [$.expression, $.pat], [$.expression, $.ident], - // [$.ident, $.expression], [$.hole, $.ident], [$.tuple_pat, $.tuple_exp], [$.list_exp, $.list_pat], diff --git a/package.json b/package.json index a19e086..58795ca 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,8 @@ "main": "bindings/node", "scripts": { "test": "tree-sitter test && tree-sitter parse 'test/hazel-code/*.hazel' --quiet --stat", - "build": "tree-sitter generate" + "build": "tree-sitter generate", + "build:wasm": "tree-sitter build-wasm" }, "author": "green726", "license": "ISC", diff --git a/tree-sitter-hazel.wasm b/tree-sitter-hazel.wasm deleted file mode 100755 index 55b248026da8e35803134dddac75c49ce8647116..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 65114 zcmeHw349bq+WuQJlLVNVggab;1dy9>-)AFo%6-Ze0t5(z03oP|N>mgS4^&iCR6KS? z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