Expand description
Core types for the merge engine.
Based on the structured merge literature (LASTMERGE 2025, AutoMerge/OOPSLA 2018), we model code as concrete syntax trees with three node kinds:
- Leaf: terminal nodes (identifiers, literals, operators)
- Constructed: non-terminal with fixed-arity named children
- List: non-terminal with variable-length children (ordered or unordered)
Structs§
- Match
Pair - A matched pair of nodes across two revisions.
- Merge
Scenario - The three-way merge scenario: base, left, and right revisions.
- Resolution
Candidate - A candidate resolution produced by the resolver pipeline.
Enums§
- Confidence
- Confidence level for an auto-resolution. Ordered Low < Medium < High so that derived Ord works correctly.
- CstNode
- A concrete syntax tree node, following the three-kind taxonomy from Zhu & He (OOPSLA 2018) and LASTMERGE (2025).
- Diff3
Hunk - A text-level hunk from diff3.
- Language
- Supported programming languages for tree-sitter parsing.
- List
Ordering - Ordering semantics for list nodes, per LASTMERGE/JDime. Unordered lists (e.g., import blocks, class members) can be freely permuted without changing program semantics, enabling better conflict resolution.
- Merge
Result - The result of a merge operation on a region.
- Resolution
Strategy - Which strategy produced a resolution.
Type Aliases§
- NodeId
- Unique identifier for a tree node within a merge context.