Lib: Rework the API for cancelling a parse

Also, use beta on CI until atomic::AtomicU32 lands in stable.
This commit is contained in:
Max Brunsfeld 2019-03-15 16:10:45 -07:00
parent 55dd2330ab
commit 0ae304f582
9 changed files with 82 additions and 23 deletions

View file

@ -88,8 +88,8 @@ void ts_parser_halt_on_error(TSParser *, bool);
TSTree *ts_parser_parse(TSParser *, const TSTree *, TSInput);
TSTree *ts_parser_parse_string(TSParser *, const TSTree *, const char *, uint32_t);
TSTree *ts_parser_parse_string_encoding(TSParser *, const TSTree *, const char *, uint32_t, TSInputEncoding);
bool ts_parser_enabled(const TSParser *);
void ts_parser_set_enabled(TSParser *, bool);
const uint32_t *ts_parser_cancellation_flag(const TSParser *);
void ts_parser_set_cancellation_flag(TSParser *, const uint32_t *);
uint64_t ts_parser_timeout_micros(const TSParser *);
void ts_parser_set_timeout_micros(TSParser *, uint64_t);
void ts_parser_reset(TSParser *);