Skip to content

Commit 241ea9b

Browse files
committed
Bump tree-sitter, use partially-ordered precedences
1 parent 452151f commit 241ea9b

File tree

14 files changed

+31333
-36369
lines changed

14 files changed

+31333
-36369
lines changed

.npmignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ script
44
examples
55
*.log
66
test.js
7+
target

binding.gyp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"sources": [
1010
"src/parser.c",
1111
"src/scanner.c",
12-
"src/binding.cc"
12+
"bindings/node/binding.cc"
1313
],
1414
"cflags_c": [
1515
"-std=c99",
File renamed without changes.

bindings/node/index.js

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
try {
2+
module.exports = require("../../build/Release/tree_sitter_javascript_binding");
3+
} catch (error1) {
4+
if (error1.code !== 'MODULE_NOT_FOUND') {
5+
throw error1;
6+
}
7+
try {
8+
module.exports = require("../../build/Debug/tree_sitter_javascript_binding");
9+
} catch (error2) {
10+
if (error2.code !== 'MODULE_NOT_FOUND') {
11+
throw error2;
12+
}
13+
throw error1
14+
}
15+
}
16+
17+
try {
18+
module.exports.nodeTypeInfo = require("../../src/node-types.json");
19+
} catch (_) {}

0 commit comments

Comments
 (0)