Esempio n. 1
0
        protected int CompareTo(CharLocation other)
        {
            int num = Line.CompareTo(other.Line);

            if (num != 0)
            {
                return(num);
            }
            return(Column.CompareTo(other.Column));
        }
Esempio n. 2
0
 static CharLocation()
 {
     Empty = new CharLocation(0, 0, -1);
 }
Esempio n. 3
0
 /// <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);
 }
Esempio n. 4
0
 /// <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;
 }
Esempio n. 5
0
 /// <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;
 }