public LexInterval(LexBound min, LexBound max) { if (LexBound.IsVoid(min, max)) { throw new ArgumentException($"Interval must be non-void. Interval {min}..{max} is void"); } Min = min; Max = max; }
public static LexInterval To(LexBound max) => new LexInterval(LexBound.NegativeInfinity, max);
public static LexInterval From(LexBound min) => new LexInterval(min, LexBound.PositiveInfinity);