Ejemplo n.º 1
0
 /// <summary>
 /// Read characters from a byte stream, and provide line and column number of the characters.
 /// As it is "source" reader, it will ignore comments.
 /// </summary>
 /// <param name="sourceStream">the stream to be read</param>
 public SourceReader(Stream sourceStream)
 {
     _reader    = new StreamReader(sourceStream);
     Cursor     = new CursorLocation();
     LastCursor = new CursorLocation();
     _meetCr    = false;
 }
Ejemplo n.º 2
0
 public void CopyFrom(CursorLocation loc)
 {
     Line   = loc.Line;
     Column = loc.Column;
 }
Ejemplo n.º 3
0
 protected bool Equals(CursorLocation other)
 {
     return(Line == other.Line && Column == other.Column);
 }