private string GetNextToken()
{
if (Text == null) return null;
StartIndex = StopIndex = 0;
Quoted = false;
LineComment = false;
while (Pos < Text.Length)
{
if (BlockComment)
return ExtractComment();
char c = Text[Pos++];
if (Char.IsWhiteSpace(c) && StartIndex == 0) continue;
StartIndex = Pos - 1;
if (IsQuoteCharacter(c) && !BlockComment)
return ExtractQuotedToken(c);
string comment = null;
if (Pos != Text.Length)
{
comment = ReadComment(c);
}
if (comment != null && ReturnComments) return comment;
return ExtractUnquotedToken();
}
return null;
}