Start work on reading input incrementally
This commit is contained in:
parent
a3a7546450
commit
7e94a4f1b2
4 changed files with 37 additions and 8 deletions
|
|
@ -28,6 +28,11 @@ state_id ts_stack_top_state(const ts_stack *stack) {
|
|||
return stack->entries[stack->size - 1].state;
|
||||
}
|
||||
|
||||
ts_tree * ts_stack_top_node(const ts_stack *stack) {
|
||||
if (stack->size == 0) return NULL;
|
||||
return stack->entries[stack->size - 1].node;
|
||||
}
|
||||
|
||||
ts_tree * ts_stack_root(const ts_stack *stack) {
|
||||
return stack->entries[0].node;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue