Use new stack_pop_until function for repairing errors

This commit is contained in:
Max Brunsfeld 2016-03-07 20:06:46 -08:00
parent 4348eb89d4
commit 2e35587161
7 changed files with 271 additions and 274 deletions

View file

@ -9,14 +9,16 @@ extern "C" {
#include "runtime/array.h"
typedef struct LookaheadState LookaheadState;
typedef struct ErrorRepair ErrorRepair;
typedef Array(LookaheadState) LookaheadStateArray;
typedef Array(ErrorRepair) ErrorRepairArray;
typedef struct {
TSLexer lexer;
Stack *stack;
const TSLanguage *language;
Array(LookaheadState) lookahead_states;
Array(TSTree *) reduce_parents;
TreeArray partial_pop;
LookaheadStateArray lookahead_states;
ErrorRepairArray error_repairs;
TSTree *finished_tree;
bool is_split;
bool print_debugging_graphs;