19 references to ForEachPart
Microsoft.CodeAnalysis.CSharp.Features (19)
EditAndContinue\CSharpEditAndContinueAnalyzer.cs (19)
486private static ForEachPart GetStatementPart(CommonForEachStatementSyntax node, int position)
487=> position < node.OpenParenToken.SpanStart ? ForEachPart.ForEach :
488position < node.InKeyword.SpanStart ? ForEachPart.VariableDeclaration :
489position < node.Expression.SpanStart ? ForEachPart.In :
490ForEachPart.Expression;
492private static TextSpan GetActiveSpan(ForEachStatementSyntax node, ForEachPart part)
495ForEachPart.ForEach => node.ForEachKeyword.Span,
496ForEachPart.VariableDeclaration => TextSpan.FromBounds(node.Type.SpanStart, node.Identifier.Span.End),
497ForEachPart.In => node.InKeyword.Span,
498ForEachPart.Expression => node.Expression.Span,
502private static TextSpan GetActiveSpan(ForEachVariableStatementSyntax node, ForEachPart part)
505ForEachPart.ForEach => node.ForEachKeyword.Span,
506ForEachPart.VariableDeclaration => TextSpan.FromBounds(node.Variable.SpanStart, node.Variable.Span.End),
507ForEachPart.In => node.InKeyword.Span,
508ForEachPart.Expression => node.Expression.Span,
857span = GetActiveSpan((ForEachStatementSyntax)node, (ForEachPart)statementPart);
861span = GetActiveSpan((ForEachVariableStatementSyntax)node, (ForEachPart)statementPart);
942yield return (parent, (int)ForEachPart.In);
995yield return (node, (int)ForEachPart.ForEach);