protected int CompareTo(CharLocation other) { int num = Line.CompareTo(other.Line); if (num != 0) { return(num); } return(Column.CompareTo(other.Column)); }
static CharLocation() { Empty = new CharLocation(0, 0, -1); }
/// <summary> /// Creates instance of the class. /// </summary> /// <param name="input">Uses current position of the <see cref="ICharStream"/> to calculate start and end of the interval.</param> public Interval(ICharStream input) { Begin = new CharLocation(input); End = new CharLocation(input); }
/// <summary> /// Creates instance of the class. /// </summary> /// <param name="charLocation">Uses <see cref="CharLocation"/> to set start and end of the interval.</param> public Interval(CharLocation charLocation) { Begin = charLocation; End = charLocation; }
/// <summary> /// Creates instance of the class. /// </summary> /// <param name="begin">Starting position of the interval (inclusive).</param> /// <param name="end">Ending position of the interval (inclusive).</param> public Interval(CharLocation begin, CharLocation end) { Begin = begin; End = end; }