Make binding.js syntactically valid

Put the end of the surrounding closure into a separate file, suffix.js.
This commit is contained in:
Max Brunsfeld 2020-11-30 15:28:21 -08:00
parent a2d6048226
commit b118e7d750
3 changed files with 3 additions and 5 deletions

View file

@ -7,7 +7,6 @@ const SIZE_OF_RANGE = 2 * SIZE_OF_INT + 2 * SIZE_OF_POINT;
const ZERO_POINT = {row: 0, column: 0};
const QUERY_WORD_REGEX = /[\w-.]*/g;
const PREDICATE_STEP_TYPE_DONE = 0;
const PREDICATE_STEP_TYPE_CAPTURE = 1;
const PREDICATE_STEP_TYPE_STRING = 2;
@ -1140,7 +1139,3 @@ function marshalEdit(edit) {
}
Parser.Language = Language;
return Parser;
}));

View file

@ -0,0 +1,2 @@
return Parser;
}));

View file

@ -95,6 +95,7 @@ $emcc \
--js-library ${web_dir}/imports.js \
--pre-js ${web_dir}/prefix.js \
--post-js ${web_dir}/binding.js \
--post-js ${web_dir}/suffix.js \
lib/src/lib.c \
${web_dir}/binding.c \
-o target/scratch/tree-sitter.js