#[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.
Settings
The programs’ settings differ.
DeclarationTable
A declaration table declares a different index set.
Count
Compared element counts differ; element names the compared list —
"rules", "subroutine rules", "conditions", "actions",
"branches", "arguments", or "elements".
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".
Reference
Variable or subroutine references resolve to different declaration indices.
Operation
Modify operations differ ("add", "subtract", …).
Scalar
Scalar payloads differ — numbers, strings, enum members, call ids.