static bool IsIdentifier(string text, int index) { if (index < 0 || index >= text.Length) return false; return char.IsLetterOrDigit(text[index]); }