181 references to InKeyword
Microsoft.AspNetCore.App.Analyzers (1)
RouteEmbeddedLanguage\FrameworkParametersCompletionProvider.cs (1)
168previous.IsKind(SyntaxKind.InKeyword) ||
Microsoft.CodeAnalysis.CSharp (35)
Binder\Binder_Expressions.cs (1)
3086if (argumentSyntax.RefKindKeyword.IsKind(SyntaxKind.InKeyword))
CSharpExtensions.cs (1)
252case SyntaxKind.InKeyword: return VarianceKind.In;
Parser\DocumentationCommentParser.cs (2)
1234case SyntaxKind.InKeyword: 1255case SyntaxKind.InKeyword:
Parser\LanguageParser.cs (19)
1469Debug.Assert(modTok.Kind is not (SyntaxKind.OutKeyword or SyntaxKind.InKeyword)); 4722case SyntaxKind.InKeyword: 4737if (this.CurrentToken.Kind is SyntaxKind.RefKeyword or SyntaxKind.OutKeyword or SyntaxKind.InKeyword or SyntaxKind.ReadOnlyKeyword) 4754while (this.CurrentToken.Kind is (SyntaxKind.RefKeyword or SyntaxKind.OutKeyword or SyntaxKind.InKeyword or SyntaxKind.ReadOnlyKeyword)) 5780if (this.CurrentToken.Kind is SyntaxKind.InKeyword or SyntaxKind.OutKeyword) 5807this.CurrentToken.Kind is SyntaxKind.InKeyword or SyntaxKind.OutKeyword ? EatToken() : null, 6321var varianceToken = this.CurrentToken.Kind is SyntaxKind.InKeyword or SyntaxKind.OutKeyword 9106this.EatToken().Kind == SyntaxKind.InKeyword) 9291var @in = this.EatToken(SyntaxKind.InKeyword, ErrorCode.ERR_InExpected); 10090if (this.CurrentToken.Kind is not (SyntaxKind.RefKeyword or SyntaxKind.OutKeyword or SyntaxKind.InKeyword)) 11954case SyntaxKind.InKeyword: 13355case SyntaxKind.InKeyword: 13507if (pk2 == SyntaxKind.InKeyword) 13543return this.ScanType() != ScanTypeFlags.NotType && this.CurrentToken.Kind is SyntaxKind.IdentifierToken or SyntaxKind.InKeyword; 13614var type = this.PeekToken(1).Kind != SyntaxKind.InKeyword 13619if (this.PeekToken(1).ContextualKind == SyntaxKind.InKeyword && 13638this.EatToken(SyntaxKind.InKeyword), 13647type: this.PeekToken(1).Kind != SyntaxKind.InKeyword 13651inKeyword: this.EatToken(SyntaxKind.InKeyword),
SymbolDisplay\SymbolDisplayVisitor.Members.cs (1)
1133AddKeyword(SyntaxKind.InKeyword);
SymbolDisplay\SymbolDisplayVisitor.Types.cs (1)
768AddKeyword(SyntaxKind.InKeyword);
Symbols\RefKindExtensions.cs (1)
29case SyntaxKind.InKeyword:
Symbols\Source\ParameterHelpers.cs (6)
491addERR_BadParameterModifiers(diagnostics, modifier, SyntaxKind.InKeyword); 518addERR_BadParameterModifiers(diagnostics, modifier, SyntaxKind.InKeyword); 545addERR_BadParameterModifiers(diagnostics, modifier, SyntaxKind.InKeyword); 562case SyntaxKind.InKeyword: 584addERR_ParamsCantBeWithModifier(diagnostics, modifier, SyntaxKind.InKeyword); 948case SyntaxKind.InKeyword:
Syntax\SyntaxKindFacts.cs (3)
969return SyntaxKind.InKeyword; 1617case SyntaxKind.InKeyword: 1812return kind == SyntaxKind.OutKeyword || kind == SyntaxKind.InKeyword;
Microsoft.CodeAnalysis.CSharp.CodeStyle (8)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\CodeGeneration\CSharpSyntaxTokens.cs (1)
42public static readonly SyntaxToken InKeyword = Token(SyntaxKind.InKeyword);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ArgumentSyntaxExtensions.cs (1)
30SyntaxKind.InKeyword => RefKind.In,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ExpressionSyntaxExtensions.cs (1)
224=> expression?.Parent is ArgumentSyntax { RefKindKeyword: SyntaxToken(SyntaxKind.InKeyword) };
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxTokenExtensions.cs (1)
100case SyntaxKind.InKeyword:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\FormattingHelpers.cs (1)
375return token.Kind() == SyntaxKind.InKeyword &&
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SemanticFacts\CSharpSemanticFacts.cs (2)
291ForEachVariableStatementSyntax _ when token.Kind() == SyntaxKind.InKeyword => GetDeconstructionForEachMethods(semanticModel, node).As<ISymbol>(), 346return token.IsKind(SyntaxKind.InKeyword) ? queryInfo.CastInfo.GetBestOrAllSymbols() : queryInfo.OperationInfo.GetBestOrAllSymbols();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpSyntaxFacts.cs (1)
290case SyntaxKind.InKeyword:
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (6)
src\Analyzers\CSharp\CodeFixes\UsePrimaryConstructor\CSharpUsePrimaryConstructorCodeFixProvider.cs (1)
224var inKeyword = current.Modifiers.FirstOrDefault(t => t.Kind() == SyntaxKind.InKeyword);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\CSharpSyntaxContext.cs (1)
502if (targetToken.IsKind(SyntaxKind.InKeyword))
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTreeExtensions.cs (4)
1107if (token.Kind() is SyntaxKind.RefKeyword or SyntaxKind.InKeyword or SyntaxKind.ReadOnlyKeyword or SyntaxKind.OutKeyword or SyntaxKind.ThisKeyword or SyntaxKind.ParamsKeyword or SyntaxKind.ScopedKeyword) 1287if (token.Kind() is SyntaxKind.RefKeyword or SyntaxKind.InKeyword or SyntaxKind.OutKeyword) 2445if (token.Kind() is SyntaxKind.RefKeyword or SyntaxKind.InKeyword or SyntaxKind.OutKeyword) 2546if (token.IsKind(SyntaxKind.InKeyword))
Microsoft.CodeAnalysis.CSharp.Features (3)
Completion\KeywordRecommenders\InKeywordRecommender.cs (1)
16: base(SyntaxKind.InKeyword)
Completion\KeywordRecommenders\ThisKeywordRecommender.cs (1)
68SyntaxKind.InKeyword or
src\Analyzers\CSharp\CodeFixes\UsePrimaryConstructor\CSharpUsePrimaryConstructorCodeFixProvider.cs (1)
224var inKeyword = current.Modifiers.FirstOrDefault(t => t.Kind() == SyntaxKind.InKeyword);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (1)
DocumentationComments\CrefTests.cs (1)
6705Assert.Equal(SyntaxKind.InKeyword, parameter.RefKindKeyword.Kind());
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (107)
Generated\Syntax.Test.xml.Generated.cs (16)
233=> InternalSyntaxFactory.FromClause(InternalSyntaxFactory.Token(SyntaxKind.FromKeyword), null, InternalSyntaxFactory.Identifier("Identifier"), InternalSyntaxFactory.Token(SyntaxKind.InKeyword), GenerateIdentifierName()); 239=> InternalSyntaxFactory.JoinClause(InternalSyntaxFactory.Token(SyntaxKind.JoinKeyword), null, InternalSyntaxFactory.Identifier("Identifier"), InternalSyntaxFactory.Token(SyntaxKind.InKeyword), GenerateIdentifierName(), InternalSyntaxFactory.Token(SyntaxKind.OnKeyword), GenerateIdentifierName(), InternalSyntaxFactory.Token(SyntaxKind.EqualsKeyword), GenerateIdentifierName(), null); 401=> InternalSyntaxFactory.ForEachStatement(new Microsoft.CodeAnalysis.Syntax.InternalSyntax.SyntaxList<Syntax.InternalSyntax.AttributeListSyntax>(), null, InternalSyntaxFactory.Token(SyntaxKind.ForEachKeyword), InternalSyntaxFactory.Token(SyntaxKind.OpenParenToken), GenerateIdentifierName(), InternalSyntaxFactory.Identifier("Identifier"), InternalSyntaxFactory.Token(SyntaxKind.InKeyword), GenerateIdentifierName(), InternalSyntaxFactory.Token(SyntaxKind.CloseParenToken), GenerateBlock()); 404=> InternalSyntaxFactory.ForEachVariableStatement(new Microsoft.CodeAnalysis.Syntax.InternalSyntax.SyntaxList<Syntax.InternalSyntax.AttributeListSyntax>(), null, InternalSyntaxFactory.Token(SyntaxKind.ForEachKeyword), InternalSyntaxFactory.Token(SyntaxKind.OpenParenToken), GenerateIdentifierName(), InternalSyntaxFactory.Token(SyntaxKind.InKeyword), GenerateIdentifierName(), InternalSyntaxFactory.Token(SyntaxKind.CloseParenToken), GenerateBlock()); 1616Assert.Equal(SyntaxKind.InKeyword, node.InKeyword.Kind); 1643Assert.Equal(SyntaxKind.InKeyword, node.InKeyword.Kind); 2308Assert.Equal(SyntaxKind.InKeyword, node.InKeyword.Kind); 2326Assert.Equal(SyntaxKind.InKeyword, node.InKeyword.Kind); 10449=> SyntaxFactory.FromClause(SyntaxFactory.Token(SyntaxKind.FromKeyword), default(TypeSyntax), SyntaxFactory.Identifier("Identifier"), SyntaxFactory.Token(SyntaxKind.InKeyword), GenerateIdentifierName()); 10455=> SyntaxFactory.JoinClause(SyntaxFactory.Token(SyntaxKind.JoinKeyword), default(TypeSyntax), SyntaxFactory.Identifier("Identifier"), SyntaxFactory.Token(SyntaxKind.InKeyword), GenerateIdentifierName(), SyntaxFactory.Token(SyntaxKind.OnKeyword), GenerateIdentifierName(), SyntaxFactory.Token(SyntaxKind.EqualsKeyword), GenerateIdentifierName(), default(JoinIntoClauseSyntax)); 10617=> SyntaxFactory.ForEachStatement(new SyntaxList<AttributeListSyntax>(), default(SyntaxToken), SyntaxFactory.Token(SyntaxKind.ForEachKeyword), SyntaxFactory.Token(SyntaxKind.OpenParenToken), GenerateIdentifierName(), SyntaxFactory.Identifier("Identifier"), SyntaxFactory.Token(SyntaxKind.InKeyword), GenerateIdentifierName(), SyntaxFactory.Token(SyntaxKind.CloseParenToken), GenerateBlock()); 10620=> SyntaxFactory.ForEachVariableStatement(new SyntaxList<AttributeListSyntax>(), default(SyntaxToken), SyntaxFactory.Token(SyntaxKind.ForEachKeyword), SyntaxFactory.Token(SyntaxKind.OpenParenToken), GenerateIdentifierName(), SyntaxFactory.Token(SyntaxKind.InKeyword), GenerateIdentifierName(), SyntaxFactory.Token(SyntaxKind.CloseParenToken), GenerateBlock()); 11832Assert.Equal(SyntaxKind.InKeyword, node.InKeyword.Kind()); 11859Assert.Equal(SyntaxKind.InKeyword, node.InKeyword.Kind()); 12524Assert.Equal(SyntaxKind.InKeyword, node.InKeyword.Kind()); 12542Assert.Equal(SyntaxKind.InKeyword, node.InKeyword.Kind());
Parsing\AsyncStreamsParsingTests.cs (3)
320N(SyntaxKind.InKeyword); 426M(SyntaxKind.InKeyword); 529N(SyntaxKind.InKeyword);
Parsing\CollectionExpressionParsingTests.cs (5)
2170N(SyntaxKind.InKeyword); 2232N(SyntaxKind.InKeyword); 2278N(SyntaxKind.InKeyword); 2306N(SyntaxKind.InKeyword); 5773N(SyntaxKind.InKeyword);
Parsing\CrefParsingTests.cs (1)
1542N(SyntaxKind.InKeyword);
Parsing\DeclarationExpressionTests.cs (12)
417N(SyntaxKind.InKeyword); 445N(SyntaxKind.InKeyword); 502N(SyntaxKind.InKeyword); 559N(SyntaxKind.InKeyword); 605N(SyntaxKind.InKeyword); 649N(SyntaxKind.InKeyword); 693N(SyntaxKind.InKeyword); 760N(SyntaxKind.InKeyword); 821N(SyntaxKind.InKeyword); 852N(SyntaxKind.InKeyword); 879N(SyntaxKind.InKeyword); 918N(SyntaxKind.InKeyword);
Parsing\DeclarationScopeParsingTests.cs (31)
107N(SyntaxKind.InKeyword); 194N(SyntaxKind.InKeyword); 968N(SyntaxKind.InKeyword); 9672N(SyntaxKind.InKeyword); 9710N(SyntaxKind.InKeyword); 9769M(SyntaxKind.InKeyword); 9812N(SyntaxKind.InKeyword); 9873M(SyntaxKind.InKeyword); 9947M(SyntaxKind.InKeyword); 9997N(SyntaxKind.InKeyword); 10049M(SyntaxKind.InKeyword); 10095N(SyntaxKind.InKeyword); 10150M(SyntaxKind.InKeyword); 10201N(SyntaxKind.InKeyword); 10255M(SyntaxKind.InKeyword); 10309N(SyntaxKind.InKeyword); 10351N(SyntaxKind.InKeyword); 10394N(SyntaxKind.InKeyword); 10436N(SyntaxKind.InKeyword); 10474N(SyntaxKind.InKeyword); 10512N(SyntaxKind.InKeyword); 10554N(SyntaxKind.InKeyword); 10597N(SyntaxKind.InKeyword); 10631N(SyntaxKind.InKeyword); 10669N(SyntaxKind.InKeyword); 10719M(SyntaxKind.InKeyword); 10777M(SyntaxKind.InKeyword); 10831M(SyntaxKind.InKeyword); 10939N(SyntaxKind.InKeyword); 10993N(SyntaxKind.InKeyword); 11048M(SyntaxKind.InKeyword);
Parsing\DeconstructionTests.cs (3)
1475N(SyntaxKind.InKeyword); 1555N(SyntaxKind.InKeyword); 1700N(SyntaxKind.InKeyword);
Parsing\ExpressionParsingTests.cs (4)
4785N(SyntaxKind.InKeyword); 6853N(SyntaxKind.InKeyword); 6915N(SyntaxKind.InKeyword); 7000M(SyntaxKind.InKeyword);
Parsing\FunctionPointerTests.cs (2)
825N(SyntaxKind.InKeyword); 2968N(SyntaxKind.InKeyword);
Parsing\LambdaReturnTypeParsingTests.cs (5)
3565N(SyntaxKind.InKeyword); 3745N(SyntaxKind.InKeyword); 3914N(SyntaxKind.InKeyword); 4147N(SyntaxKind.InKeyword); 4247N(SyntaxKind.InKeyword);
Parsing\NullableParsingTests.cs (1)
1241N(SyntaxKind.InKeyword);
Parsing\ParserErrorMessageTests.cs (7)
3768Assert.Equal(SyntaxKind.InKeyword, methodDeclaration.ParameterList.Parameters.Single().Modifiers.Single().Kind()); 3771Assert.Equal(SyntaxKind.InKeyword, delegateDeclaration.ParameterList.Parameters.Single().Modifiers.Single().Kind()); 3774Assert.Equal(SyntaxKind.InKeyword, localFunctionStatement.ParameterList.Parameters.Single().Modifiers.Single().Kind()); 3777Assert.Equal(SyntaxKind.InKeyword, lambdaExpression.ParameterList.Parameters.Single().Modifiers.Single().Kind()); 3780Assert.Equal(SyntaxKind.InKeyword, anonymousMethodExpression.ParameterList.Parameters.Single().Modifiers.Single().Kind()); 3783Assert.Equal(SyntaxKind.InKeyword, indexerDeclaration.ParameterList.Parameters.Single().Modifiers.Single().Kind()); 3786Assert.Equal(SyntaxKind.InKeyword, operatorDeclaration.ParameterList.Parameters.Single().Modifiers.Single().Kind());
Parsing\PatternParsingTests.cs (1)
352N(SyntaxKind.InKeyword);
Parsing\RefReadonlyTests.cs (1)
1350N(SyntaxKind.InKeyword);
Parsing\ScriptParsingTests.cs (8)
8160M(SyntaxKind.InKeyword); 8317M(SyntaxKind.InKeyword); 8842M(SyntaxKind.InKeyword); 8902M(SyntaxKind.InKeyword); 8962M(SyntaxKind.InKeyword); 9030M(SyntaxKind.InKeyword); 9078N(SyntaxKind.InKeyword); 9141N(SyntaxKind.InKeyword);
Parsing\StatementAttributeParsingTests.cs (3)
1164N(SyntaxKind.InKeyword); 1298N(SyntaxKind.InKeyword); 5688N(SyntaxKind.InKeyword);
Parsing\StatementParsingTests.cs (4)
1940Assert.Equal(SyntaxKind.InKeyword, fs.InKeyword.Kind()); 1973Assert.Equal(SyntaxKind.InKeyword, fs.InKeyword.Kind()); 2004Assert.Equal(SyntaxKind.InKeyword, fs.InKeyword.Kind()); 3388Assert.Equal(SyntaxKind.InKeyword, fs.InKeyword.Kind());
Microsoft.CodeAnalysis.CSharp.Workspaces (15)
Classification\ClassificationHelpers.cs (1)
83case SyntaxKind.InKeyword: // Include InKeyword as it can be part of an ForEachStatement
Simplification\Reducers\CSharpEscapingReducer.cs (1)
96case SyntaxKind.InKeyword:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\CodeGeneration\CSharpSyntaxTokens.cs (1)
42public static readonly SyntaxToken InKeyword = Token(SyntaxKind.InKeyword);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ArgumentSyntaxExtensions.cs (1)
30SyntaxKind.InKeyword => RefKind.In,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ExpressionSyntaxExtensions.cs (1)
224=> expression?.Parent is ArgumentSyntax { RefKindKeyword: SyntaxToken(SyntaxKind.InKeyword) };
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxTokenExtensions.cs (1)
100case SyntaxKind.InKeyword:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\FormattingHelpers.cs (1)
375return token.Kind() == SyntaxKind.InKeyword &&
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SemanticFacts\CSharpSemanticFacts.cs (2)
291ForEachVariableStatementSyntax _ when token.Kind() == SyntaxKind.InKeyword => GetDeconstructionForEachMethods(semanticModel, node).As<ISymbol>(), 346return token.IsKind(SyntaxKind.InKeyword) ? queryInfo.CastInfo.GetBestOrAllSymbols() : queryInfo.OperationInfo.GetBestOrAllSymbols();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpSyntaxFacts.cs (1)
290case SyntaxKind.InKeyword:
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\CSharpSyntaxContext.cs (1)
502if (targetToken.IsKind(SyntaxKind.InKeyword))
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTreeExtensions.cs (4)
1107if (token.Kind() is SyntaxKind.RefKeyword or SyntaxKind.InKeyword or SyntaxKind.ReadOnlyKeyword or SyntaxKind.OutKeyword or SyntaxKind.ThisKeyword or SyntaxKind.ParamsKeyword or SyntaxKind.ScopedKeyword) 1287if (token.Kind() is SyntaxKind.RefKeyword or SyntaxKind.InKeyword or SyntaxKind.OutKeyword) 2445if (token.Kind() is SyntaxKind.RefKeyword or SyntaxKind.InKeyword or SyntaxKind.OutKeyword) 2546if (token.IsKind(SyntaxKind.InKeyword))
Microsoft.Interop.SourceGeneration (4)
Marshalling\MarshallerHelpers.cs (3)
427tokens = tokens.Add(Token(SyntaxKind.InKeyword)); 458RefKind.In => Token(SyntaxKind.InKeyword), 461RefKind.RefReadOnlyParameter => Token(SyntaxKind.InKeyword),
Utils\SyntaxFactoryExtensions.cs (1)
75=> Argument(null, Token(SyntaxKind.InKeyword), expression);
Microsoft.VisualStudio.LanguageServices.CSharp (1)
LanguageService\CSharpHelpContextService.cs (1)
460if (token.IsKind(SyntaxKind.InKeyword))