private static string GetNextWord(ref FastString script)
{
SkipWhitespace(ref script);
if (script.Length == 0)
{
return string.Empty;
}
int index = 0;
while (Char.IsLetterOrDigit(script[index]) || (script[index] == '_'))
{
index++;
if (index >= script.Length)
{
break;
}
}
if (index == 0)
{
index++;
}
if ((script[0] == ':') && (script.Length > 1) && (script[1] == ':'))
{
// Make :: into one word
index++;
}
string nextWord = script.Substring(0, index);
script = script.Substring(index);
return nextWord;
}