Update to latest tree-sitter commit

This is needed for https://github.com/tree-sitter/tree-sitter/pull/1845
This commit is contained in:
Max Brunsfeld 2022-08-25 10:58:46 -07:00
parent 345b266dee
commit 1f12186e3c
4 changed files with 11 additions and 3 deletions

View file

@ -284,11 +284,19 @@ impl SyntaxSnapshot {
};
layer.tree.edit(&tree_edit);
if edit.new.start.0 < start_byte {
break;
}
}
debug_assert!(
layer.tree.root_node().end_byte() <= text.len(),
"tree's size {}, is larger than text size {}",
layer.tree.root_node().end_byte(),
text.len(),
);
layers.push(layer, text);
cursor.next(text);
}