Store trees in the links between stack nodes, not in the nodes themselves

This commit is contained in:
Max Brunsfeld 2016-02-23 17:35:50 -08:00
parent abbc282950
commit da2ef7ad35
6 changed files with 295 additions and 351 deletions

View file

@ -12,7 +12,6 @@ extern "C" {
typedef struct Stack Stack;
typedef struct {
TSTree *tree;
TSStateId state;
TSLength position;
} StackEntry;
@ -53,12 +52,6 @@ int ts_stack_head_count(const Stack *);
*/
TSStateId ts_stack_top_state(const Stack *, int head);
/*
* Get the tree at given head of the stack. If the stack is empty, this
* returns NULL.
*/
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}.