Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update tree-sitter and each grammars to v0.19 #552

Merged
merged 18 commits into from
Mar 26, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Regenerate tree-sitter-mozjs grammar
  • Loading branch information
Luni-4 committed Mar 26, 2021
commit 1de2f1936b2aa40b399c9ea37eb1b39c38d3d9c8
709 changes: 369 additions & 340 deletions src/languages/language_mozjs.rs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion tree-sitter-mozjs/binding.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
],
"sources": [
"src/parser.c",
"src/binding.cc"
"bindings/node/binding.cc"
],
"cflags_c": [
"-std=c99",
Expand Down
19 changes: 19 additions & 0 deletions tree-sitter-mozjs/bindings/node/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
try {
module.exports = require("../../build/Release/tree_sitter_mozjs_binding");
} catch (error1) {
if (error1.code !== 'MODULE_NOT_FOUND') {
throw error1;
}
try {
module.exports = require("../../build/Debug/tree_sitter_mozjs_binding");
} catch (error2) {
if (error2.code !== 'MODULE_NOT_FOUND') {
throw error2;
}
throw error1
}
}

try {
module.exports.nodeTypeInfo = require("../../src/node-types.json");
} catch (_) {}
2 changes: 1 addition & 1 deletion tree-sitter-mozjs/grammar.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ module.exports = grammar(JS, {
/#.*\n/,
),

_statement: ($, original) => choice(
statement: ($, original) => choice(
original,
$.preproc,
),
Expand Down
13 changes: 0 additions & 13 deletions tree-sitter-mozjs/index.js

This file was deleted.

6 changes: 3 additions & 3 deletions tree-sitter-mozjs/package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "tree-sitter-mozjs",
"version": "0.17.0",
"version": "0.19.0",
"description": "Mozjs grammar for node-tree-sitter",
"main": "index.js",
"main": "bindings/node",
"keywords": [
"parser",
"lexer"
Expand All @@ -13,7 +13,7 @@
"nan": "^2.14.2"
},
"devDependencies": {
"tree-sitter-cli": "^0.17.3"
"tree-sitter-cli": "^0.19.3"
},
"scripts": {
"build": "tree-sitter generate && node-gyp build",
Expand Down
Loading