From dc87cd894bad9ad0202dcd4a89e7d0af47c53fc9 Mon Sep 17 00:00:00 2001 From: Ruben Beltran del Rio Date: Wed, 4 Oct 2023 13:39:56 +0200 Subject: Initial Commit --- bindings/node/index.js | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 bindings/node/index.js (limited to 'bindings/node/index.js') diff --git a/bindings/node/index.js b/bindings/node/index.js new file mode 100644 index 0000000..d7f66fd --- /dev/null +++ b/bindings/node/index.js @@ -0,0 +1,19 @@ +try { + module.exports = require("../../build/Release/tree_sitter_apinotation_binding"); +} catch (error1) { + if (error1.code !== 'MODULE_NOT_FOUND') { + throw error1; + } + try { + module.exports = require("../../build/Debug/tree_sitter_apinotation_binding"); + } catch (error2) { + if (error2.code !== 'MODULE_NOT_FOUND') { + throw error2; + } + throw error1 + } +} + +try { + module.exports.nodeTypeInfo = require("../../src/node-types.json"); +} catch (_) {} -- cgit