code: public void adjustBeginLineColumn (final int nNewLine, final int newCol)
    {
      int start = m_nTokenBegin;
      int newLine = nNewLine;
      int len;
  
      if (m_nBufpos >= m_nTokenBegin)
      {
        len = m_nBufpos - m_nTokenBegin + m_nInBuf + 1;
      }
      else
      {
        len = m_nBufsize - m_nTokenBegin + m_nBufpos + 1 + m_nInBuf;
      }
  
      int nIdx = 0;
      int j = 0;
      int nextColDiff = 0;
      int columnDiff = 0;
  
      while (true)
      {
        if (nIdx >= len)
          break;
        j = start % m_nBufsize;
        ++start;
        final int k = start % m_nBufsize;
        if (m_aBufLine[j] != m_aBufLine[k])
          break;
  
        m_aBufLine[j] = newLine;
        nextColDiff = columnDiff + m_aBufColumn[k] - m_aBufColumn[j];
        m_aBufColumn[j] = newCol + columnDiff;
        columnDiff = nextColDiff;
        nIdx++;
      }
  
      if (nIdx < len)
      {
        m_aBufLine[j] = newLine++;
        m_aBufColumn[j] = newCol + columnDiff;
  
        while (nIdx++ < len)
        {
          j = start % m_nBufsize;
          ++start;
          final int k = start % m_nBufsize;
          if (m_aBufLine[j] != m_aBufLine[k])
            m_aBufLine[j] = newLine++;
          else
            m_aBufLine[j] = newLine;
        }
      }
  
      m_nLine = m_aBufLine[j];
      m_nColumn = m_aBufColumn[j];
    }
docs: Method to adjust line and column numbers for the start of a token.
  
  @param nNewLine
  line index
  @param newCol
  column index