code: @Private Location scanTo(int index) {
      boolean eof = false;
      if (index == source.length()) { // The eof has index size() + 1
        eof = true;
        index--;
      }
      int columnIndex = nextColumnIndex;
      for (int i = nextIndex; i <= index; i++) {
        char c = source.charAt(i);
        if (c == LINE_BREAK) {
          lineBreakIndices.add(i);
          columnIndex = 0;
        }
        else columnIndex++;
      }
      this.nextIndex = index + 1;
      this.nextColumnIndex = columnIndex;
      int lines = lineBreakIndices.size();
      if (eof) return location(lines, columnIndex);
      if (columnIndex == 0) return getLineBreakLocation(lines - 1);
      return location(lines, columnIndex - 1);
    }
docs: Scans from {@code nextIndex} to {@code ind} and saves all indices of line break characters
  into {@code lineBreakIndices} and adjusts the current column number as it goes. The location of
  the character on {@code ind} is returned.
  
  <p> After this method returns, {@code nextIndex} and {@code nextColumnIndex} will point to the
  next character to be scanned or the EOF if the end of input is encountered.