Generate bindings

This commit is contained in:
Logan Wemyss
2022-06-18 04:40:10 -06:00
committed by Michael Hoffmann
parent a4164c4086
commit 45ce22c16e
7 changed files with 181 additions and 0 deletions

19
bindings/node/index.js Normal file
View File

@@ -0,0 +1,19 @@
try {
module.exports = require("../../build/Release/tree_sitter_hcl_binding");
} catch (error1) {
if (error1.code !== 'MODULE_NOT_FOUND') {
throw error1;
}
try {
module.exports = require("../../build/Debug/tree_sitter_hcl_binding");
} catch (error2) {
if (error2.code !== 'MODULE_NOT_FOUND') {
throw error2;
}
throw error1
}
}
try {
module.exports.nodeTypeInfo = require("../../src/node-types.json");
} catch (_) {}