Skip to main content

reparse_edits

Function reparse_edits 

Source
pub fn reparse_edits(
    base: &ReparseBase<'_>,
    edits: &[Edit],
    new_text: &str,
) -> Option<Reparsed>
Expand description

reparse for a chain of edits, each expressed against the text its predecessors produced — the shape an LSP didChange batch arrives in.

Replaying the chain is not the same as collapsing it: a diff of scattered edits spans everything between them, which a cost guard declines outright, while the chain splices each edit on its own.