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); 261var expr = _syntax.Expression; 262ReportBadAwaitDiagnostics(_syntax.AwaitKeyword, diagnostics, ref hasErrors); 278switch (_syntax.Kind()) 282var node = (ForEachStatementSyntax)_syntax; 379var node = (ForEachVariableStatementSyntax)_syntax; 385var valuePlaceholder = new BoundDeconstructValuePlaceholder(_syntax.Expression, variableSymbol: null, isDiscardExpression: false, iterationVariableType.Type).MakeCompilerGenerated(); 391right: _syntax.Expression, 426throw ExceptionUtilities.UnexpectedValue(_syntax.Kind()); 429BoundStatement body = originalBinder.BindPossibleEmbeddedStatement(_syntax.Statement, diagnostics); 437_syntax.HasErrors || 447_syntax, 465var foreachKeyword = _syntax.ForEachKeyword; 487var elementPlaceholder = new BoundValuePlaceholder(_syntax, inferredType.Type).MakeCompilerGenerated(); 511BoundExpression elementConversion = CreateConversion(_syntax, elementPlaceholder, elementConversionClassification, isCast: false, conversionGroupOpt: null, iterationVariableType.Type, createConversionDiagnostics); 517var location = _syntax.ForEachKeyword.GetLocation(); 543diagnostics.Add(_syntax.ForEachKeyword, useSiteInfo); 566builder.CurrentPlaceholder = new BoundValuePlaceholder(_syntax, builder.CurrentPropertyGetter.ReturnType).MakeCompilerGenerated(); 567builder.CurrentConversion = CreateConversion(_syntax, builder.CurrentPlaceholder, currentConversionClassification, isCast: false, conversionGroupOpt: null, builder.ElementType, diagnostics); 588_syntax, 607? this.GetWellKnownType(WellKnownType.System_Threading_Tasks_ValueTask, diagnostics, this._syntax) 611var expr = _syntax.Expression; 612ReportBadAwaitDiagnostics(_syntax.AwaitKeyword, diagnostics, ref hasErrors); 624GetEnumeratorInfoAndInferCollectionElementType(_syntax, collectionSyntax, ref collectionExpr, isAsync: IsAsync, isSpread: false, diagnostics, out TypeWithAnnotations inferredType, builder: out _);