about summary refs log tree commit diff stats
path: root/tree-sitter-yts/bindings/node/index.js
blob: 580bda09404655539be33900a498052833f8e70d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
// yt - A fully featured command line YouTube client
//
// Copyright (C) 2024 Benedikt Peetz <benedikt.peetz@b-peetz.de>
// SPDX-License-Identifier: GPL-3.0-or-later
//
// This file is part of Yt.
//
// You should have received a copy of the License along with this program.
// If not, see <https://www.gnu.org/licenses/gpl-3.0.txt>.

try {
  module.exports = require("../../build/Release/tree_sitter_yts_binding");
} catch (error1) {
  if (error1.code !== "MODULE_NOT_FOUND") {
    throw error1;
  }
  try {
    module.exports = require("../../build/Debug/tree_sitter_yts_binding");
  } catch (error2) {
    if (error2.code !== "MODULE_NOT_FOUND") {
      throw error2;
    }
    throw error1;
  }
}

try {
  module.exports.nodeTypeInfo = require("../../src/node-types.json");
} catch (_) {}