#[non_exhaustive]pub enum DifferenceKind {
Malformed {
program: ProgramSide,
message: String,
},
Settings,
DeclarationTable {
table: DeclarationTable,
first: Vec<u32>,
second: Vec<u32>,
},
Count {
element: &'static str,
first: usize,
second: usize,
},
Event {
first: String,
second: String,
},
Shape {
first: &'static str,
second: &'static str,
},
Reference {
table: DeclarationTable,
first: u32,
second: u32,
},
Operation {
first: String,
second: String,
},
Scalar {
first: String,
second: String,
},
}Expand description
What differs at a Difference’s location.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Malformed
A program could not be materialized into canonical form, so the comparison is undefined for it.
Fields
program: ProgramSideWhich program failed to materialize.
Settings
The programs’ settings differ.
DeclarationTable
A declaration table declares a different index set.
Fields
table: DeclarationTableThe declaration table that differs.
Count
Compared element counts differ; element names the compared list —
"rules", "subroutine rules", "conditions", "actions",
"branches", "arguments", or "elements".
Fields
Event
The compared rules’ events differ; first and second describe the
two events.
Shape
The compared nodes have different kinds, e.g. "setGlobalVariable"
vs "modifyGlobalVariable" or "number" vs "call".
Fields
Reference
Variable or subroutine references resolve to different declaration indices.
Fields
table: DeclarationTableThe declaration table the reference resolves through.
Operation
Modify operations differ ("add", "subtract", …).
Scalar
Scalar payloads differ — numbers, strings, enum members, call ids.