Halt stack pops at all error states, not just error trees
This commit is contained in:
parent
5f9be9d9b2
commit
c0595c21c5
4 changed files with 127 additions and 103 deletions
|
|
@ -29,6 +29,15 @@ typedef enum {
|
|||
StackPushContinued,
|
||||
} StackPushResult;
|
||||
|
||||
typedef struct {
|
||||
enum {
|
||||
StackPopFailed,
|
||||
StackPopStoppedAtError,
|
||||
StackPopSucceeded,
|
||||
} status;
|
||||
StackSliceArray slices;
|
||||
} StackPopResult;
|
||||
|
||||
typedef int (*TreeSelectionFunction)(void *, TSTree *, TSTree *);
|
||||
|
||||
/*
|
||||
|
|
@ -85,8 +94,7 @@ StackPushResult ts_stack_push(Stack *, int head_index, TSTree *, TSStateId);
|
|||
* which had previously been merged. It returns a struct that indicates the
|
||||
* index of each revealed head and the trees removed from that head.
|
||||
*/
|
||||
StackSliceArray ts_stack_pop(Stack *, int head_index, int count,
|
||||
bool count_extra);
|
||||
StackPopResult ts_stack_pop(Stack *, int head_index, int count, bool count_extra);
|
||||
|
||||
/*
|
||||
* Remove the given number of entries from the given head of the stack.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue