Don't include trailing ubiquitous tokens as children when reducing

This commit is contained in:
Max Brunsfeld 2015-12-02 07:53:15 -08:00
parent 64e56f5acc
commit 863cabc827
13 changed files with 286 additions and 149 deletions

View file

@ -13,6 +13,8 @@ typedef struct Stack Stack;
typedef struct {
TSTree *tree;
TSStateId state;
TSLength position;
TSPoint position_point;
} StackEntry;
typedef struct {
@ -53,6 +55,12 @@ TSStateId ts_stack_top_state(const Stack *, int head);
*/
TSTree *ts_stack_top_tree(const Stack *, int head);
/*
* Get the position of the given head of the stack. If the stack is empty, this
* returns {0, 0}.
*/
TSLength ts_stack_top_position(const Stack *, int head);
/*
* Get the entry at the given head of the stack.
*/