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