Allow stack versions to be temporarily paused

This way, when detecting an error, we can defer the decision about
whether to bail or recover until all stack versions are processed.
This commit is contained in:
Max Brunsfeld 2018-04-02 09:47:01 -07:00
parent 1109a565fc
commit e59558c83b
4 changed files with 206 additions and 146 deletions

View file

@ -102,9 +102,17 @@ bool ts_stack_can_merge(Stack *, StackVersion, StackVersion);
void ts_stack_force_merge(Stack *, StackVersion, StackVersion);
TSSymbol ts_stack_resume(Stack *, StackVersion);
void ts_stack_pause(Stack *, StackVersion, TSSymbol);
void ts_stack_halt(Stack *, StackVersion);
bool ts_stack_is_halted(Stack *, StackVersion);
bool ts_stack_is_active(const Stack *, StackVersion);
bool ts_stack_is_paused(const Stack *, StackVersion);
bool ts_stack_is_halted(const Stack *, StackVersion);
void ts_stack_renumber_version(Stack *, StackVersion, StackVersion);