Don't include trailing ubiquitous tokens as children when reducing
This commit is contained in:
parent
64e56f5acc
commit
863cabc827
13 changed files with 286 additions and 149 deletions
|
|
@ -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.
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue