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