168 references to DeclarationExpression
Microsoft.CodeAnalysis.CSharp (22)
Binder\Binder_Deconstruct.cs (1)
740case SyntaxKind.DeclarationExpression:
Binder\Binder_Expressions.cs (3)
822case SyntaxKind.DeclarationExpression: 3031case SyntaxKind.DeclarationExpression: 3092if (argumentSyntax.Expression.Kind() == SyntaxKind.DeclarationExpression)
Binder\Binder_Statements.cs (2)
789declarationNode.Kind() == SyntaxKind.DeclarationExpression || 1410if (node.Left.Kind() == SyntaxKind.TupleExpression || node.Left.Kind() == SyntaxKind.DeclarationExpression)
Binder\ExpressionVariableFinder.cs (1)
480case SyntaxKind.DeclarationExpression:
Binder\ForEachLoopBinder.cs (1)
119case SyntaxKind.DeclarationExpression:
BoundTree\VariablePendingInference.cs (3)
38(this.Syntax.Kind() == SyntaxKind.DeclarationExpression && 61SyntaxNode typeOrDesignationSyntax = this.Syntax.Kind() == SyntaxKind.DeclarationExpression ? 124case SyntaxKind.DeclarationExpression:
Compilation\CSharpSemanticModel.cs (1)
2835if (expression.Kind() == SyntaxKind.DeclarationExpression)
Compilation\MemberSemanticModel.cs (1)
441if (expression.Kind() == SyntaxKind.DeclarationExpression)
Compilation\SyntaxTreeSemanticModel.cs (1)
524if (expression.Kind() == SyntaxKind.DeclarationExpression)
Lowering\DiagnosticsPass_Warnings.cs (1)
38if (local.Syntax.Kind() == SyntaxKind.DeclarationExpression)
Parser\LanguageParser.cs (2)
9519case SyntaxKind.DeclarationExpression: 10845case SyntaxKind.DeclarationExpression:
Syntax\SyntaxExtensions.cs (3)
221case SyntaxKind.DeclarationExpression: 346if (kind != SyntaxKind.TupleExpression && kind != SyntaxKind.DeclarationExpression && kind != SyntaxKind.IdentifierName) 353Debug.Assert(expr.Kind() == SyntaxKind.TupleExpression || expr.Kind() == SyntaxKind.DeclarationExpression || expr.Kind() == SyntaxKind.IdentifierName);
Syntax\SyntaxFacts.cs (2)
221case DeclarationExpression: 472case SyntaxKind.DeclarationExpression:
Microsoft.CodeAnalysis.CSharp.CodeStyle (4)
src\Analyzers\CSharp\Analyzers\UseImplicitOrExplicitType\CSharpTypeStyleDiagnosticAnalyzerBase.cs (1)
30HandleVariableDeclaration, SyntaxKind.VariableDeclaration, SyntaxKind.ForEachStatement, SyntaxKind.DeclarationExpression);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\AssignmentExpressionSyntaxExtensions.cs (1)
18(left.Kind() == SyntaxKind.TupleExpression || left.Kind() == SyntaxKind.DeclarationExpression);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\TypeStyle\CSharpTypeStyleHelper.cs (2)
62if (typeName?.FirstAncestorOrSelf<SyntaxNode>(a => a.Kind() is SyntaxKind.DeclarationExpression or SyntaxKind.VariableDeclaration or SyntaxKind.ForEachStatement) is not { } declaration) 84Debug.Assert(node.Kind() is SyntaxKind.VariableDeclaration or SyntaxKind.ForEachStatement or SyntaxKind.DeclarationExpression);
Microsoft.CodeAnalysis.CSharp.Features (9)
CodeRefactorings\UseExplicitOrImplicitType\AbstractUseTypeCodeRefactoringProvider.cs (1)
41Debug.Assert(declaration.Kind() is SyntaxKind.VariableDeclaration or SyntaxKind.ForEachStatement or SyntaxKind.DeclarationExpression);
Completion\CompletionProviders\DeclarationName\DeclarationNameInfo.cs (1)
626case SyntaxKind.DeclarationExpression:
Debugging\CSharpProximityExpressionsService.RelevantExpressionsCollector.cs (1)
124case SyntaxKind.DeclarationExpression:
EditAndContinue\SyntaxComparer.cs (1)
1322case SyntaxKind.DeclarationExpression:
ExtractMethod\CSharpMethodExtractor.CSharpCodeGenerator.cs (2)
436.Where(n => n.Kind() is SyntaxKind.DeclarationExpression or SyntaxKind.DeclarationPattern); 442case SyntaxKind.DeclarationExpression:
GenerateType\CSharpGenerateTypeService.cs (1)
364objectCreationExpressionOpt.ArgumentList.Arguments is [{ Expression: (kind: not SyntaxKind.DeclarationExpression) expression }])
ReplaceMethodWithProperty\CSharpReplaceMethodWithPropertyService.cs (1)
322invocation.ArgumentList.Arguments[0].Expression.Kind() == SyntaxKind.DeclarationExpression)
src\Analyzers\CSharp\Analyzers\UseImplicitOrExplicitType\CSharpTypeStyleDiagnosticAnalyzerBase.cs (1)
30HandleVariableDeclaration, SyntaxKind.VariableDeclaration, SyntaxKind.ForEachStatement, SyntaxKind.DeclarationExpression);
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (1)
Semantics\LocalFunctionTests.cs (1)
729var decl = (DeclarationExpressionSyntax)tree.FindNodeOrTokenByKind(SyntaxKind.DeclarationExpression, occurrence: 1).AsNode();
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (128)
Parsing\AsyncStreamsParsingTests.cs (1)
508N(SyntaxKind.DeclarationExpression);
Parsing\DeclarationExpressionTests.cs (13)
37N(SyntaxKind.DeclarationExpression); 473N(SyntaxKind.DeclarationExpression); 488N(SyntaxKind.DeclarationExpression); 530N(SyntaxKind.DeclarationExpression); 545N(SyntaxKind.DeclarationExpression); 672N(SyntaxKind.DeclarationExpression); 721N(SyntaxKind.DeclarationExpression); 736N(SyntaxKind.DeclarationExpression); 789N(SyntaxKind.DeclarationExpression); 1145N(SyntaxKind.DeclarationExpression); 1160N(SyntaxKind.DeclarationExpression); 1207N(SyntaxKind.DeclarationExpression); 1222N(SyntaxKind.DeclarationExpression);
Parsing\DeclarationParsingTests.cs (1)
6588N(SyntaxKind.DeclarationExpression);
Parsing\DeclarationScopeParsingTests.cs (63)
3503N(SyntaxKind.DeclarationExpression); 3518N(SyntaxKind.DeclarationExpression); 3570N(SyntaxKind.DeclarationExpression); 3589N(SyntaxKind.DeclarationExpression); 3793N(SyntaxKind.DeclarationExpression); 3813N(SyntaxKind.DeclarationExpression); 4032N(SyntaxKind.DeclarationExpression); 4051N(SyntaxKind.DeclarationExpression); 4172N(SyntaxKind.DeclarationExpression); 4195N(SyntaxKind.DeclarationExpression); 4320N(SyntaxKind.DeclarationExpression); 4344N(SyntaxKind.DeclarationExpression); 4470N(SyntaxKind.DeclarationExpression); 4489N(SyntaxKind.DeclarationExpression); 4541N(SyntaxKind.DeclarationExpression); 4564N(SyntaxKind.DeclarationExpression); 4616N(SyntaxKind.DeclarationExpression); 4640N(SyntaxKind.DeclarationExpression); 4692N(SyntaxKind.DeclarationExpression); 4715N(SyntaxKind.DeclarationExpression); 4767N(SyntaxKind.DeclarationExpression); 4786N(SyntaxKind.DeclarationExpression); 4838N(SyntaxKind.DeclarationExpression); 4857N(SyntaxKind.DeclarationExpression); 4909N(SyntaxKind.DeclarationExpression); 4932N(SyntaxKind.DeclarationExpression); 4984N(SyntaxKind.DeclarationExpression); 5008N(SyntaxKind.DeclarationExpression); 5060N(SyntaxKind.DeclarationExpression); 5075N(SyntaxKind.DeclarationExpression); 5127N(SyntaxKind.DeclarationExpression); 5146N(SyntaxKind.DeclarationExpression); 5575N(SyntaxKind.DeclarationExpression); 5594N(SyntaxKind.DeclarationExpression); 5646N(SyntaxKind.DeclarationExpression); 5661N(SyntaxKind.DeclarationExpression); 5717N(SyntaxKind.DeclarationExpression); 5740N(SyntaxKind.DeclarationExpression); 5810N(SyntaxKind.DeclarationExpression); 5922N(SyntaxKind.DeclarationExpression); 5974N(SyntaxKind.DeclarationExpression); 6112N(SyntaxKind.DeclarationExpression); 6176N(SyntaxKind.DeclarationExpression); 6406N(SyntaxKind.DeclarationExpression); 6533N(SyntaxKind.DeclarationExpression); 6665N(SyntaxKind.DeclarationExpression); 6817N(SyntaxKind.DeclarationExpression); 6873N(SyntaxKind.DeclarationExpression); 6933N(SyntaxKind.DeclarationExpression); 6994N(SyntaxKind.DeclarationExpression); 7054N(SyntaxKind.DeclarationExpression); 7110N(SyntaxKind.DeclarationExpression); 7166N(SyntaxKind.DeclarationExpression); 7226N(SyntaxKind.DeclarationExpression); 7287N(SyntaxKind.DeclarationExpression); 7339N(SyntaxKind.DeclarationExpression); 7405N(SyntaxKind.DeclarationExpression); 7477N(SyntaxKind.DeclarationExpression); 7557N(SyntaxKind.DeclarationExpression); 7770N(SyntaxKind.DeclarationExpression); 7961N(SyntaxKind.DeclarationExpression); 8017N(SyntaxKind.DeclarationExpression); 11075N(SyntaxKind.DeclarationExpression);
Parsing\DeconstructionTests.cs (34)
723N(SyntaxKind.DeclarationExpression); 738N(SyntaxKind.DeclarationExpression); 818N(SyntaxKind.DeclarationExpression); 833N(SyntaxKind.DeclarationExpression); 851N(SyntaxKind.DeclarationExpression); 921N(SyntaxKind.DeclarationExpression); 998N(SyntaxKind.DeclarationExpression); 1164N(SyntaxKind.DeclarationExpression); 1179N(SyntaxKind.DeclarationExpression); 1265N(SyntaxKind.DeclarationExpression); 1280N(SyntaxKind.DeclarationExpression); 1358N(SyntaxKind.DeclarationExpression); 1446N(SyntaxKind.DeclarationExpression); 1461N(SyntaxKind.DeclarationExpression); 1534N(SyntaxKind.DeclarationExpression); 1594N(SyntaxKind.DeclarationExpression); 1609N(SyntaxKind.DeclarationExpression); 1671N(SyntaxKind.DeclarationExpression); 1686N(SyntaxKind.DeclarationExpression); 1794N(SyntaxKind.DeclarationExpression); 1809N(SyntaxKind.DeclarationExpression); 1824N(SyntaxKind.DeclarationExpression); 2431N(SyntaxKind.DeclarationExpression); 2501N(SyntaxKind.DeclarationExpression); 2516N(SyntaxKind.DeclarationExpression); 2584N(SyntaxKind.DeclarationExpression); 2647N(SyntaxKind.DeclarationExpression); 2935N(SyntaxKind.DeclarationExpression); 3433N(SyntaxKind.DeclarationExpression); 3464N(SyntaxKind.DeclarationExpression); 3495N(SyntaxKind.DeclarationExpression); 3526N(SyntaxKind.DeclarationExpression); 3557N(SyntaxKind.DeclarationExpression); 3604N(SyntaxKind.DeclarationExpression);
Parsing\LambdaParameterParsingTests.cs (4)
663N(SyntaxKind.DeclarationExpression); 723N(SyntaxKind.DeclarationExpression); 4646N(SyntaxKind.DeclarationExpression); 5049N(SyntaxKind.DeclarationExpression);
Parsing\LambdaReturnTypeParsingTests.cs (1)
3899N(SyntaxKind.DeclarationExpression);
Parsing\MemberDeclarationParsingTests.cs (4)
16194N(SyntaxKind.DeclarationExpression); 16347N(SyntaxKind.DeclarationExpression); 16760N(SyntaxKind.DeclarationExpression); 16941N(SyntaxKind.DeclarationExpression);
Parsing\PatternParsingTests.cs (2)
1304N(SyntaxKind.DeclarationExpression); 1413N(SyntaxKind.DeclarationExpression);
Parsing\RecordParsing.cs (1)
1829N(SyntaxKind.DeclarationExpression);
Parsing\StatementAttributeParsingTests.cs (1)
1277N(SyntaxKind.DeclarationExpression);
Parsing\TypeArgumentListParsingTests.cs (2)
2771N(SyntaxKind.DeclarationExpression); 2786N(SyntaxKind.DeclarationExpression);
Parsing\ValueTupleTests.cs (1)
870N(SyntaxKind.DeclarationExpression);
Microsoft.CodeAnalysis.CSharp.Workspaces (4)
Simplification\CSharpSimplificationService.Expander.cs (1)
274node.Expression.Kind() != SyntaxKind.DeclarationExpression &&
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\AssignmentExpressionSyntaxExtensions.cs (1)
18(left.Kind() == SyntaxKind.TupleExpression || left.Kind() == SyntaxKind.DeclarationExpression);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\TypeStyle\CSharpTypeStyleHelper.cs (2)
62if (typeName?.FirstAncestorOrSelf<SyntaxNode>(a => a.Kind() is SyntaxKind.DeclarationExpression or SyntaxKind.VariableDeclaration or SyntaxKind.ForEachStatement) is not { } declaration) 84Debug.Assert(node.Kind() is SyntaxKind.VariableDeclaration or SyntaxKind.ForEachStatement or SyntaxKind.DeclarationExpression);