public string TranslatePosition()
{
int LinesCount = 1;
int CharactersCount = 1;
int CurrentIndex = 0;
while ( CurrentIndex < m_PositionStart )
{
char CharAtIndex = m_Source[CurrentIndex++];
if ( CharAtIndex == '\n' )
{
LinesCount++;
CharactersCount = 1;
}
else
CharactersCount++;
}
return "line #" + LinesCount + " char #" + CharactersCount;
}