/// <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; }
public void CopyFrom(CursorLocation loc) { Line = loc.Line; Column = loc.Column; }
protected bool Equals(CursorLocation other) { return(Line == other.Line && Column == other.Column); }