13 references to IsReturnableConstruct
Microsoft.CodeAnalysis.CSharp.Features (8)
ExtractMethod\CSharpMethodExtractor.CSharpCodeGenerator.cs (1)
797var container = lastStatement.GetAncestorsOrThis<SyntaxNode>().FirstOrDefault(n => n.IsReturnableConstruct());
GoToDefinition\CSharpGoToDefinitionSymbolService.cs (3)
96if (node.IsReturnableConstruct() || 112if (node.IsReturnableConstruct() || 126while (node is not null && !node.IsReturnableConstruct())
Highlighting\KeywordHighlighters\AsyncAwaitHighlighter.cs (1)
63if (!childNode.IsReturnableConstruct())
Highlighting\KeywordHighlighters\ReturnStatementHighlighter.cs (1)
63if (!child.AsNode().IsReturnableConstruct())
Highlighting\KeywordHighlighters\YieldStatementHighlighter.cs (2)
35.FirstOrDefault(n => n.IsReturnableConstruct()); 67if (!child.AsNode().IsReturnableConstruct())
Microsoft.CodeAnalysis.CSharp.Workspaces (5)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ExpressionSyntaxExtensions.cs (1)
975if (current.IsReturnableConstruct())
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxNodeExtensions.cs (2)
451=> node.DescendantNodes(n => n == node || !n.IsReturnableConstruct()).Any(n => n is YieldStatementSyntax); 454=> node.IsReturnableConstruct() || (node is CompilationUnitSyntax compilationUnit && compilationUnit.Members.Any(SyntaxKind.GlobalStatement));
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpTypeInferenceService.TypeInferrer.cs (2)
1987var declaration = yieldStatement.FirstAncestorOrSelf<SyntaxNode>(n => n.IsReturnableConstruct()); 2028var ancestor = returnStatement.FirstAncestorOrSelf<SyntaxNode>(n => n.IsReturnableConstruct());