Only store one reusable node, not one for each stack version

This commit is contained in:
Max Brunsfeld 2016-04-01 21:17:23 -07:00
parent 6bce6da1e6
commit 956b3e68d7
2 changed files with 41 additions and 68 deletions

View file

@ -8,16 +8,13 @@ extern "C" {
#include "runtime/stack.h"
#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;
LookaheadStateArray lookahead_states;
ErrorRepairArray error_repairs;
TSTree *finished_tree;
bool is_split;