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; 371var node = (ForEachVariableStatementSyntax)_syntax; 377var valuePlaceholder = new BoundDeconstructValuePlaceholder(_syntax.Expression, variableSymbol: null, isDiscardExpression: false, iterationVariableType.Type).MakeCompilerGenerated(); 383right: _syntax.Expression, 418throw ExceptionUtilities.UnexpectedValue(_syntax.Kind()); 421BoundStatement body = originalBinder.BindPossibleEmbeddedStatement(_syntax.Statement, diagnostics); 429_syntax.HasErrors || 439_syntax, 457var foreachKeyword = _syntax.ForEachKeyword; 479var elementPlaceholder = new BoundValuePlaceholder(_syntax, inferredType.Type).MakeCompilerGenerated(); 503BoundExpression elementConversion = CreateConversion(_syntax, elementPlaceholder, elementConversionClassification, isCast: false, conversionGroupOpt: null, iterationVariableType.Type, createConversionDiagnostics); 509var location = _syntax.ForEachKeyword.GetLocation(); 535diagnostics.Add(_syntax.ForEachKeyword, useSiteInfo); 558builder.CurrentPlaceholder = new BoundValuePlaceholder(_syntax, builder.CurrentPropertyGetter.ReturnType).MakeCompilerGenerated(); 559builder.CurrentConversion = CreateConversion(_syntax, builder.CurrentPlaceholder, currentConversionClassification, isCast: false, conversionGroupOpt: null, builder.ElementType, diagnostics); 579_syntax, 598? this.GetWellKnownType(WellKnownType.System_Threading_Tasks_ValueTask, diagnostics, this._syntax) 602var expr = _syntax.Expression; 603ReportBadAwaitDiagnostics(_syntax.AwaitKeyword, diagnostics, ref hasErrors); 615GetEnumeratorInfoAndInferCollectionElementType(_syntax, collectionSyntax, ref collectionExpr, isAsync: IsAsync, isSpread: false, diagnostics, out TypeWithAnnotations inferredType, builder: out _);