59 references to UnderscoreToken
Microsoft.CodeAnalysis.CSharp (13)
CSharpExtensions.cs (1)
74return identifier.ContextualKind() == SyntaxKind.UnderscoreToken;
Parser\LanguageParser.cs (4)
9315Debug.Assert(discard.Kind == SyntaxKind.UnderscoreToken); 9475return ((IdentifierNameSyntax)variable).Identifier.ContextualKind == SyntaxKind.UnderscoreToken; 10170return CurrentToken.ContextualKind == SyntaxKind.UnderscoreToken 10171? _syntaxFactory.DiscardDesignation(this.EatContextualToken(SyntaxKind.UnderscoreToken))
Parser\LanguageParser_Patterns.cs (4)
84if (tk == SyntaxKind.IdentifierToken && this.CurrentToken.ContextualKind != SyntaxKind.UnderscoreToken && 187if (CurrentToken.ContextualKind == SyntaxKind.UnderscoreToken) 189return _syntaxFactory.DiscardPattern(this.EatContextualToken(SyntaxKind.UnderscoreToken)); 425case SyntaxKind.UnderscoreToken: // discard is a valid pattern designation
Syntax\SyntaxKindFacts.cs (4)
244case SyntaxKind.UnderscoreToken: 1217case SyntaxKind.UnderscoreToken: 1331return SyntaxKind.UnderscoreToken; 1777case SyntaxKind.UnderscoreToken:
Microsoft.CodeAnalysis.CSharp.CodeStyle (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SemanticModelExtensions.cs (1)
444if (SyntaxFacts.GetContextualKeywordKind(parameter.Name) is not SyntaxKind.UnderscoreToken)
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (2)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpReplaceDiscardDeclarationsWithAssignmentsService.cs (1)
74contextualKind: SyntaxKind.UnderscoreToken,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Utilities\CSharpSimplificationHelpers.cs (1)
28if (SyntaxFacts.GetContextualKeywordKind(syntaxToken.ValueText) == SyntaxKind.UnderscoreToken)
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.Emit3.UnitTests (1)
Semantics\OutVarTests.cs (1)
865return tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(i => i.Identifier.ContextualKind() == SyntaxKind.UnderscoreToken);
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (2)
Semantics\AccessCheckTests.cs (1)
761var discards = tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(i => i.Identifier.ContextualKind() == SyntaxKind.UnderscoreToken).ToArray();
Semantics\MethodTypeInferenceTests.cs (1)
864return tree.GetRoot().DescendantNodes().OfType<IdentifierNameSyntax>().Where(i => i.Identifier.ContextualKind() == SyntaxKind.UnderscoreToken);
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (34)
Generated\Syntax.Test.xml.Generated.cs (8)
278=> InternalSyntaxFactory.DiscardPattern(InternalSyntaxFactory.Token(SyntaxKind.UnderscoreToken)); 359=> InternalSyntaxFactory.DiscardDesignation(InternalSyntaxFactory.Token(SyntaxKind.UnderscoreToken)); 1795Assert.Equal(SyntaxKind.UnderscoreToken, node.UnderscoreToken.Kind); 2114Assert.Equal(SyntaxKind.UnderscoreToken, node.UnderscoreToken.Kind); 10494=> SyntaxFactory.DiscardPattern(SyntaxFactory.Token(SyntaxKind.UnderscoreToken)); 10575=> SyntaxFactory.DiscardDesignation(SyntaxFactory.Token(SyntaxKind.UnderscoreToken)); 12011Assert.Equal(SyntaxKind.UnderscoreToken, node.UnderscoreToken.Kind()); 12330Assert.Equal(SyntaxKind.UnderscoreToken, node.UnderscoreToken.Kind());
Parsing\CollectionExpressionParsingTests.cs (3)
1283N(SyntaxKind.UnderscoreToken); 1350N(SyntaxKind.UnderscoreToken); 1441N(SyntaxKind.UnderscoreToken);
Parsing\DeclarationScopeParsingTests.cs (2)
7973N(SyntaxKind.UnderscoreToken); 8025N(SyntaxKind.UnderscoreToken);
Parsing\DeconstructionTests.cs (12)
1802N(SyntaxKind.UnderscoreToken); 1817N(SyntaxKind.UnderscoreToken); 1835N(SyntaxKind.UnderscoreToken); 1840N(SyntaxKind.UnderscoreToken); 2447N(SyntaxKind.UnderscoreToken); 2524N(SyntaxKind.UnderscoreToken); 2592N(SyntaxKind.UnderscoreToken); 2655N(SyntaxKind.UnderscoreToken); 2715N(SyntaxKind.UnderscoreToken); 2774N(SyntaxKind.UnderscoreToken); 2840N(SyntaxKind.UnderscoreToken); 2905N(SyntaxKind.UnderscoreToken);
Parsing\FunctionPointerTests.cs (2)
2593N(SyntaxKind.UnderscoreToken); 2703N(SyntaxKind.UnderscoreToken);
Parsing\LambdaAttributeParsingTests.cs (1)
1752N(SyntaxKind.UnderscoreToken);
Parsing\PatternParsingTests.cs (6)
5472N(SyntaxKind.UnderscoreToken); 5624N(SyntaxKind.UnderscoreToken); 5632N(SyntaxKind.UnderscoreToken); 5670N(SyntaxKind.UnderscoreToken); 5800N(SyntaxKind.UnderscoreToken); 6116N(SyntaxKind.UnderscoreToken);
Microsoft.CodeAnalysis.CSharp.Workspaces (4)
Simplification\CSharpSimplificationService.cs (1)
108if (SyntaxFacts.GetContextualKeywordKind(syntaxToken.ValueText) == SyntaxKind.UnderscoreToken)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SemanticModelExtensions.cs (1)
444if (SyntaxFacts.GetContextualKeywordKind(parameter.Name) is not SyntaxKind.UnderscoreToken)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpReplaceDiscardDeclarationsWithAssignmentsService.cs (1)
74contextualKind: SyntaxKind.UnderscoreToken,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Utilities\CSharpSimplificationHelpers.cs (1)
28if (SyntaxFacts.GetContextualKeywordKind(syntaxToken.ValueText) == SyntaxKind.UnderscoreToken)
Microsoft.Interop.LibraryImportGenerator (1)
Analyzers\ConvertToLibraryImportFixer.cs (1)
333SyntaxKind.UnderscoreToken,