Refactor generated parsers to used explicit table
This is slightly slower than encoding the parse table in flow control, but allows the parser to inspect the parse table more flexibly. This is needed for incremental parsing.
This commit is contained in:
parent
0d6435e24a
commit
67b33a615b
6 changed files with 938 additions and 1472 deletions
|
|
@ -28,7 +28,7 @@ state_id ts_stack_top_state(const ts_stack *stack) {
|
|||
return stack->entries[stack->size - 1].state;
|
||||
}
|
||||
|
||||
ts_tree * ts_stack_root(ts_stack *stack) {
|
||||
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