91 references to DoStatementSyntax
Microsoft.CodeAnalysis.CSharp (13)
Binder\Binder_Statements.cs (2)
82result = BindDo((DoStatementSyntax)node, diagnostics); 2769private BoundStatement BindDo(DoStatementSyntax node, BindingDiagnosticBag diagnostics)
Binder\LocalBinderFactory.cs (1)
585public override void VisitDoStatement(DoStatementSyntax node)
Binder\WhileBinder.cs (3)
40var node = (DoStatementSyntax)_syntax; 59condition = ((DoStatementSyntax)_syntax).Condition;
Lowering\Instrumentation\DebugInfoInjector.cs (2)
243var doSyntax = (DoStatementSyntax)original.Syntax;
Parser\LanguageParser.cs (1)
9110private DoStatementSyntax ParseDoStatement(SyntaxList<AttributeListSyntax> attributes)
Syntax\DoStatementSyntax.cs (2)
11public DoStatementSyntax Update(SyntaxToken doKeyword, StatementSyntax statement, SyntaxToken whileKeyword, SyntaxToken openParenToken, ExpressionSyntax condition, SyntaxToken closeParenToken, SyntaxToken semicolonToken) 20public static DoStatementSyntax DoStatement(SyntaxToken doKeyword, StatementSyntax statement, SyntaxToken whileKeyword, SyntaxToken openParenToken, ExpressionSyntax condition, SyntaxToken closeParenToken, SyntaxToken semicolonToken)
Syntax\LookupPosition.cs (2)
328return ((DoStatementSyntax)statement).DoKeyword; 389return ((DoStatementSyntax)statement).SemicolonToken;
Microsoft.CodeAnalysis.CSharp.CodeStyle (7)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ParenthesizedExpressionSyntaxExtensions.cs (1)
146(nodeParent is DoStatementSyntax doStatement && doStatement.Condition == node) ||
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxNodeExtensions.cs (3)
116return node is DoStatementSyntax or 131DoStatementSyntax n => n.Statement, 708DoStatementSyntax n => (n.OpenParenToken, n.CloseParenToken),
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\FormattingHelpers.cs (1)
294DoStatementSyntax doStatement => doStatement.CloseParenToken.Equals(token),
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\IndentBlockFormattingRule.cs (1)
343if (node is DoStatementSyntax doStatement && doStatement.Statement != null && !(doStatement.Statement is BlockSyntax))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\SuppressFormattingRule.cs (1)
142if (node is DoStatementSyntax whileStatementNode)
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (4)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpMoveDeclarationNearReferenceService.cs (1)
39DoStatementSyntax or
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpTypeInferenceService.TypeInferrer.cs (3)
156DoStatementSyntax doStatement => InferTypeInDoStatement(doStatement), 223DoStatementSyntax doStatement => InferTypeInDoStatement(doStatement, token), 1199private IEnumerable<TypeInferenceInfo> InferTypeInDoStatement(DoStatementSyntax doStatement, SyntaxToken? previousToken = null)
Microsoft.CodeAnalysis.CSharp.EditorFeatures (10)
AutomaticCompletion\AutomaticLineEnderCommandHandler.cs (1)
333or DoStatementSyntax
AutomaticCompletion\AutomaticLineEnderCommandHandler_Helpers.cs (5)
161DoStatementSyntax doStatementNode => AddBraceToDoStatement(services, root, doStatementNode, formattingOptions, statement, cancellationToken), 171DoStatementSyntax doStatementNode, 476DoStatementSyntax doStatementNode => ShouldAddBraceForDoStatement(doStatementNode, caretPosition), 661private static bool ShouldAddBraceForDoStatement(DoStatementSyntax doStatementNode, int caretPosition) 944DoStatementSyntax doStatementNode => doStatementNode.WithStatement(block),
CompleteStatement\CompleteStatementCommandHandler.cs (4)
310if (currentNode is not DoStatementSyntax doStatement) 372targetPosition = caret.Snapshot.GetPoint(((DoStatementSyntax)statementNode).CloseParenToken.Span.End); 540var dostatement = (DoStatementSyntax)currentNode;
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (6)
Semantics\OutVarTests.cs (4)
1302reference.Ancestors().OfType<DoStatementSyntax>().Join( 1303decl.Ancestors().OfType<DoStatementSyntax>(), d => d, d => d, (d1, d2) => true).Any()))) 4000var statement = (DoStatementSyntax)SyntaxFactory.ParseStatement(@"
Semantics\PatternMatchingTests_Scope.cs (2)
7530var statement = (DoStatementSyntax)SyntaxFactory.ParseStatement(@"
Microsoft.CodeAnalysis.CSharp.Features (29)
Debugging\CSharpProximityExpressionsService.RelevantExpressionsCollector.cs (1)
38public override void VisitDoStatement(DoStatementSyntax node)
Debugging\CSharpProximityExpressionsService.Worker.cs (2)
196AddExpressionTerms((previousStatement as DoStatementSyntax).Condition, _expressions); 249AddLastStatementOfConstruct((statement as DoStatementSyntax).Statement);
EditAndContinue\BreakpointSpans.cs (2)
614var doStatement = (DoStatementSyntax)statement;
EditAndContinue\CSharpEditAndContinueAnalyzer.cs (8)
253Debug.Assert(position == ((DoStatementSyntax)node).WhileKeyword.SpanStart); 631var doStatement = (DoStatementSyntax)node; 824return AreEquivalentActiveStatements((DoStatementSyntax)oldStatement, (DoStatementSyntax)newStatement); 861private static bool AreEquivalentActiveStatements(DoStatementSyntax oldNode, DoStatementSyntax newNode) 1817return ((DoStatementSyntax)node).DoKeyword.Span;
EditAndContinue\SyntaxComparer.cs (4)
869var leftDo = (DoStatementSyntax)leftNode; 870var rightDo = (DoStatementSyntax)rightNode;
ExtractMethod\CSharpMethodExtractor.CSharpCodeGenerator.CallSiteContainerRewriter.cs (1)
251public override SyntaxNode VisitDoStatement(DoStatementSyntax node)
ExtractMethod\CSharpSelectionValidator.Validator.cs (2)
32DoStatementSyntax or 58DoStatementSyntax or
Highlighting\KeywordHighlighters\LoopHighlighter.cs (2)
42case DoStatementSyntax doStatement: 59private static void HighlightDoStatement(DoStatementSyntax statement, List<TextSpan> spans)
InvertIf\CSharpInvertIfCodeRefactoringProvider.cs (2)
76case DoStatementSyntax: 102CommonForEachStatementSyntax or DoStatementSyntax or WhileStatementSyntax or ForStatementSyntax
Snippets\CSharpDoWhileLoopSnippetProvider.cs (5)
24: AbstractConditionalBlockSnippetProvider<DoStatementSyntax, ExpressionSyntax> 33protected override DoStatementSyntax GenerateStatement(SyntaxGenerator generator, SyntaxContext syntaxContext, InlineExpressionInfo? inlineExpressionInfo) 40protected override ExpressionSyntax GetCondition(DoStatementSyntax node) 43protected override int GetTargetCaretPosition(DoStatementSyntax doStatement, SourceText sourceText) 49protected override Task<Document> AddIndentationToDocumentAsync(Document document, DoStatementSyntax doStatement, CancellationToken cancellationToken)
Microsoft.CodeAnalysis.CSharp.IOperation.UnitTests (3)
IOperation\IOperationTests_IBranchOperation.Extensions.cs (1)
88AssertOuterIsCorrespondingLoopOfInner<DoStatementSyntax, ContinueStatementSyntax>(@"
IOperation\IOperationTests_IWhileUntilLoopStatement.cs (2)
69VerifyOperationTreeForTest<DoStatementSyntax>(source, expectedOperationTree); 1385VerifyOperationTreeAndDiagnosticsForTest<DoStatementSyntax>(source, expectedOperationTree, expectedDiagnostics);
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (7)
Generated\Syntax.Test.xml.Generated.cs (5)
10610private static DoStatementSyntax GenerateDoStatement() 12479var node = GenerateDoStatement(); 12489var newNode = node.WithAttributeLists(node.AttributeLists).WithDoKeyword(node.DoKeyword).WithStatement(node.Statement).WithWhileKeyword(node.WhileKeyword).WithOpenParenToken(node.OpenParenToken).WithCondition(node.Condition).WithCloseParenToken(node.CloseParenToken).WithSemicolonToken(node.SemicolonToken); 17401var oldNode = GenerateDoStatement(); 17417var oldNode = GenerateDoStatement();
Parsing\StatementParsingTests.cs (2)
1500var ds = (DoStatementSyntax)statement;
Microsoft.CodeAnalysis.CSharp.Test.Utilities (1)
LocalVariableDeclaratorsCollector.cs (1)
72public override void VisitDoStatement(DoStatementSyntax node)
Microsoft.CodeAnalysis.CSharp.Workspaces (11)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ParenthesizedExpressionSyntaxExtensions.cs (1)
146(nodeParent is DoStatementSyntax doStatement && doStatement.Condition == node) ||
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxNodeExtensions.cs (3)
116return node is DoStatementSyntax or 131DoStatementSyntax n => n.Statement, 708DoStatementSyntax n => (n.OpenParenToken, n.CloseParenToken),
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\FormattingHelpers.cs (1)
294DoStatementSyntax doStatement => doStatement.CloseParenToken.Equals(token),
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\IndentBlockFormattingRule.cs (1)
343if (node is DoStatementSyntax doStatement && doStatement.Statement != null && !(doStatement.Statement is BlockSyntax))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\SuppressFormattingRule.cs (1)
142if (node is DoStatementSyntax whileStatementNode)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpMoveDeclarationNearReferenceService.cs (1)
39DoStatementSyntax or
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpTypeInferenceService.TypeInferrer.cs (3)
156DoStatementSyntax doStatement => InferTypeInDoStatement(doStatement), 223DoStatementSyntax doStatement => InferTypeInDoStatement(doStatement, token), 1199private IEnumerable<TypeInferenceInfo> InferTypeInDoStatement(DoStatementSyntax doStatement, SyntaxToken? previousToken = null)