mirror of
https://github.com/elladunbar/tree-sitter-zanscript.git
synced 2025-11-05 23:29:54 -06:00
Corrected all your language name references
This commit is contained in:
parent
8e99061065
commit
2a2ba3d4c3
22 changed files with 42 additions and 176 deletions
8
bindings/node/binding.cc
generated
8
bindings/node/binding.cc
generated
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
typedef struct TSLanguage TSLanguage;
|
||||
|
||||
extern "C" TSLanguage *tree_sitter_YOUR_LANGUAGE_NAME();
|
||||
extern "C" TSLanguage *tree_sitter_zanscript();
|
||||
|
||||
// "tree-sitter", "language" hashed with BLAKE2
|
||||
const napi_type_tag LANGUAGE_TYPE_TAG = {
|
||||
|
|
@ -10,11 +10,11 @@ const napi_type_tag LANGUAGE_TYPE_TAG = {
|
|||
};
|
||||
|
||||
Napi::Object Init(Napi::Env env, Napi::Object exports) {
|
||||
exports["name"] = Napi::String::New(env, "YOUR_LANGUAGE_NAME");
|
||||
auto language = Napi::External<TSLanguage>::New(env, tree_sitter_YOUR_LANGUAGE_NAME());
|
||||
exports["name"] = Napi::String::New(env, "zanscript");
|
||||
auto language = Napi::External<TSLanguage>::New(env, tree_sitter_zanscript());
|
||||
language.TypeTag(&LANGUAGE_TYPE_TAG);
|
||||
exports["language"] = language;
|
||||
return exports;
|
||||
}
|
||||
|
||||
NODE_API_MODULE(tree_sitter_YOUR_LANGUAGE_NAME_binding, Init)
|
||||
NODE_API_MODULE(tree_sitter_zanscript_binding, Init)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue