diff options
Diffstat (limited to 'bindings/node')
| -rw-r--r-- | bindings/node/binding.cc | 8 | ||||
| -rw-r--r-- | bindings/node/index.js | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/bindings/node/binding.cc b/bindings/node/binding.cc index 54f34ac..ffae1ee 100644 --- a/bindings/node/binding.cc +++ b/bindings/node/binding.cc @@ -4,7 +4,7 @@ using namespace v8; -extern "C" TSLanguage * tree_sitter_apinotation(); +extern "C" TSLanguage * tree_sitter_api_notation(); namespace { @@ -17,12 +17,12 @@ void Init(Local<Object> exports, Local<Object> module) { Local<Function> constructor = Nan::GetFunction(tpl).ToLocalChecked(); Local<Object> instance = constructor->NewInstance(Nan::GetCurrentContext()).ToLocalChecked(); - Nan::SetInternalFieldPointer(instance, 0, tree_sitter_apinotation()); + Nan::SetInternalFieldPointer(instance, 0, tree_sitter_api_notation()); - Nan::Set(instance, Nan::New("name").ToLocalChecked(), Nan::New("apinotation").ToLocalChecked()); + Nan::Set(instance, Nan::New("name").ToLocalChecked(), Nan::New("api_notation").ToLocalChecked()); Nan::Set(module, Nan::New("exports").ToLocalChecked(), instance); } -NODE_MODULE(tree_sitter_apinotation_binding, Init) +NODE_MODULE(tree_sitter_api_notation_binding, Init) } // namespace diff --git a/bindings/node/index.js b/bindings/node/index.js index d7f66fd..cf8c768 100644 --- a/bindings/node/index.js +++ b/bindings/node/index.js @@ -1,11 +1,11 @@ try { - module.exports = require("../../build/Release/tree_sitter_apinotation_binding"); + module.exports = require("../../build/Release/tree_sitter_api_notation_binding"); } catch (error1) { if (error1.code !== 'MODULE_NOT_FOUND') { throw error1; } try { - module.exports = require("../../build/Debug/tree_sitter_apinotation_binding"); + module.exports = require("../../build/Debug/tree_sitter_api_notation_binding"); } catch (error2) { if (error2.code !== 'MODULE_NOT_FOUND') { throw error2; |