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:
parent
186f70649c
commit
e917756ad1
10 changed files with 16 additions and 43 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue