private static bool IncrementIndexToSkipAnyComments(FastString script, ref int index)
{
while (index < script.Length - 1 && (script[index] == '/'))
{
if ((script[index + 1] == '/'))
{
index = script.IndexOf('\r', index + 2);
if (index < 0)
{
index = script.Length;
}
}
else
{
if ((script[index + 1] == '*'))
{
index = script.IndexOf("*/", index + 2);
if (index < 0)
{
index = script.Length;
}
}
else
{
break;
}
}
}
return index == script.Length;
}