20 references to ContextualKind
Microsoft.CodeAnalysis.CSharp (8)
Binder\Binder_Symbols.cs (1)
1015(invocation.Expression as IdentifierNameSyntax)?.Identifier.ContextualKind() == SyntaxKind.NameOfKeyword):
CSharpExtensions.cs (1)
74return identifier.ContextualKind() == SyntaxKind.UnderscoreToken;
Symbols\Source\ModifierUtils.cs (2)
395DeclarationModifiers one = ToDeclarationModifier(modifier.ContextualKind()); 411var isPartialAsyncMethod = isOrdinaryMethod && i == modifiers.Count - 2 && modifiers[i + 1].ContextualKind() is SyntaxKind.AsyncKeyword;
Symbols\Source\SourceNamespaceSymbol.AliasesAndUsings.cs (2)
486if (aliasSyntax.Identifier.ContextualKind() == SyntaxKind.GlobalKeyword) 654if (identifier.ContextualKind() == SyntaxKind.GlobalKeyword)
Syntax\ParameterSyntax.cs (1)
13return this.Type == null && this.Identifier.ContextualKind() == SyntaxKind.ArgListKeyword;
Syntax\SyntaxNodeExtensions.cs (1)
56((IdentifierNameSyntax)node.Expression).Identifier.ContextualKind() == SyntaxKind.NameOfKeyword &&
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (1)
CodeGen\CodeGenDeconstructTests.cs (1)
3645return tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(i => i.Identifier.ContextualKind() == SyntaxKind.UnderscoreToken);
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (3)
Semantics\AccessCheckTests.cs (1)
761var discards = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(i => i.Identifier.ContextualKind() == SyntaxKind.UnderscoreToken).ToArray();
Semantics\MethodTypeInferenceTests.cs (1)
863return tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(i => i.Identifier.ContextualKind() == SyntaxKind.UnderscoreToken);
Semantics\OutVarTests.cs (1)
865return tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(i => i.Identifier.ContextualKind() == SyntaxKind.UnderscoreToken);
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (8)
LexicalAndXml\PreprocessorTests.cs (1)
4571Assert.Equal(SyntaxKind.IdentifierToken, token.ContextualKind());
Parsing\ExpressionParsingTests.cs (2)
2663Assert.Equal(SyntaxKind.AscendingKeyword, os.AscendingOrDescendingKeyword.ContextualKind()); 2711Assert.Equal(SyntaxKind.DescendingKeyword, os.AscendingOrDescendingKeyword.ContextualKind());
Parsing\ParsingErrorRecoveryTests.cs (1)
6136Assert.Equal(SyntaxKind.PartialKeyword, subitem2.Modifiers[0].ContextualKind());
Parsing\StatementParsingTests.cs (4)
1195Assert.Equal(SyntaxKind.ThrowKeyword, ts.ThrowKeyword.ContextualKind()); 1215Assert.Equal(SyntaxKind.ThrowKeyword, ts.ThrowKeyword.ContextualKind()); 2626Assert.Equal(SyntaxKind.AwaitKeyword, us.AwaitKeyword.ContextualKind()); 3349Assert.Equal(kind, name.Identifier.ContextualKind());