/// <summary> /// True if the text is a keyword that can be an identifier. /// </summary> public static bool IsKeywordThatCanBeIdentifier(string text) => SyntaxFacts.TryGetKind(text, out var kind) && kind.GetCategory() == SyntaxCategory.Keyword && SyntaxFacts.CanBeIdentifier(kind);