Skip to content

Commit

Permalink
Remove glsl from binding code
Browse files Browse the repository at this point in the history
  • Loading branch information
theHamsta committed Jul 25, 2023
1 parent 8a546a1 commit febe4f3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion binding.gyp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"targets": [
{
"target_name": "tree_sitter_glsl_binding",
"target_name": "tree_sitter_hlsl_binding",
"include_dirs": [
"<!(node -e \"require('nan')\")",
"src"
Expand Down
8 changes: 4 additions & 4 deletions bindings/node/binding.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

using namespace v8;

extern "C" TSLanguage * tree_sitter_glsl();
extern "C" TSLanguage * tree_sitter_hlsl();

namespace {

Expand All @@ -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_glsl());
Nan::SetInternalFieldPointer(instance, 0, tree_sitter_hlsl());

Nan::Set(instance, Nan::New("name").ToLocalChecked(), Nan::New("glsl").ToLocalChecked());
Nan::Set(instance, Nan::New("name").ToLocalChecked(), Nan::New("hlsl").ToLocalChecked());
Nan::Set(module, Nan::New("exports").ToLocalChecked(), instance);
}

NODE_MODULE(tree_sitter_glsl_binding, Init)
NODE_MODULE(tree_sitter_hlsl_binding, Init)

} // namespace

0 comments on commit febe4f3

Please sign in to comment.