Fix error when set_included_ranges is called with an invalid range list

This commit is contained in:
Max Brunsfeld 2020-01-17 10:31:28 -08:00
parent de8877db35
commit 9f63139a10
8 changed files with 284 additions and 150 deletions

View file

@ -1761,8 +1761,12 @@ void ts_parser_set_timeout_micros(TSParser *self, uint64_t timeout_micros) {
self->timeout_duration = duration_from_micros(timeout_micros);
}
void ts_parser_set_included_ranges(TSParser *self, const TSRange *ranges, uint32_t count) {
ts_lexer_set_included_ranges(&self->lexer, ranges, count);
bool ts_parser_set_included_ranges(
TSParser *self,
const TSRange *ranges,
uint32_t count
) {
return ts_lexer_set_included_ranges(&self->lexer, ranges, count);
}
const TSRange *ts_parser_included_ranges(const TSParser *self, uint32_t *count) {