tree-sitter-bp/bindings/node/binding.cc
Bruno BELANYI 1af33aeea1 Bump flake inputs
This means regenerating all the tree-sitter files, and adding newly
generated outputs (mostly new bindings).

The `--apply-all-captures` flag has been removed, it is now the default
(and only) matching behaviour.
2024-05-13 15:44:17 +00:00

21 lines
567 B
C++

#include <napi.h>
typedef struct TSLanguage TSLanguage;
extern "C" TSLanguage *tree_sitter_bp();
// "tree-sitter", "language" hashed with BLAKE2
const napi_type_tag LANGUAGE_TYPE_TAG = {
0x8AF2E5212AD58ABF, 0xD5006CAD83ABBA16
};
Napi::Object Init(Napi::Env env, Napi::Object exports) {
exports["name"] = Napi::String::New(env, "bp");
auto language = Napi::External<TSLanguage>::New(env, tree_sitter_bp());
language.TypeTag(&LANGUAGE_TYPE_TAG);
exports["language"] = language;
return exports;
}
NODE_API_MODULE(tree_sitter_bp_binding, Init)