957 references to SyntaxKind
Microsoft.CodeAnalysis.CSharp.ExpressionEvaluator.ResultProvider (957)
CSharpFormatter.TypeNames.cs (2)
19return SyntaxFacts.GetKeywordKind(identifier) != SyntaxKind.None || SyntaxFacts.GetContextualKeywordKind(identifier) != SyntaxKind.None;
Placeholders.cs (1)
14/// Required by <see cref="SyntaxKind"/>.
SyntaxKindFacts.cs (954)
11public static bool IsKeywordKind(SyntaxKind kind) 16public static IEnumerable<SyntaxKind> GetReservedKeywordKinds() 18for (int i = (int)SyntaxKind.BoolKeyword; i <= (int)SyntaxKind.ImplicitKeyword; i++) 20yield return (SyntaxKind)i; 24public static IEnumerable<SyntaxKind> GetKeywordKinds() 26foreach (var reserved in GetReservedKeywordKinds()) 31foreach (var contextual in GetContextualKeywordKinds()) 37public static bool IsReservedKeyword(SyntaxKind kind) 39return kind >= SyntaxKind.BoolKeyword && kind <= SyntaxKind.ImplicitKeyword; 42public static bool IsAttributeTargetSpecifier(SyntaxKind kind) 46case SyntaxKind.AssemblyKeyword: 47case SyntaxKind.ModuleKeyword: 54public static bool IsAccessibilityModifier(SyntaxKind kind) 58case SyntaxKind.PrivateKeyword: 59case SyntaxKind.ProtectedKeyword: 60case SyntaxKind.InternalKeyword: 61case SyntaxKind.PublicKeyword: 68public static bool IsPreprocessorKeyword(SyntaxKind kind) 72case SyntaxKind.TrueKeyword: 73case SyntaxKind.FalseKeyword: 74case SyntaxKind.DefaultKeyword: 75case SyntaxKind.IfKeyword: 76case SyntaxKind.ElseKeyword: 77case SyntaxKind.ElifKeyword: 78case SyntaxKind.EndIfKeyword: 79case SyntaxKind.RegionKeyword: 80case SyntaxKind.EndRegionKeyword: 81case SyntaxKind.DefineKeyword: 82case SyntaxKind.UndefKeyword: 83case SyntaxKind.WarningKeyword: 84case SyntaxKind.ErrorKeyword: 85case SyntaxKind.LineKeyword: 86case SyntaxKind.PragmaKeyword: 87case SyntaxKind.HiddenKeyword: 88case SyntaxKind.ChecksumKeyword: 89case SyntaxKind.DisableKeyword: 90case SyntaxKind.RestoreKeyword: 91case SyntaxKind.ReferenceKeyword: 92case SyntaxKind.LoadKeyword: 93case SyntaxKind.NullableKeyword: 94case SyntaxKind.EnableKeyword: 95case SyntaxKind.WarningsKeyword: 96case SyntaxKind.AnnotationsKeyword: 112internal static bool IsPreprocessorContextualKeyword(SyntaxKind kind) 116case SyntaxKind.TrueKeyword: 117case SyntaxKind.FalseKeyword: 118case SyntaxKind.DefaultKeyword: 119case SyntaxKind.HiddenKeyword: 120case SyntaxKind.ChecksumKeyword: 121case SyntaxKind.DisableKeyword: 122case SyntaxKind.RestoreKeyword: 123case SyntaxKind.EnableKeyword: 124case SyntaxKind.WarningsKeyword: 125case SyntaxKind.AnnotationsKeyword: 132public static IEnumerable<SyntaxKind> GetPreprocessorKeywordKinds() 134yield return SyntaxKind.TrueKeyword; 135yield return SyntaxKind.FalseKeyword; 136yield return SyntaxKind.DefaultKeyword; 137yield return SyntaxKind.HiddenKeyword; 138for (int i = (int)SyntaxKind.ElifKeyword; i <= (int)SyntaxKind.RestoreKeyword; i++) 140yield return (SyntaxKind)i; 144public static bool IsPunctuation(SyntaxKind kind) 146return kind >= SyntaxKind.TildeToken && kind <= SyntaxKind.GreaterThanGreaterThanGreaterThanEqualsToken; 149public static bool IsLanguagePunctuation(SyntaxKind kind) 154public static bool IsPreprocessorPunctuation(SyntaxKind kind) 156return kind == SyntaxKind.HashToken; 159private static bool IsDebuggerSpecialPunctuation(SyntaxKind kind) 162return kind == SyntaxKind.DollarToken; 165public static IEnumerable<SyntaxKind> GetPunctuationKinds() 167for (int i = (int)SyntaxKind.TildeToken; i <= (int)SyntaxKind.GreaterThanGreaterThanGreaterThanEqualsToken; i++) 169yield return (SyntaxKind)i; 173public static bool IsPunctuationOrKeyword(SyntaxKind kind) 175return kind >= SyntaxKind.TildeToken && kind <= SyntaxKind.EndOfFileToken; 178internal static bool IsLiteral(SyntaxKind kind) 182case SyntaxKind.IdentifierToken: 183case SyntaxKind.StringLiteralToken: 184case SyntaxKind.Utf8StringLiteralToken: 185case SyntaxKind.SingleLineRawStringLiteralToken: 186case SyntaxKind.Utf8SingleLineRawStringLiteralToken: 187case SyntaxKind.MultiLineRawStringLiteralToken: 188case SyntaxKind.Utf8MultiLineRawStringLiteralToken: 189case SyntaxKind.CharacterLiteralToken: 190case SyntaxKind.NumericLiteralToken: 191case SyntaxKind.XmlTextLiteralToken: 192case SyntaxKind.XmlTextLiteralNewLineToken: 193case SyntaxKind.XmlEntityLiteralToken: 200public static bool IsAnyToken(SyntaxKind kind) 202if (kind >= SyntaxKind.TildeToken && kind < SyntaxKind.EndOfLineTrivia) return true; 205case SyntaxKind.InterpolatedStringToken: 206case SyntaxKind.InterpolatedStringStartToken: 207case SyntaxKind.InterpolatedVerbatimStringStartToken: 208case SyntaxKind.InterpolatedMultiLineRawStringStartToken: 209case SyntaxKind.InterpolatedSingleLineRawStringStartToken: 210case SyntaxKind.InterpolatedStringTextToken: 211case SyntaxKind.InterpolatedStringEndToken: 212case SyntaxKind.InterpolatedRawStringEndToken: 213case SyntaxKind.LoadKeyword: 214case SyntaxKind.NullableKeyword: 215case SyntaxKind.EnableKeyword: 216case SyntaxKind.UnderscoreToken: 217case SyntaxKind.MultiLineRawStringLiteralToken: 218case SyntaxKind.SingleLineRawStringLiteralToken: 225public static bool IsTrivia(SyntaxKind kind) 229case SyntaxKind.EndOfLineTrivia: 230case SyntaxKind.WhitespaceTrivia: 231case SyntaxKind.SingleLineCommentTrivia: 232case SyntaxKind.MultiLineCommentTrivia: 233case SyntaxKind.SingleLineDocumentationCommentTrivia: 234case SyntaxKind.MultiLineDocumentationCommentTrivia: 235case SyntaxKind.DisabledTextTrivia: 236case SyntaxKind.DocumentationCommentExteriorTrivia: 237case SyntaxKind.ConflictMarkerTrivia: 244public static bool IsPreprocessorDirective(SyntaxKind kind) 248case SyntaxKind.IfDirectiveTrivia: 249case SyntaxKind.ElifDirectiveTrivia: 250case SyntaxKind.ElseDirectiveTrivia: 251case SyntaxKind.EndIfDirectiveTrivia: 252case SyntaxKind.RegionDirectiveTrivia: 253case SyntaxKind.EndRegionDirectiveTrivia: 254case SyntaxKind.DefineDirectiveTrivia: 255case SyntaxKind.UndefDirectiveTrivia: 256case SyntaxKind.ErrorDirectiveTrivia: 257case SyntaxKind.WarningDirectiveTrivia: 258case SyntaxKind.LineDirectiveTrivia: 259case SyntaxKind.LineSpanDirectiveTrivia: 260case SyntaxKind.PragmaWarningDirectiveTrivia: 261case SyntaxKind.PragmaChecksumDirectiveTrivia: 262case SyntaxKind.ReferenceDirectiveTrivia: 263case SyntaxKind.LoadDirectiveTrivia: 264case SyntaxKind.BadDirectiveTrivia: 265case SyntaxKind.ShebangDirectiveTrivia: 266case SyntaxKind.NullableDirectiveTrivia: 273public static bool IsName(SyntaxKind kind) 277case SyntaxKind.IdentifierName: 278case SyntaxKind.GenericName: 279case SyntaxKind.QualifiedName: 280case SyntaxKind.AliasQualifiedName: 287public static bool IsPredefinedType(SyntaxKind kind) 291case SyntaxKind.BoolKeyword: 292case SyntaxKind.ByteKeyword: 293case SyntaxKind.SByteKeyword: 294case SyntaxKind.IntKeyword: 295case SyntaxKind.UIntKeyword: 296case SyntaxKind.ShortKeyword: 297case SyntaxKind.UShortKeyword: 298case SyntaxKind.LongKeyword: 299case SyntaxKind.ULongKeyword: 300case SyntaxKind.FloatKeyword: 301case SyntaxKind.DoubleKeyword: 302case SyntaxKind.DecimalKeyword: 303case SyntaxKind.StringKeyword: 304case SyntaxKind.CharKeyword: 305case SyntaxKind.ObjectKeyword: 306case SyntaxKind.VoidKeyword: 313public static bool IsTypeSyntax(SyntaxKind kind) 317case SyntaxKind.ArrayType: 318case SyntaxKind.PointerType: 319case SyntaxKind.NullableType: 320case SyntaxKind.PredefinedType: 321case SyntaxKind.TupleType: 322case SyntaxKind.FunctionPointerType: 332public static bool IsGlobalMemberDeclaration(SyntaxKind kind) 336case SyntaxKind.GlobalStatement: 337case SyntaxKind.FieldDeclaration: 338case SyntaxKind.MethodDeclaration: 339case SyntaxKind.PropertyDeclaration: 340case SyntaxKind.EventDeclaration: 341case SyntaxKind.EventFieldDeclaration: 347public static bool IsTypeDeclaration(SyntaxKind kind) 351case SyntaxKind.ClassDeclaration: 352case SyntaxKind.StructDeclaration: 353case SyntaxKind.InterfaceDeclaration: 354case SyntaxKind.DelegateDeclaration: 355case SyntaxKind.EnumDeclaration: 356case SyntaxKind.RecordDeclaration: 357case SyntaxKind.RecordStructDeclaration: 365public static bool IsNamespaceMemberDeclaration(SyntaxKind kind) 367kind == SyntaxKind.NamespaceDeclaration || 368kind == SyntaxKind.FileScopedNamespaceDeclaration; 370public static bool IsAnyUnaryExpression(SyntaxKind token) 375public static bool IsPrefixUnaryExpression(SyntaxKind token) 377return GetPrefixUnaryExpression(token) != SyntaxKind.None; 380public static bool IsPrefixUnaryExpressionOperatorToken(SyntaxKind token) 382return GetPrefixUnaryExpression(token) != SyntaxKind.None; 385public static SyntaxKind GetPrefixUnaryExpression(SyntaxKind token) 389case SyntaxKind.PlusToken: 390return SyntaxKind.UnaryPlusExpression; 391case SyntaxKind.MinusToken: 392return SyntaxKind.UnaryMinusExpression; 393case SyntaxKind.TildeToken: 394return SyntaxKind.BitwiseNotExpression; 395case SyntaxKind.ExclamationToken: 396return SyntaxKind.LogicalNotExpression; 397case SyntaxKind.PlusPlusToken: 398return SyntaxKind.PreIncrementExpression; 399case SyntaxKind.MinusMinusToken: 400return SyntaxKind.PreDecrementExpression; 401case SyntaxKind.AmpersandToken: 402return SyntaxKind.AddressOfExpression; 403case SyntaxKind.AsteriskToken: 404return SyntaxKind.PointerIndirectionExpression; 405case SyntaxKind.CaretToken: 406return SyntaxKind.IndexExpression; 408return SyntaxKind.None; 412public static bool IsPostfixUnaryExpression(SyntaxKind token) 414return GetPostfixUnaryExpression(token) != SyntaxKind.None; 417public static bool IsPostfixUnaryExpressionToken(SyntaxKind token) 419return GetPostfixUnaryExpression(token) != SyntaxKind.None; 422public static SyntaxKind GetPostfixUnaryExpression(SyntaxKind token) 426case SyntaxKind.PlusPlusToken: 427return SyntaxKind.PostIncrementExpression; 428case SyntaxKind.MinusMinusToken: 429return SyntaxKind.PostDecrementExpression; 430case SyntaxKind.ExclamationToken: 431return SyntaxKind.SuppressNullableWarningExpression; 433return SyntaxKind.None; 437internal static bool IsIncrementOrDecrementOperator(SyntaxKind token) 441case SyntaxKind.PlusPlusToken: 442case SyntaxKind.MinusMinusToken: 449public static bool IsUnaryOperatorDeclarationToken(SyntaxKind token) 452token == SyntaxKind.TrueKeyword || 453token == SyntaxKind.FalseKeyword; 456public static bool IsAnyOverloadableOperator(SyntaxKind kind) 461public static bool IsOverloadableBinaryOperator(SyntaxKind kind) 465case SyntaxKind.PlusToken: 466case SyntaxKind.MinusToken: 467case SyntaxKind.AsteriskToken: 468case SyntaxKind.SlashToken: 469case SyntaxKind.PercentToken: 470case SyntaxKind.CaretToken: 471case SyntaxKind.AmpersandToken: 472case SyntaxKind.BarToken: 473case SyntaxKind.EqualsEqualsToken: 474case SyntaxKind.LessThanToken: 475case SyntaxKind.LessThanEqualsToken: 476case SyntaxKind.LessThanLessThanToken: 477case SyntaxKind.GreaterThanToken: 478case SyntaxKind.GreaterThanEqualsToken: 479case SyntaxKind.GreaterThanGreaterThanToken: 480case SyntaxKind.GreaterThanGreaterThanGreaterThanToken: 481case SyntaxKind.ExclamationEqualsToken: 488public static bool IsOverloadableUnaryOperator(SyntaxKind kind) 492case SyntaxKind.PlusToken: 493case SyntaxKind.MinusToken: 494case SyntaxKind.TildeToken: 495case SyntaxKind.ExclamationToken: 496case SyntaxKind.PlusPlusToken: 497case SyntaxKind.MinusMinusToken: 498case SyntaxKind.TrueKeyword: 499case SyntaxKind.FalseKeyword: 506public static bool IsPrimaryFunction(SyntaxKind keyword) 508return GetPrimaryFunction(keyword) != SyntaxKind.None; 511public static SyntaxKind GetPrimaryFunction(SyntaxKind keyword) 515case SyntaxKind.MakeRefKeyword: 516return SyntaxKind.MakeRefExpression; 517case SyntaxKind.RefTypeKeyword: 518return SyntaxKind.RefTypeExpression; 519case SyntaxKind.RefValueKeyword: 520return SyntaxKind.RefValueExpression; 521case SyntaxKind.CheckedKeyword: 522return SyntaxKind.CheckedExpression; 523case SyntaxKind.UncheckedKeyword: 524return SyntaxKind.UncheckedExpression; 525case SyntaxKind.DefaultKeyword: 526return SyntaxKind.DefaultExpression; 527case SyntaxKind.TypeOfKeyword: 528return SyntaxKind.TypeOfExpression; 529case SyntaxKind.SizeOfKeyword: 530return SyntaxKind.SizeOfExpression; 532return SyntaxKind.None; 536public static bool IsLiteralExpression(SyntaxKind token) 538return GetLiteralExpression(token) != SyntaxKind.None; 541public static SyntaxKind GetLiteralExpression(SyntaxKind token) 545SyntaxKind.StringLiteralToken => SyntaxKind.StringLiteralExpression, 546SyntaxKind.Utf8StringLiteralToken => SyntaxKind.Utf8StringLiteralExpression, 547SyntaxKind.SingleLineRawStringLiteralToken => SyntaxKind.StringLiteralExpression, 548SyntaxKind.Utf8SingleLineRawStringLiteralToken => SyntaxKind.Utf8StringLiteralExpression, 549SyntaxKind.MultiLineRawStringLiteralToken => SyntaxKind.StringLiteralExpression, 550SyntaxKind.Utf8MultiLineRawStringLiteralToken => SyntaxKind.Utf8StringLiteralExpression, 551SyntaxKind.CharacterLiteralToken => SyntaxKind.CharacterLiteralExpression, 552SyntaxKind.NumericLiteralToken => SyntaxKind.NumericLiteralExpression, 553SyntaxKind.NullKeyword => SyntaxKind.NullLiteralExpression, 554SyntaxKind.TrueKeyword => SyntaxKind.TrueLiteralExpression, 555SyntaxKind.FalseKeyword => SyntaxKind.FalseLiteralExpression, 556SyntaxKind.ArgListKeyword => SyntaxKind.ArgListExpression, 557_ => SyntaxKind.None, 561public static bool IsInstanceExpression(SyntaxKind token) 563return GetInstanceExpression(token) != SyntaxKind.None; 566public static SyntaxKind GetInstanceExpression(SyntaxKind token) 570case SyntaxKind.ThisKeyword: 571return SyntaxKind.ThisExpression; 572case SyntaxKind.BaseKeyword: 573return SyntaxKind.BaseExpression; 575return SyntaxKind.None; 579public static bool IsBinaryExpression(SyntaxKind token) 581return GetBinaryExpression(token) != SyntaxKind.None; 584public static bool IsBinaryExpressionOperatorToken(SyntaxKind token) 586return GetBinaryExpression(token) != SyntaxKind.None; 589public static SyntaxKind GetBinaryExpression(SyntaxKind token) 593case SyntaxKind.QuestionQuestionToken: 594return SyntaxKind.CoalesceExpression; 595case SyntaxKind.IsKeyword: 596return SyntaxKind.IsExpression; 597case SyntaxKind.AsKeyword: 598return SyntaxKind.AsExpression; 599case SyntaxKind.BarToken: 600return SyntaxKind.BitwiseOrExpression; 601case SyntaxKind.CaretToken: 602return SyntaxKind.ExclusiveOrExpression; 603case SyntaxKind.AmpersandToken: 604return SyntaxKind.BitwiseAndExpression; 605case SyntaxKind.EqualsEqualsToken: 606return SyntaxKind.EqualsExpression; 607case SyntaxKind.ExclamationEqualsToken: 608return SyntaxKind.NotEqualsExpression; 609case SyntaxKind.LessThanToken: 610return SyntaxKind.LessThanExpression; 611case SyntaxKind.LessThanEqualsToken: 612return SyntaxKind.LessThanOrEqualExpression; 613case SyntaxKind.GreaterThanToken: 614return SyntaxKind.GreaterThanExpression; 615case SyntaxKind.GreaterThanEqualsToken: 616return SyntaxKind.GreaterThanOrEqualExpression; 617case SyntaxKind.LessThanLessThanToken: 618return SyntaxKind.LeftShiftExpression; 619case SyntaxKind.GreaterThanGreaterThanToken: 620return SyntaxKind.RightShiftExpression; 621case SyntaxKind.GreaterThanGreaterThanGreaterThanToken: 622return SyntaxKind.UnsignedRightShiftExpression; 623case SyntaxKind.PlusToken: 624return SyntaxKind.AddExpression; 625case SyntaxKind.MinusToken: 626return SyntaxKind.SubtractExpression; 627case SyntaxKind.AsteriskToken: 628return SyntaxKind.MultiplyExpression; 629case SyntaxKind.SlashToken: 630return SyntaxKind.DivideExpression; 631case SyntaxKind.PercentToken: 632return SyntaxKind.ModuloExpression; 633case SyntaxKind.AmpersandAmpersandToken: 634return SyntaxKind.LogicalAndExpression; 635case SyntaxKind.BarBarToken: 636return SyntaxKind.LogicalOrExpression; 638return SyntaxKind.None; 642public static bool IsAssignmentExpression(SyntaxKind kind) 646case SyntaxKind.CoalesceAssignmentExpression: 647case SyntaxKind.OrAssignmentExpression: 648case SyntaxKind.AndAssignmentExpression: 649case SyntaxKind.ExclusiveOrAssignmentExpression: 650case SyntaxKind.LeftShiftAssignmentExpression: 651case SyntaxKind.RightShiftAssignmentExpression: 652case SyntaxKind.UnsignedRightShiftAssignmentExpression: 653case SyntaxKind.AddAssignmentExpression: 654case SyntaxKind.SubtractAssignmentExpression: 655case SyntaxKind.MultiplyAssignmentExpression: 656case SyntaxKind.DivideAssignmentExpression: 657case SyntaxKind.ModuloAssignmentExpression: 658case SyntaxKind.SimpleAssignmentExpression: 665public static bool IsAssignmentExpressionOperatorToken(SyntaxKind token) 669case SyntaxKind.QuestionQuestionEqualsToken: 670case SyntaxKind.BarEqualsToken: 671case SyntaxKind.AmpersandEqualsToken: 672case SyntaxKind.CaretEqualsToken: 673case SyntaxKind.LessThanLessThanEqualsToken: 674case SyntaxKind.GreaterThanGreaterThanEqualsToken: 675case SyntaxKind.GreaterThanGreaterThanGreaterThanEqualsToken: 676case SyntaxKind.PlusEqualsToken: 677case SyntaxKind.MinusEqualsToken: 678case SyntaxKind.AsteriskEqualsToken: 679case SyntaxKind.SlashEqualsToken: 680case SyntaxKind.PercentEqualsToken: 681case SyntaxKind.EqualsToken: 688public static SyntaxKind GetAssignmentExpression(SyntaxKind token) 692case SyntaxKind.BarEqualsToken: 693return SyntaxKind.OrAssignmentExpression; 694case SyntaxKind.AmpersandEqualsToken: 695return SyntaxKind.AndAssignmentExpression; 696case SyntaxKind.CaretEqualsToken: 697return SyntaxKind.ExclusiveOrAssignmentExpression; 698case SyntaxKind.LessThanLessThanEqualsToken: 699return SyntaxKind.LeftShiftAssignmentExpression; 700case SyntaxKind.GreaterThanGreaterThanEqualsToken: 701return SyntaxKind.RightShiftAssignmentExpression; 702case SyntaxKind.GreaterThanGreaterThanGreaterThanEqualsToken: 703return SyntaxKind.UnsignedRightShiftAssignmentExpression; 704case SyntaxKind.PlusEqualsToken: 705return SyntaxKind.AddAssignmentExpression; 706case SyntaxKind.MinusEqualsToken: 707return SyntaxKind.SubtractAssignmentExpression; 708case SyntaxKind.AsteriskEqualsToken: 709return SyntaxKind.MultiplyAssignmentExpression; 710case SyntaxKind.SlashEqualsToken: 711return SyntaxKind.DivideAssignmentExpression; 712case SyntaxKind.PercentEqualsToken: 713return SyntaxKind.ModuloAssignmentExpression; 714case SyntaxKind.EqualsToken: 715return SyntaxKind.SimpleAssignmentExpression; 716case SyntaxKind.QuestionQuestionEqualsToken: 717return SyntaxKind.CoalesceAssignmentExpression; 719return SyntaxKind.None; 723public static SyntaxKind GetCheckStatement(SyntaxKind keyword) 727case SyntaxKind.CheckedKeyword: 728return SyntaxKind.CheckedStatement; 729case SyntaxKind.UncheckedKeyword: 730return SyntaxKind.UncheckedStatement; 732return SyntaxKind.None; 736public static SyntaxKind GetAccessorDeclarationKind(SyntaxKind keyword) 740case SyntaxKind.GetKeyword: 741return SyntaxKind.GetAccessorDeclaration; 742case SyntaxKind.SetKeyword: 743return SyntaxKind.SetAccessorDeclaration; 744case SyntaxKind.InitKeyword: 745return SyntaxKind.InitAccessorDeclaration; 746case SyntaxKind.AddKeyword: 747return SyntaxKind.AddAccessorDeclaration; 748case SyntaxKind.RemoveKeyword: 749return SyntaxKind.RemoveAccessorDeclaration; 751return SyntaxKind.None; 755public static bool IsAccessorDeclaration(SyntaxKind kind) 759case SyntaxKind.GetAccessorDeclaration: 760case SyntaxKind.SetAccessorDeclaration: 761case SyntaxKind.InitAccessorDeclaration: 762case SyntaxKind.AddAccessorDeclaration: 763case SyntaxKind.RemoveAccessorDeclaration: 770public static bool IsAccessorDeclarationKeyword(SyntaxKind keyword) 774case SyntaxKind.GetKeyword: 775case SyntaxKind.SetKeyword: 776case SyntaxKind.InitKeyword: 777case SyntaxKind.AddKeyword: 778case SyntaxKind.RemoveKeyword: 785public static SyntaxKind GetSwitchLabelKind(SyntaxKind keyword) 789case SyntaxKind.CaseKeyword: 790return SyntaxKind.CaseSwitchLabel; 791case SyntaxKind.DefaultKeyword: 792return SyntaxKind.DefaultSwitchLabel; 794return SyntaxKind.None; 798public static SyntaxKind GetBaseTypeDeclarationKind(SyntaxKind kind) 800return kind == SyntaxKind.EnumKeyword ? SyntaxKind.EnumDeclaration : GetTypeDeclarationKind(kind); 803public static SyntaxKind GetTypeDeclarationKind(SyntaxKind kind) 807case SyntaxKind.ClassKeyword: 808return SyntaxKind.ClassDeclaration; 809case SyntaxKind.StructKeyword: 810return SyntaxKind.StructDeclaration; 811case SyntaxKind.InterfaceKeyword: 812return SyntaxKind.InterfaceDeclaration; 813case SyntaxKind.RecordKeyword: 814return SyntaxKind.RecordDeclaration; 816return SyntaxKind.None; 820public static SyntaxKind GetKeywordKind(string text) 825return SyntaxKind.BoolKeyword; 827return SyntaxKind.ByteKeyword; 829return SyntaxKind.SByteKeyword; 831return SyntaxKind.ShortKeyword; 833return SyntaxKind.UShortKeyword; 835return SyntaxKind.IntKeyword; 837return SyntaxKind.UIntKeyword; 839return SyntaxKind.LongKeyword; 841return SyntaxKind.ULongKeyword; 843return SyntaxKind.DoubleKeyword; 845return SyntaxKind.FloatKeyword; 847return SyntaxKind.DecimalKeyword; 849return SyntaxKind.StringKeyword; 851return SyntaxKind.CharKeyword; 853return SyntaxKind.VoidKeyword; 855return SyntaxKind.ObjectKeyword; 857return SyntaxKind.TypeOfKeyword; 859return SyntaxKind.SizeOfKeyword; 861return SyntaxKind.NullKeyword; 863return SyntaxKind.TrueKeyword; 865return SyntaxKind.FalseKeyword; 867return SyntaxKind.IfKeyword; 869return SyntaxKind.ElseKeyword; 871return SyntaxKind.WhileKeyword; 873return SyntaxKind.ForKeyword; 875return SyntaxKind.ForEachKeyword; 877return SyntaxKind.DoKeyword; 879return SyntaxKind.SwitchKeyword; 881return SyntaxKind.CaseKeyword; 883return SyntaxKind.DefaultKeyword; 885return SyntaxKind.LockKeyword; 887return SyntaxKind.TryKeyword; 889return SyntaxKind.ThrowKeyword; 891return SyntaxKind.CatchKeyword; 893return SyntaxKind.FinallyKeyword; 895return SyntaxKind.GotoKeyword; 897return SyntaxKind.BreakKeyword; 899return SyntaxKind.ContinueKeyword; 901return SyntaxKind.ReturnKeyword; 903return SyntaxKind.PublicKeyword; 905return SyntaxKind.PrivateKeyword; 907return SyntaxKind.InternalKeyword; 909return SyntaxKind.ProtectedKeyword; 911return SyntaxKind.StaticKeyword; 913return SyntaxKind.ReadOnlyKeyword; 915return SyntaxKind.SealedKeyword; 917return SyntaxKind.ConstKeyword; 919return SyntaxKind.FixedKeyword; 921return SyntaxKind.StackAllocKeyword; 923return SyntaxKind.VolatileKeyword; 925return SyntaxKind.NewKeyword; 927return SyntaxKind.OverrideKeyword; 929return SyntaxKind.AbstractKeyword; 931return SyntaxKind.VirtualKeyword; 933return SyntaxKind.EventKeyword; 935return SyntaxKind.ExternKeyword; 937return SyntaxKind.RefKeyword; 939return SyntaxKind.OutKeyword; 941return SyntaxKind.InKeyword; 943return SyntaxKind.IsKeyword; 945return SyntaxKind.AsKeyword; 947return SyntaxKind.ParamsKeyword; 949return SyntaxKind.ArgListKeyword; 951return SyntaxKind.MakeRefKeyword; 953return SyntaxKind.RefTypeKeyword; 955return SyntaxKind.RefValueKeyword; 957return SyntaxKind.ThisKeyword; 959return SyntaxKind.BaseKeyword; 961return SyntaxKind.NamespaceKeyword; 963return SyntaxKind.UsingKeyword; 965return SyntaxKind.ClassKeyword; 967return SyntaxKind.StructKeyword; 969return SyntaxKind.InterfaceKeyword; 971return SyntaxKind.EnumKeyword; 973return SyntaxKind.DelegateKeyword; 975return SyntaxKind.CheckedKeyword; 977return SyntaxKind.UncheckedKeyword; 979return SyntaxKind.UnsafeKeyword; 981return SyntaxKind.OperatorKeyword; 983return SyntaxKind.ImplicitKeyword; 985return SyntaxKind.ExplicitKeyword; 987return SyntaxKind.None; 991public static SyntaxKind GetOperatorKind(string operatorMetadataName) 997return SyntaxKind.PlusToken; 999case WellKnownMemberNames.BitwiseAndOperatorName: return SyntaxKind.AmpersandToken; 1000case WellKnownMemberNames.BitwiseOrOperatorName: return SyntaxKind.BarToken; 1005return SyntaxKind.MinusMinusToken; 1009return SyntaxKind.SlashToken; 1011case WellKnownMemberNames.EqualityOperatorName: return SyntaxKind.EqualsEqualsToken; 1012case WellKnownMemberNames.ExclusiveOrOperatorName: return SyntaxKind.CaretToken; 1016return SyntaxKind.ExplicitKeyword; 1019case WellKnownMemberNames.FalseOperatorName: return SyntaxKind.FalseKeyword; 1020case WellKnownMemberNames.GreaterThanOperatorName: return SyntaxKind.GreaterThanToken; 1021case WellKnownMemberNames.GreaterThanOrEqualOperatorName: return SyntaxKind.GreaterThanEqualsToken; 1022case WellKnownMemberNames.ImplicitConversionName: return SyntaxKind.ImplicitKeyword; 1026return SyntaxKind.PlusPlusToken; 1028case WellKnownMemberNames.InequalityOperatorName: return SyntaxKind.ExclamationEqualsToken; 1030case WellKnownMemberNames.LeftShiftOperatorName: return SyntaxKind.LessThanLessThanToken; 1031case WellKnownMemberNames.LessThanOperatorName: return SyntaxKind.LessThanToken; 1032case WellKnownMemberNames.LessThanOrEqualOperatorName: return SyntaxKind.LessThanEqualsToken; 1034case WellKnownMemberNames.LogicalNotOperatorName: return SyntaxKind.ExclamationToken; 1035case WellKnownMemberNames.ModulusOperatorName: return SyntaxKind.PercentToken; 1039return SyntaxKind.AsteriskToken; 1041case WellKnownMemberNames.OnesComplementOperatorName: return SyntaxKind.TildeToken; 1042case WellKnownMemberNames.RightShiftOperatorName: return SyntaxKind.GreaterThanGreaterThanToken; 1043case WellKnownMemberNames.UnsignedRightShiftOperatorName: return SyntaxKind.GreaterThanGreaterThanGreaterThanToken; 1047return SyntaxKind.MinusToken; 1049case WellKnownMemberNames.TrueOperatorName: return SyntaxKind.TrueKeyword; 1053return SyntaxKind.MinusToken; 1055case WellKnownMemberNames.UnaryPlusOperatorName: return SyntaxKind.PlusToken; 1057return SyntaxKind.None; 1080public static SyntaxKind GetPreprocessorKeywordKind(string text) 1085return SyntaxKind.TrueKeyword; 1087return SyntaxKind.FalseKeyword; 1089return SyntaxKind.DefaultKeyword; 1091return SyntaxKind.IfKeyword; 1093return SyntaxKind.ElseKeyword; 1095return SyntaxKind.ElifKeyword; 1097return SyntaxKind.EndIfKeyword; 1099return SyntaxKind.RegionKeyword; 1101return SyntaxKind.EndRegionKeyword; 1103return SyntaxKind.DefineKeyword; 1105return SyntaxKind.UndefKeyword; 1107return SyntaxKind.WarningKeyword; 1109return SyntaxKind.ErrorKeyword; 1111return SyntaxKind.LineKeyword; 1113return SyntaxKind.PragmaKeyword; 1115return SyntaxKind.HiddenKeyword; 1117return SyntaxKind.ChecksumKeyword; 1119return SyntaxKind.DisableKeyword; 1121return SyntaxKind.RestoreKeyword; 1123return SyntaxKind.ReferenceKeyword; 1125return SyntaxKind.LoadKeyword; 1127return SyntaxKind.NullableKeyword; 1129return SyntaxKind.EnableKeyword; 1131return SyntaxKind.WarningsKeyword; 1133return SyntaxKind.AnnotationsKeyword; 1135return SyntaxKind.None; 1139public static IEnumerable<SyntaxKind> GetContextualKeywordKinds() 1141for (int i = (int)SyntaxKind.YieldKeyword; i <= (int)SyntaxKind.FileKeyword; i++) 1143yield return (SyntaxKind)i; 1147public static bool IsContextualKeyword(SyntaxKind kind) 1151case SyntaxKind.YieldKeyword: 1152case SyntaxKind.PartialKeyword: 1153case SyntaxKind.FromKeyword: 1154case SyntaxKind.GroupKeyword: 1155case SyntaxKind.JoinKeyword: 1156case SyntaxKind.IntoKeyword: 1157case SyntaxKind.LetKeyword: 1158case SyntaxKind.ByKeyword: 1159case SyntaxKind.WhereKeyword: 1160case SyntaxKind.SelectKeyword: 1161case SyntaxKind.GetKeyword: 1162case SyntaxKind.SetKeyword: 1163case SyntaxKind.AddKeyword: 1164case SyntaxKind.RemoveKeyword: 1165case SyntaxKind.OrderByKeyword: 1166case SyntaxKind.AliasKeyword: 1167case SyntaxKind.OnKeyword: 1168case SyntaxKind.EqualsKeyword: 1169case SyntaxKind.AscendingKeyword: 1170case SyntaxKind.DescendingKeyword: 1171case SyntaxKind.AssemblyKeyword: 1172case SyntaxKind.ModuleKeyword: 1173case SyntaxKind.TypeKeyword: 1174case SyntaxKind.GlobalKeyword: 1175case SyntaxKind.FieldKeyword: 1176case SyntaxKind.MethodKeyword: 1177case SyntaxKind.ParamKeyword: 1178case SyntaxKind.PropertyKeyword: 1179case SyntaxKind.TypeVarKeyword: 1180case SyntaxKind.NameOfKeyword: 1181case SyntaxKind.AsyncKeyword: 1182case SyntaxKind.AwaitKeyword: 1183case SyntaxKind.WhenKeyword: 1184case SyntaxKind.UnderscoreToken: 1185case SyntaxKind.VarKeyword: 1186case SyntaxKind.OrKeyword: 1187case SyntaxKind.AndKeyword: 1188case SyntaxKind.NotKeyword: 1189case SyntaxKind.WithKeyword: 1190case SyntaxKind.InitKeyword: 1191case SyntaxKind.RecordKeyword: 1192case SyntaxKind.ManagedKeyword: 1193case SyntaxKind.UnmanagedKeyword: 1194case SyntaxKind.RequiredKeyword: 1195case SyntaxKind.ScopedKeyword: 1196case SyntaxKind.FileKeyword: 1203public static bool IsQueryContextualKeyword(SyntaxKind kind) 1207case SyntaxKind.FromKeyword: 1208case SyntaxKind.WhereKeyword: 1209case SyntaxKind.SelectKeyword: 1210case SyntaxKind.GroupKeyword: 1211case SyntaxKind.IntoKeyword: 1212case SyntaxKind.OrderByKeyword: 1213case SyntaxKind.JoinKeyword: 1214case SyntaxKind.LetKeyword: 1215case SyntaxKind.OnKeyword: 1216case SyntaxKind.EqualsKeyword: 1217case SyntaxKind.ByKeyword: 1218case SyntaxKind.AscendingKeyword: 1219case SyntaxKind.DescendingKeyword: 1226public static SyntaxKind GetContextualKeywordKind(string text) 1231return SyntaxKind.YieldKeyword; 1233return SyntaxKind.PartialKeyword; 1235return SyntaxKind.FromKeyword; 1237return SyntaxKind.GroupKeyword; 1239return SyntaxKind.JoinKeyword; 1241return SyntaxKind.IntoKeyword; 1243return SyntaxKind.LetKeyword; 1245return SyntaxKind.ByKeyword; 1247return SyntaxKind.WhereKeyword; 1249return SyntaxKind.SelectKeyword; 1251return SyntaxKind.GetKeyword; 1253return SyntaxKind.SetKeyword; 1255return SyntaxKind.AddKeyword; 1257return SyntaxKind.RemoveKeyword; 1259return SyntaxKind.OrderByKeyword; 1261return SyntaxKind.AliasKeyword; 1263return SyntaxKind.OnKeyword; 1265return SyntaxKind.EqualsKeyword; 1267return SyntaxKind.AscendingKeyword; 1269return SyntaxKind.DescendingKeyword; 1271return SyntaxKind.AssemblyKeyword; 1273return SyntaxKind.ModuleKeyword; 1275return SyntaxKind.TypeKeyword; 1277return SyntaxKind.FieldKeyword; 1279return SyntaxKind.MethodKeyword; 1281return SyntaxKind.ParamKeyword; 1283return SyntaxKind.PropertyKeyword; 1285return SyntaxKind.TypeVarKeyword; 1287return SyntaxKind.GlobalKeyword; 1289return SyntaxKind.AsyncKeyword; 1291return SyntaxKind.AwaitKeyword; 1293return SyntaxKind.WhenKeyword; 1295return SyntaxKind.NameOfKeyword; 1297return SyntaxKind.UnderscoreToken; 1299return SyntaxKind.VarKeyword; 1301return SyntaxKind.AndKeyword; 1303return SyntaxKind.OrKeyword; 1305return SyntaxKind.NotKeyword; 1307return SyntaxKind.WithKeyword; 1309return SyntaxKind.InitKeyword; 1311return SyntaxKind.RecordKeyword; 1313return SyntaxKind.ManagedKeyword; 1315return SyntaxKind.UnmanagedKeyword; 1317return SyntaxKind.RequiredKeyword; 1319return SyntaxKind.ScopedKeyword; 1321return SyntaxKind.FileKeyword; 1323return SyntaxKind.None; 1327public static string GetText(SyntaxKind kind) 1331case SyntaxKind.TildeToken: 1333case SyntaxKind.ExclamationToken: 1335case SyntaxKind.DollarToken: 1337case SyntaxKind.PercentToken: 1339case SyntaxKind.CaretToken: 1341case SyntaxKind.AmpersandToken: 1343case SyntaxKind.AsteriskToken: 1345case SyntaxKind.OpenParenToken: 1347case SyntaxKind.CloseParenToken: 1349case SyntaxKind.MinusToken: 1351case SyntaxKind.PlusToken: 1353case SyntaxKind.EqualsToken: 1355case SyntaxKind.OpenBraceToken: 1357case SyntaxKind.CloseBraceToken: 1359case SyntaxKind.OpenBracketToken: 1361case SyntaxKind.CloseBracketToken: 1363case SyntaxKind.BarToken: 1365case SyntaxKind.BackslashToken: 1367case SyntaxKind.ColonToken: 1369case SyntaxKind.SemicolonToken: 1371case SyntaxKind.DoubleQuoteToken: 1373case SyntaxKind.SingleQuoteToken: 1375case SyntaxKind.LessThanToken: 1377case SyntaxKind.CommaToken: 1379case SyntaxKind.GreaterThanToken: 1381case SyntaxKind.DotToken: 1383case SyntaxKind.QuestionToken: 1385case SyntaxKind.HashToken: 1387case SyntaxKind.SlashToken: 1389case SyntaxKind.SlashGreaterThanToken: 1391case SyntaxKind.LessThanSlashToken: 1393case SyntaxKind.XmlCommentStartToken: 1395case SyntaxKind.XmlCommentEndToken: 1397case SyntaxKind.XmlCDataStartToken: 1399case SyntaxKind.XmlCDataEndToken: 1401case SyntaxKind.XmlProcessingInstructionStartToken: 1403case SyntaxKind.XmlProcessingInstructionEndToken: 1407case SyntaxKind.BarBarToken: 1409case SyntaxKind.AmpersandAmpersandToken: 1411case SyntaxKind.MinusMinusToken: 1413case SyntaxKind.PlusPlusToken: 1415case SyntaxKind.ColonColonToken: 1417case SyntaxKind.QuestionQuestionToken: 1419case SyntaxKind.MinusGreaterThanToken: 1421case SyntaxKind.ExclamationEqualsToken: 1423case SyntaxKind.EqualsEqualsToken: 1425case SyntaxKind.EqualsGreaterThanToken: 1427case SyntaxKind.LessThanEqualsToken: 1429case SyntaxKind.LessThanLessThanToken: 1431case SyntaxKind.LessThanLessThanEqualsToken: 1433case SyntaxKind.GreaterThanEqualsToken: 1435case SyntaxKind.GreaterThanGreaterThanToken: 1437case SyntaxKind.GreaterThanGreaterThanEqualsToken: 1439case SyntaxKind.GreaterThanGreaterThanGreaterThanToken: 1441case SyntaxKind.GreaterThanGreaterThanGreaterThanEqualsToken: 1443case SyntaxKind.SlashEqualsToken: 1445case SyntaxKind.AsteriskEqualsToken: 1447case SyntaxKind.BarEqualsToken: 1449case SyntaxKind.AmpersandEqualsToken: 1451case SyntaxKind.PlusEqualsToken: 1453case SyntaxKind.MinusEqualsToken: 1455case SyntaxKind.CaretEqualsToken: 1457case SyntaxKind.PercentEqualsToken: 1459case SyntaxKind.QuestionQuestionEqualsToken: 1461case SyntaxKind.DotDotToken: 1465case SyntaxKind.BoolKeyword: 1467case SyntaxKind.ByteKeyword: 1469case SyntaxKind.SByteKeyword: 1471case SyntaxKind.ShortKeyword: 1473case SyntaxKind.UShortKeyword: 1475case SyntaxKind.IntKeyword: 1477case SyntaxKind.UIntKeyword: 1479case SyntaxKind.LongKeyword: 1481case SyntaxKind.ULongKeyword: 1483case SyntaxKind.DoubleKeyword: 1485case SyntaxKind.FloatKeyword: 1487case SyntaxKind.DecimalKeyword: 1489case SyntaxKind.StringKeyword: 1491case SyntaxKind.CharKeyword: 1493case SyntaxKind.VoidKeyword: 1495case SyntaxKind.ObjectKeyword: 1497case SyntaxKind.TypeOfKeyword: 1499case SyntaxKind.SizeOfKeyword: 1501case SyntaxKind.NullKeyword: 1503case SyntaxKind.TrueKeyword: 1505case SyntaxKind.FalseKeyword: 1507case SyntaxKind.IfKeyword: 1509case SyntaxKind.ElseKeyword: 1511case SyntaxKind.WhileKeyword: 1513case SyntaxKind.ForKeyword: 1515case SyntaxKind.ForEachKeyword: 1517case SyntaxKind.DoKeyword: 1519case SyntaxKind.SwitchKeyword: 1521case SyntaxKind.CaseKeyword: 1523case SyntaxKind.DefaultKeyword: 1525case SyntaxKind.TryKeyword: 1527case SyntaxKind.CatchKeyword: 1529case SyntaxKind.FinallyKeyword: 1531case SyntaxKind.LockKeyword: 1533case SyntaxKind.GotoKeyword: 1535case SyntaxKind.BreakKeyword: 1537case SyntaxKind.ContinueKeyword: 1539case SyntaxKind.ReturnKeyword: 1541case SyntaxKind.ThrowKeyword: 1543case SyntaxKind.PublicKeyword: 1545case SyntaxKind.PrivateKeyword: 1547case SyntaxKind.InternalKeyword: 1549case SyntaxKind.ProtectedKeyword: 1551case SyntaxKind.StaticKeyword: 1553case SyntaxKind.ReadOnlyKeyword: 1555case SyntaxKind.SealedKeyword: 1557case SyntaxKind.ConstKeyword: 1559case SyntaxKind.FixedKeyword: 1561case SyntaxKind.StackAllocKeyword: 1563case SyntaxKind.VolatileKeyword: 1565case SyntaxKind.NewKeyword: 1567case SyntaxKind.OverrideKeyword: 1569case SyntaxKind.AbstractKeyword: 1571case SyntaxKind.VirtualKeyword: 1573case SyntaxKind.EventKeyword: 1575case SyntaxKind.ExternKeyword: 1577case SyntaxKind.RefKeyword: 1579case SyntaxKind.OutKeyword: 1581case SyntaxKind.InKeyword: 1583case SyntaxKind.IsKeyword: 1585case SyntaxKind.AsKeyword: 1587case SyntaxKind.ParamsKeyword: 1589case SyntaxKind.ArgListKeyword: 1591case SyntaxKind.MakeRefKeyword: 1593case SyntaxKind.RefTypeKeyword: 1595case SyntaxKind.RefValueKeyword: 1597case SyntaxKind.ThisKeyword: 1599case SyntaxKind.BaseKeyword: 1601case SyntaxKind.NamespaceKeyword: 1603case SyntaxKind.UsingKeyword: 1605case SyntaxKind.ClassKeyword: 1607case SyntaxKind.StructKeyword: 1609case SyntaxKind.InterfaceKeyword: 1611case SyntaxKind.EnumKeyword: 1613case SyntaxKind.DelegateKeyword: 1615case SyntaxKind.CheckedKeyword: 1617case SyntaxKind.UncheckedKeyword: 1619case SyntaxKind.UnsafeKeyword: 1621case SyntaxKind.OperatorKeyword: 1623case SyntaxKind.ImplicitKeyword: 1625case SyntaxKind.ExplicitKeyword: 1627case SyntaxKind.ElifKeyword: 1629case SyntaxKind.EndIfKeyword: 1631case SyntaxKind.RegionKeyword: 1633case SyntaxKind.EndRegionKeyword: 1635case SyntaxKind.DefineKeyword: 1637case SyntaxKind.UndefKeyword: 1639case SyntaxKind.WarningKeyword: 1641case SyntaxKind.ErrorKeyword: 1643case SyntaxKind.LineKeyword: 1645case SyntaxKind.PragmaKeyword: 1647case SyntaxKind.HiddenKeyword: 1649case SyntaxKind.ChecksumKeyword: 1651case SyntaxKind.DisableKeyword: 1653case SyntaxKind.RestoreKeyword: 1655case SyntaxKind.ReferenceKeyword: 1657case SyntaxKind.LoadKeyword: 1659case SyntaxKind.NullableKeyword: 1661case SyntaxKind.EnableKeyword: 1663case SyntaxKind.WarningsKeyword: 1665case SyntaxKind.AnnotationsKeyword: 1669case SyntaxKind.YieldKeyword: 1671case SyntaxKind.PartialKeyword: 1673case SyntaxKind.FromKeyword: 1675case SyntaxKind.GroupKeyword: 1677case SyntaxKind.JoinKeyword: 1679case SyntaxKind.IntoKeyword: 1681case SyntaxKind.LetKeyword: 1683case SyntaxKind.ByKeyword: 1685case SyntaxKind.WhereKeyword: 1687case SyntaxKind.SelectKeyword: 1689case SyntaxKind.GetKeyword: 1691case SyntaxKind.SetKeyword: 1693case SyntaxKind.AddKeyword: 1695case SyntaxKind.RemoveKeyword: 1697case SyntaxKind.OrderByKeyword: 1699case SyntaxKind.AliasKeyword: 1701case SyntaxKind.OnKeyword: 1703case SyntaxKind.EqualsKeyword: 1705case SyntaxKind.AscendingKeyword: 1707case SyntaxKind.DescendingKeyword: 1709case SyntaxKind.AssemblyKeyword: 1711case SyntaxKind.ModuleKeyword: 1713case SyntaxKind.TypeKeyword: 1715case SyntaxKind.FieldKeyword: 1717case SyntaxKind.MethodKeyword: 1719case SyntaxKind.ParamKeyword: 1721case SyntaxKind.PropertyKeyword: 1723case SyntaxKind.TypeVarKeyword: 1725case SyntaxKind.GlobalKeyword: 1727case SyntaxKind.NameOfKeyword: 1729case SyntaxKind.AsyncKeyword: 1731case SyntaxKind.AwaitKeyword: 1733case SyntaxKind.WhenKeyword: 1735case SyntaxKind.InterpolatedStringStartToken: 1737case SyntaxKind.InterpolatedStringEndToken: 1739case SyntaxKind.InterpolatedVerbatimStringStartToken: 1741case SyntaxKind.UnderscoreToken: 1743case SyntaxKind.VarKeyword: 1745case SyntaxKind.AndKeyword: 1747case SyntaxKind.OrKeyword: 1749case SyntaxKind.NotKeyword: 1751case SyntaxKind.WithKeyword: 1753case SyntaxKind.InitKeyword: 1755case SyntaxKind.RecordKeyword: 1757case SyntaxKind.ManagedKeyword: 1759case SyntaxKind.UnmanagedKeyword: 1761case SyntaxKind.RequiredKeyword: 1763case SyntaxKind.ScopedKeyword: 1765case SyntaxKind.FileKeyword: 1772public static bool IsTypeParameterVarianceKeyword(SyntaxKind kind) 1774return kind == SyntaxKind.OutKeyword || kind == SyntaxKind.InKeyword; 1777public static bool IsDocumentationCommentTrivia(SyntaxKind kind) 1779return kind == SyntaxKind.SingleLineDocumentationCommentTrivia || 1780kind == SyntaxKind.MultiLineDocumentationCommentTrivia;