pub fn reparse(
old_source: &str,
old_root: &SyntaxNode,
edit: &TextEdit,
) -> Result<Option<SyntaxNode>, ParseError>Expand description
Reparse after a text edit, reusing unchanged parts of the tree.
Takes the previous source, the previous syntax root (from parse), and an edit.
Returns the new syntax root, or None if the new parse produced no root.
Use for incremental updates in editors or formatters.