Check that language is present in both parse() and resume()

This commit is contained in:
Max Brunsfeld 2018-05-23 15:41:16 -07:00
parent 986ceefc81
commit 69d8c6f5e6
2 changed files with 10 additions and 0 deletions

View file

@ -1440,6 +1440,7 @@ TSTree *ts_parser_resume(TSParser *self) {
}
TSTree *ts_parser_parse(TSParser *self, const TSTree *old_tree, TSInput input) {
if (!self->language) return NULL;
ts_parser__start(self, input, old_tree ? old_tree->root : NULL);
return ts_parser_resume(self);
}