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