public void Advance(int length)
{
// The match is confirmed, add the match length to `i`,
// and consume any extra white-space characters (' ' || '\n')
// which come after that. The reason for this is that LeSS's
// grammar is mostly white-space insensitive.
_i += length;
var endIndex = _current + _chunks[_j].Length;
while (true)
{
if(_i == _inputLength)
break;
if (_i == endIndex)
{
if (_j < _chunks.Count - 1)
{
_current = endIndex;
endIndex += _chunks[++_j].Length;
}
else
break;
}
if (!char.IsWhiteSpace(_input[_i]))
break;
_i++;
}
}