Start work on reading input incrementally

This commit is contained in:
Max Brunsfeld 2014-03-18 13:23:21 -07:00
parent a3a7546450
commit 7e94a4f1b2
4 changed files with 37 additions and 8 deletions

View file

@ -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;
}