public BufferingTextReader(TextReader source)
        {
            if (source == null)
            {
                throw new ArgumentNullException("source");
            }

            InnerReader = source;
            _locationTracker = new SourceLocationTracker();

            UpdateCurrentCharacter();
        }
        public BufferingTextReader(TextReader source)
        {
            if (source == null)
            {
                throw new ArgumentNullException("source");
            }

            InnerReader      = source;
            _locationTracker = new SourceLocationTracker();

            UpdateCurrentCharacter();
        }
Example #3
0
 public void ChangeStart(SourceLocation newStart)
 {
     _start = newStart;
     Span current = this;
     SourceLocationTracker tracker = new SourceLocationTracker(newStart);
     tracker.UpdateLocation(Content);
     while ((current = current.Next) != null)
     {
         current._start = tracker.CurrentLocation;
         tracker.UpdateLocation(current.Content);
     }
 }