Add push_count to stack, use it in error comparisons

This commit is contained in:
Max Brunsfeld 2016-08-31 17:29:14 -07:00
parent e04ac7b13d
commit 7483da4184
4 changed files with 77 additions and 36 deletions

View file

@ -68,6 +68,8 @@ size_t ts_stack_version_count(const Stack *);
*/
TSStateId ts_stack_top_state(const Stack *, StackVersion);
unsigned ts_stack_push_count(const Stack *, StackVersion);
/*
* Get the position at the top of the given version of the stack. If the stack
* is empty, this returns zero.