private static Interval <int> CreateRange(PrimitiveMatchEntry operandMatch) { return(operandMatch switch { RangeMatchEntry rangeMatch => rangeMatch.IntRange, SingleMatchEntry singleMatch => CreateRange(singleMatch.Operand, singleMatch.Operand), _ => throw new InvalidOperationException() });
private bool Equals(SingleMatchEntry other) { return(EqualityComparer <TOperand> .Default.Equals(Operand, other.Operand)); }