Remove depends_on_lookahead field from parse table entries

This simplifies the logic for determining whether a token is reusable
and makes it more conservative. It should fix some incremental parsing
bugs that are being caught by the randomized tests on CI.
This commit is contained in:
Max Brunsfeld 2018-03-28 10:11:05 -07:00
parent 186f70649c
commit e917756ad1
10 changed files with 16 additions and 43 deletions

View file

@ -36,16 +36,6 @@ static inline ReusableNode reusable_node_after_leaf(const ReusableNode *self) {
return result;
}
static inline bool reusable_node_has_leading_changes(const ReusableNode *self) {
Tree *tree = self->tree;
while (tree->has_changes) {
if (tree->child_count == 0) return false;
tree = tree->children[0];
if (tree->size.bytes == 0) return false;
}
return true;
}
static inline bool reusable_node_breakdown(ReusableNode *self) {
if (self->tree->child_count == 0) {
return false;