diff options
| author | Ruben Beltran del Rio <ruben@unlimited.pizza> | 2023-10-04 13:39:56 +0200 |
|---|---|---|
| committer | Ruben Beltran del Rio <ruben@unlimited.pizza> | 2023-10-04 13:39:56 +0200 |
| commit | dc87cd894bad9ad0202dcd4a89e7d0af47c53fc9 (patch) | |
| tree | 19fbc45b90d717b2e150f6ab711b234d9102e423 /bindings/node/index.js | |
Initial Commit
Diffstat (limited to 'bindings/node/index.js')
| -rw-r--r-- | bindings/node/index.js | 19 |
1 files changed, 19 insertions, 0 deletions
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 (_) {} |