Make binding.js syntactically valid
Put the end of the surrounding closure into a separate file, suffix.js.
This commit is contained in:
parent
a2d6048226
commit
b118e7d750
3 changed files with 3 additions and 5 deletions
|
|
@ -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;
|
||||
|
||||
}));
|
||||
|
|
|
|||
2
lib/binding_web/suffix.js
Normal file
2
lib/binding_web/suffix.js
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
return Parser;
|
||||
}));
|
||||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue