Expand description
Find syntax nodes that are obviously unchanged, so we can run the main diff on smaller inputs.
StructsΒ§
- EqOn
First πItem A 2-tuple that only considers the first item in equality and sorting.
EnumsΒ§
- Change
State π
ConstantsΒ§
- TINY_
TREE_ πTHRESHOLD
FunctionsΒ§
- count_
common_ πunique Count the nodes inlhsthat are unique to the LHS input, but are also present inrhs. - Return true if both nodes are lists that share at least
MOSTLY_UNCHANGED_MIN_COMMON_CHILDRENunique subtrees, regardless of whether their delimiters match. - mark_
unchanged πLook for syntax nodes that are obviously the same, and setChangeKindon them. - Skip syntax nodes at the beginning or end that are obviously unchanged.
- If weβre comparing two lists that have the same delimiters, mark the delimiters as unchanged and return the children.
- Split out top-level lists that are largely the same.
- split_
unchanged πWrapssplit_unchanged_toplevelwith a size threshold and updateschange_map. - Walk
lhs_nodesandrhs_nodesand run a longest-common-subsequence (traditional) diff on their toplevel content IDs.