diff --git a/Cargo.toml b/Cargo.toml index 75eb233..950153d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,10 +1,10 @@ [package] -name = "tree-sitter-TCL" +name = "tree-sitter-tcl" description = "TCL grammar for the tree-sitter parsing library" -version = "0.0.1" +version = "1.0.0" keywords = ["incremental", "parsing", "TCL"] categories = ["parsing", "text-editors"] -repository = "https://github.com/tree-sitter/tree-sitter-TCL" +repository = "https://github.com/tree-sitter/tree-sitter-tcl" edition = "2018" license = "MIT" @@ -20,7 +20,7 @@ include = [ path = "bindings/rust/lib.rs" [dependencies] -tree-sitter = "~0.20.3" +tree-sitter = "~0.20.8" [build-dependencies] cc = "1.0" diff --git a/binding.gyp b/binding.gyp index f42221b..18e0e39 100644 --- a/binding.gyp +++ b/binding.gyp @@ -1,7 +1,7 @@ { "targets": [ { - "target_name": "tree_sitter_TCL_binding", + "target_name": "tree_sitter_tcl_binding", "include_dirs": [ " exports, Local module) { Local constructor = Nan::GetFunction(tpl).ToLocalChecked(); Local instance = constructor->NewInstance(Nan::GetCurrentContext()).ToLocalChecked(); - Nan::SetInternalFieldPointer(instance, 0, tree_sitter_TCL()); + Nan::SetInternalFieldPointer(instance, 0, tree_sitter_tcl()); - Nan::Set(instance, Nan::New("name").ToLocalChecked(), Nan::New("TCL").ToLocalChecked()); + Nan::Set(instance, Nan::New("name").ToLocalChecked(), Nan::New("tcl").ToLocalChecked()); Nan::Set(module, Nan::New("exports").ToLocalChecked(), instance); } -NODE_MODULE(tree_sitter_TCL_binding, Init) +NODE_MODULE(tree_sitter_tcl_binding, Init) } // namespace diff --git a/bindings/node/index.js b/bindings/node/index.js index 95aaad1..bfd3874 100644 --- a/bindings/node/index.js +++ b/bindings/node/index.js @@ -1,11 +1,11 @@ try { - module.exports = require("../../build/Release/tree_sitter_TCL_binding"); + module.exports = require("../../build/Release/tree_sitter_tcl_binding"); } catch (error1) { if (error1.code !== 'MODULE_NOT_FOUND') { throw error1; } try { - module.exports = require("../../build/Debug/tree_sitter_TCL_binding"); + module.exports = require("../../build/Debug/tree_sitter_tcl_binding"); } catch (error2) { if (error2.code !== 'MODULE_NOT_FOUND') { throw error2; diff --git a/bindings/rust/lib.rs b/bindings/rust/lib.rs index 081756e..0abb0bc 100644 --- a/bindings/rust/lib.rs +++ b/bindings/rust/lib.rs @@ -6,7 +6,7 @@ //! ``` //! let code = ""; //! let mut parser = tree_sitter::Parser::new(); -//! parser.set_language(tree_sitter_TCL::language()).expect("Error loading TCL grammar"); +//! parser.set_language(tree_sitter_tcl::language()).expect("Error loading TCL grammar"); //! let tree = parser.parse(code, None).unwrap(); //! ``` //! @@ -18,14 +18,14 @@ use tree_sitter::Language; extern "C" { - fn tree_sitter_TCL() -> Language; + fn tree_sitter_tcl() -> Language; } /// Get the tree-sitter [Language][] for this grammar. /// /// [Language]: https://docs.rs/tree-sitter/*/tree_sitter/struct.Language.html pub fn language() -> Language { - unsafe { tree_sitter_TCL() } + unsafe { tree_sitter_tcl() } } /// The content of the [`node-types.json`][] file for this grammar. diff --git a/grammar.js b/grammar.js index 72e2ad9..1afccab 100644 --- a/grammar.js +++ b/grammar.js @@ -273,4 +273,5 @@ module.exports = grammar({ simple_word: _ => token(/[^!$\s\\\[\]{}();"]+/), } + }); diff --git a/package.json b/package.json index 1718af1..7399fe6 100644 --- a/package.json +++ b/package.json @@ -4,6 +4,7 @@ "description": "Treesitter parser for TCL", "main": "bindings/node", "keywords": [ + "tree-sitter", "parser", "lexer", "tcl" @@ -13,9 +14,10 @@ "url": "https://github.com/tree-sitter-grammars/tree-sitter-tcl.git" }, "scripts": { + "generate": "tree-sitter generate", + "parse": "tree-sitter parse", "lint": "eslint grammar.js", - "test": "tree-sitter test", - "test-windows": "tree-sitter test" + "test": "tree-sitter test" }, "author": "Lewis Russell ", "license": "MIT", diff --git a/src/grammar.json b/src/grammar.json index be2982d..81e2995 100644 --- a/src/grammar.json +++ b/src/grammar.json @@ -1604,4 +1604,3 @@ ], "supertypes": [] } -