1 write to _syntax
Microsoft.CodeAnalysis.CSharp (1)
Binder\ForEachLoopBinder.cs (1)
44
_syntax
= syntax;
44 references to _syntax
Microsoft.CodeAnalysis.CSharp (44)
Binder\ForEachLoopBinder.cs (44)
33
return (
_syntax
.Kind() == SyntaxKind.ForEachStatement) ? (SourceLocalSymbol)this.Locals[0] : null;
38
=>
_syntax
.AwaitKeyword != default;
49
if (
_syntax
== scopeDesignator)
66
return
_syntax
;
72
switch (
_syntax
.Kind())
76
var syntax = (ForEachVariableStatementSyntax)
_syntax
;
87
var syntax = (ForEachStatementSyntax)
_syntax
;
97
throw ExceptionUtilities.UnexpectedValue(
_syntax
.Kind());
192
BoundExpression collectionExpr = originalBinder.GetBinder(
_syntax
.Expression).BindRValueWithoutTargetType(
_syntax
.Expression, diagnostics);
195
bool hasErrors = !GetEnumeratorInfoAndInferCollectionElementType(
_syntax
,
_syntax
.Expression, ref collectionExpr, isAsync: IsAsync, isSpread: false, diagnostics, out inferredType, builder: out _);
197
ExpressionSyntax variables = ((ForEachVariableStatementSyntax)
_syntax
).Variable;
200
var valuePlaceholder = new BoundDeconstructValuePlaceholder(
_syntax
.Expression, variableSymbol: null, isDiscardExpression: false, inferredType.Type ?? CreateErrorType("var"));
207
right:
_syntax
.Expression,
213
return new BoundExpressionStatement(
_syntax
, deconstruction);
220
CheckFeatureAvailability(
_syntax
.AwaitKeyword, MessageID.IDS_FeatureAsyncStreams, diagnostics);
224
BoundExpression collectionExpr = originalBinder.GetBinder(
_syntax
.Expression).BindRValueWithoutTargetType(
_syntax
.Expression, diagnostics);
228
bool hasErrors = !GetEnumeratorInfoAndInferCollectionElementType(
_syntax
,
_syntax
.Expression, ref collectionExpr, isAsync: IsAsync, isSpread: false, diagnostics, out inferredType, out builder);
253
var expr =
_syntax
.Expression;
254
ReportBadAwaitDiagnostics(
_syntax
.AwaitKeyword, diagnostics, ref hasErrors);
270
switch (
_syntax
.Kind())
274
var node = (ForEachStatementSyntax)
_syntax
;
369
var node = (ForEachVariableStatementSyntax)
_syntax
;
375
var valuePlaceholder = new BoundDeconstructValuePlaceholder(
_syntax
.Expression, variableSymbol: null, isDiscardExpression: false, iterationVariableType.Type).MakeCompilerGenerated();
381
right:
_syntax
.Expression,
416
throw ExceptionUtilities.UnexpectedValue(
_syntax
.Kind());
419
BoundStatement body = originalBinder.BindPossibleEmbeddedStatement(
_syntax
.Statement, diagnostics);
427
_syntax
.HasErrors ||
437
_syntax
,
455
var foreachKeyword =
_syntax
.ForEachKeyword;
477
var elementPlaceholder = new BoundValuePlaceholder(
_syntax
, inferredType.Type).MakeCompilerGenerated();
501
BoundExpression elementConversion = CreateConversion(
_syntax
, elementPlaceholder, elementConversionClassification, isCast: false, conversionGroupOpt: null, iterationVariableType.Type, createConversionDiagnostics);
507
var location =
_syntax
.ForEachKeyword.GetLocation();
533
diagnostics.Add(
_syntax
.ForEachKeyword, useSiteInfo);
556
builder.CurrentPlaceholder = new BoundValuePlaceholder(
_syntax
, builder.CurrentPropertyGetter.ReturnType).MakeCompilerGenerated();
557
builder.CurrentConversion = CreateConversion(
_syntax
, builder.CurrentPlaceholder, currentConversionClassification, isCast: false, conversionGroupOpt: null, builder.ElementType, diagnostics);
577
_syntax
,
596
? this.GetWellKnownType(WellKnownType.System_Threading_Tasks_ValueTask, diagnostics, this.
_syntax
)
600
var expr =
_syntax
.Expression;
601
ReportBadAwaitDiagnostics(
_syntax
.AwaitKeyword, diagnostics, ref hasErrors);
613
GetEnumeratorInfoAndInferCollectionElementType(
_syntax
, collectionSyntax, ref collectionExpr, isAsync: IsAsync, isSpread: false, diagnostics, out TypeWithAnnotations inferredType, builder: out _);