Fix handling of zero-width external tokens at beginning of document
Fixes #316
This commit is contained in:
parent
701d63dab7
commit
bc5e71bcc2
4 changed files with 64 additions and 0 deletions
|
|
@ -583,6 +583,7 @@ int ts_stack_dynamic_precedence(Stack *self, StackVersion version) {
|
|||
bool ts_stack_has_advanced_since_error(const Stack *self, StackVersion version) {
|
||||
const StackHead *head = array_get(&self->heads, version);
|
||||
const StackNode *node = head->node;
|
||||
if (node->error_cost == 0) return true;
|
||||
while (node) {
|
||||
if (node->link_count > 0) {
|
||||
Subtree subtree = node->links[0].subtree;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue