Pass edit information into parser function

This commit is contained in:
Max Brunsfeld 2014-03-15 16:55:25 -07:00
parent 464a0e8dad
commit 0d6435e24a
6 changed files with 35 additions and 24 deletions

View file

@ -13,6 +13,7 @@ typedef struct {
} ts_stack;
static int INITIAL_STACK_SIZE = 100;
static int INITIAL_STATE = 0;
ts_stack ts_stack_make() {
ts_stack result = {
@ -23,7 +24,7 @@ ts_stack ts_stack_make() {
}
state_id ts_stack_top_state(const ts_stack *stack) {
if (stack->size == 0) return 0;
if (stack->size == 0) return INITIAL_STATE;
return stack->entries[stack->size - 1].state;
}