1 #include "tree_sitter/parser.h"
13 void Init(Local<Object> exports, Local<Object>
module) {
14 Local<FunctionTemplate> tpl = Nan::New<FunctionTemplate>(New);
15 tpl->SetClassName(Nan::New(
"Language").ToLocalChecked());
16 tpl->InstanceTemplate()->SetInternalFieldCount(1);
18 Local<Function> constructor = Nan::GetFunction(tpl).ToLocalChecked();
19 Local<Object> instance = constructor->NewInstance(Nan::GetCurrentContext()).ToLocalChecked();
22 Nan::Set(instance, Nan::New(
"name").ToLocalChecked(), Nan::New(
"rzcmd").ToLocalChecked());
23 Nan::Set(
module, Nan::New(
"exports").ToLocalChecked(), instance);
26 NODE_MODULE(tree_sitter_rzcmd_binding,
Init)
int Init(const char *driverPath)
TSLanguage * tree_sitter_rzcmd()