58 references to Parent
Microsoft.CodeAnalysis (3)
Syntax\SyntaxNodeOrToken.cs (3)
951var parent = this.Parent; 966if (this.Parent != null) 971foreach (var child in this.Parent.ChildNodesAndTokens().Reverse())
Microsoft.CodeAnalysis.CodeStyle (3)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\TokenData.cs (2)
103while (current.Parent != root) 104current = current.Parent;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SyntaxPath.cs (1)
56var parent = nodeOrToken.Parent;
Microsoft.CodeAnalysis.CodeStyle.Fixes (4)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Simplification\AbstractSimplificationService.cs (4)
233if (currentNodeOrToken.Parent == null && 234nodeOrToken.Parent != null && 241? nodeOrToken.Parent.ReplaceNode(nodeOrToken.AsNode()!, currentNodeOrToken.AsNode()!) 242: nodeOrToken.Parent.ReplaceToken(nodeOrToken.AsToken(), currentNodeOrToken.AsToken());
Microsoft.CodeAnalysis.CSharp (7)
Parser\Blender.Cursor.cs (3)
64if (this.CurrentNodeOrToken.Parent != null) 68var siblings = this.CurrentNodeOrToken.Parent.ChildNodesAndTokens(); 84var parent = this.CurrentNodeOrToken.Parent;
Parser\Blender.Reader.cs (1)
242(nodeOrToken.IsToken && ((CSharpSyntaxNode)nodeOrToken.AsToken().Node).ContainsSkippedText && nodeOrToken.Parent.ContainsDiagnostics))
Symbols\Source\SourceLabelSymbol.cs (3)
81return _identifierNodeOrToken.IsToken && _identifierNodeOrToken.Parent == null 95if (_identifierNodeOrToken.Parent != null) 96node = _identifierNodeOrToken.Parent.FirstAncestorOrSelf<LabeledStatementSyntax>();
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (2)
ParentChecker.cs (1)
56var parent = child.Parent;
Syntax\SyntaxNodeTests.cs (1)
1812Assert.Equal(rootNode, nodeOrToken.Parent);
Microsoft.CodeAnalysis.EditorFeatures (4)
TextStructureNavigation\AbstractTextStructureNavigatorProvider.TextStructureNavigator.cs (4)
345while (node.Parent != null && node.Parent.Span == node.Span) 347node = node.Parent; 359var parent = SkipSameSpanParents(node).Parent;
Microsoft.CodeAnalysis.Features (2)
SplitOrMergeIfStatements\AbstractSplitIfStatementCodeRefactoringProvider.cs (2)
85while (current.Parent?.RawKind == syntaxKind) 87current = current.Parent;
Microsoft.CodeAnalysis.VisualBasic.Features (10)
EditAndContinue\VisualBasicEditAndContinueAnalyzer.vb (7)
348If nodeOrToken.Parent IsNot Nothing Then 349If nodeOrToken.Parent.IsKind(SyntaxKind.MultiLineIfBlock) Then 350lastBlockStatement = DirectCast(nodeOrToken.Parent, MultiLineIfBlockSyntax).Statements.LastOrDefault() 351ElseIf nodeOrToken.Parent.IsKind(SyntaxKind.SingleLineIfStatement) Then 352lastBlockStatement = DirectCast(nodeOrToken.Parent, SingleLineIfStatementSyntax).Statements.LastOrDefault() 353ElseIf nodeOrToken.Parent.IsKind(SyntaxKind.TryBlock) Then 354lastBlockStatement = DirectCast(nodeOrToken.Parent, TryBlockSyntax).Statements.LastOrDefault()
ExtractInterface\VisualBasicExtractInterfaceService.vb (3)
139Dim method = TryCast(token.Parent, MethodStatementSyntax) 145Dim [event] = TryCast(token.Parent, EventStatementSyntax) 151Dim prop = TryCast(token.Parent, PropertyStatementSyntax)
Microsoft.CodeAnalysis.VisualBasic.Syntax.UnitTests (7)
TestSyntaxNodes.vb (7)
68Assert.Equal(argList, argList.Arguments.GetWithSeparators(1).Parent) 69Assert.Equal(argList, argList.Arguments.GetWithSeparators(3).Parent) 630Assert.Null(sepList.GetWithSeparators(3).Parent) 651Assert.Equal(statement, sepList.GetWithSeparators(3).Parent) 2025tk0 = tk0.Parent 2045Dim mDecl = tk0.Parent 2076Dim mDecl = tk0.Parent
Microsoft.CodeAnalysis.VisualBasic.Test.Utilities (9)
ParserTestUtilities.vb (9)
165Dim parent = child.Parent 431If node.Parent IsNot Nothing Then 432VerifyContainsErrors(node.Parent, tree, tree.GetDiagnostics(node).ToXml) 844" [See under TokenKind=" & node.Kind().ToString & ", NonTerminalKind=" & node.Parent.Kind.ToString & "]") 856If node.Parent IsNot Nothing Then 857Assert.True(node.SpanStart >= node.Parent.SpanStart AndAlso 858node.Span.End <= node.Parent.Span.End, "Span of child (" & 861node.Parent.Kind.ToString & node.Parent.Span.ToString & ")")
Microsoft.CodeAnalysis.Workspaces (7)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\TokenData.cs (2)
103while (current.Parent != root) 104current = current.Parent;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SyntaxPath.cs (1)
56var parent = nodeOrToken.Parent;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Simplification\AbstractSimplificationService.cs (4)
233if (currentNodeOrToken.Parent == null && 234nodeOrToken.Parent != null && 241? nodeOrToken.Parent.ReplaceNode(nodeOrToken.AsNode()!, currentNodeOrToken.AsNode()!) 242: nodeOrToken.Parent.ReplaceToken(nodeOrToken.AsToken(), currentNodeOrToken.AsToken());