Avoid using a string literal to pass grammar path to JS

Backslashes in windows path were getting interpeted as escape characters.
This commit is contained in:
Max Brunsfeld 2019-01-17 10:09:03 -08:00
parent d903371709
commit d52a11fd03
2 changed files with 6 additions and 8 deletions

View file

@ -327,3 +327,6 @@ global.seq = seq;
global.sym = sym;
global.token = token;
global.grammar = grammar;
const result = require(process.env.TREE_SITTER_GRAMMAR_PATH);
console.log(JSON.stringify(result, null, 2));