diff --git a/binding.gyp b/binding.gyp index 50f1e38..9f95c90 100644 --- a/binding.gyp +++ b/binding.gyp @@ -1,7 +1,7 @@ { "targets": [ { - "target_name": "tree_sitter_OpenGOAL_binding", + "target_name": "tree_sitter_opengoal_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_OpenGOAL()); + Nan::SetInternalFieldPointer(instance, 0, tree_sitter_opengoal()); - Nan::Set(instance, Nan::New("name").ToLocalChecked(), Nan::New("OpenGOAL").ToLocalChecked()); + Nan::Set(instance, Nan::New("name").ToLocalChecked(), Nan::New("opengoal").ToLocalChecked()); Nan::Set(module, Nan::New("exports").ToLocalChecked(), instance); } -NODE_MODULE(tree_sitter_OpenGOAL_binding, Init) +NODE_MODULE(tree_sitter_opengoal_binding, Init) } // namespace diff --git a/bindings/node/index.js b/bindings/node/index.js index e724ece..34af314 100644 --- a/bindings/node/index.js +++ b/bindings/node/index.js @@ -1,11 +1,11 @@ try { - module.exports = require("../../build/Release/tree_sitter_OpenGOAL_binding"); + module.exports = require("../../build/Release/tree_sitter_opengoal_binding"); } catch (error1) { if (error1.code !== 'MODULE_NOT_FOUND') { throw error1; } try { - module.exports = require("../../build/Debug/tree_sitter_OpenGOAL_binding"); + module.exports = require("../../build/Debug/tree_sitter_opengoal_binding"); } catch (error2) { if (error2.code !== 'MODULE_NOT_FOUND') { throw error2; diff --git a/bindings/rust/lib.rs b/bindings/rust/lib.rs index 0f915f9..2485e86 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_OpenGOAL::language()).expect("Error loading OpenGOAL grammar"); +//! parser.set_language(tree_sitter_opengoal::language()).expect("Error loading OpenGOAL grammar"); //! let tree = parser.parse(code, None).unwrap(); //! ``` //! @@ -18,14 +18,14 @@ use tree_sitter::Language; extern "C" { - fn tree_sitter_OpenGOAL() -> Language; + fn tree_sitter_opengoal() -> 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_OpenGOAL() } + unsafe { tree_sitter_opengoal() } } /// The content of the [`node-types.json`][] file for this grammar.