70 references to Parent
Microsoft.CodeAnalysis.CSharp (70)
Binder\Binder_QueryErrors.cs (2)
136
for (CSharpSyntaxNode parent = node.Parent; parent != null; parent = parent.
Parent
)
152
for (CSharpSyntaxNode parent = node.Parent; parent != null; parent = parent.
Parent
)
Binder\Binder_Statements.cs (2)
828
if (declarationNode.
Parent
.Kind() == SyntaxKind.LocalDeclarationStatement &&
1903
hasUnsafeModifier: node.
Parent
?.Kind() == SyntaxKind.UnsafeStatement,
Binder\BinderFactory.BinderFactoryVisitor.cs (7)
267
return VisitCore(parent.
Parent
);
277
resultBinder = VisitCore(parent.
Parent
);
281
var propertyOrEventDecl = parent.
Parent
.
Parent
;
441
if (node.
Parent
.Kind() == SyntaxKind.CompilationUnit && syntaxTree.Options.Kind != SourceCodeKind.Regular)
1436
curr = curr.
Parent
;
1448
for (; !SyntaxFacts.IsDocumentationCommentTrivia(curr.Kind()); curr = curr.
Parent
)
Binder\ExpressionVariableFinder.cs (2)
55
Debug.Assert(node.
Parent
is ConstructorInitializerSyntax || node.
Parent
is PrimaryConstructorBaseTypeSyntax);
Compilation\AttributeSemanticModel.cs (2)
70
var parent = node.
Parent
;
73
parent = parent.
Parent
;
Compilation\CSharpSemanticModel.cs (4)
93
if (!isSpeculative && node.
Parent
!= null && node.
Parent
.Kind() == SyntaxKind.NameEquals && node.
Parent
.
Parent
.Kind() == SyntaxKind.UsingDirective)
Compilation\InitializerSemanticModel.cs (1)
196
this.Root == node.
Parent
/*field initializer*/;
Compilation\MemberSemanticModel.cs (9)
1554
if (current.
Parent
== null || current.
Parent
.Kind() != SyntaxKind.LocalFunctionStatement)
2180
return node.
Parent
;
2212
var parent = node.
Parent
;
2237
var grandparent = parent.
Parent
;
2282
CSharpSyntaxNode? parent = node.
Parent
;
2303
var pp = parent.
Parent
;
2322
case { RawKind: (int)SyntaxKind.SimpleMemberAccessExpression,
Parent
.RawKind: (int)SyntaxKind.InvocationExpression }:
2323
bindableParent = bindableParent.
Parent
;
Compilation\SyntaxTreeSemanticModel.cs (18)
247
else if (node.
Parent
.Kind() == SyntaxKind.XmlNameAttribute && (attrSyntax = (XmlNameAttributeSyntax)node.
Parent
).Identifier == node)
940
return GetOrAddModel((CompilationUnitSyntax)memberDecl.
Parent
);
962
return GetMemberModel(memberDecl.
Parent
);
1116
ExceptionUtilities.UnexpectedValue(node.
Parent
);
1120
switch (node.
Parent
.Kind())
1124
var variableDecl = (VariableDeclaratorSyntax)node.
Parent
;
1137
var propertyDecl = (PropertyDeclarationSyntax)node.
Parent
;
1150
ParameterSyntax parameterDecl = (ParameterSyntax)node.
Parent
;
1165
var enumDecl = (EnumMemberDeclarationSyntax)node.
Parent
;
1177
throw ExceptionUtilities.UnexpectedValue(node.
Parent
.Kind());
1186
if (node.
Parent
is BasePropertyDeclarationSyntax)
1193
ExceptionUtilities.UnexpectedValue(node.
Parent
);
1208
var parent = node.
Parent
;
1577
var propertyOrEventDecl = declarationSyntax.
Parent
.
Parent
;
2301
if (memberDeclaration.
Parent
.Kind() == SyntaxKind.CompilationUnit)
2325
var container = GetDeclaredNamespaceOrType(memberDeclaration.
Parent
);
Compiler\MethodCompiler.cs (2)
2134
var parent = child.
Parent
;
2139
parent = child.
Parent
;
DocumentationComments\SourceDocumentationCommentUtils.cs (1)
53
curr = curr.
Parent
;
Parser\LanguageParser.cs (3)
142
return node != null ? node.
Parent
: null;
2430
return (this.CurrentNode.
Parent
is Syntax.CompilationUnitSyntax);
4666
CSharp.CSharpSyntaxNode grandparent = parent.
Parent
;
Symbols\Source\SourceEventSymbol.cs (4)
150
Debug.Assert(syntax.
Parent
!.
Parent
is object);
151
return ((EventFieldDeclarationSyntax)syntax.
Parent
.
Parent
).AttributeLists;
Symbols\Source\SourceMemberFieldSymbol.cs (2)
408
return (BaseFieldDeclarationSyntax)declarator.
Parent
.
Parent
;
Syntax\CSharpSyntaxNode.cs (3)
72
var parent = node.
Parent
;
407
curr = curr.
Parent
;
524
var parent = this.
Parent
;
Syntax\NamespaceDeclarationSyntaxReference.cs (1)
37
node = node.
Parent
;
Syntax\SyntaxExtensions.cs (2)
262
return node.
Parent
!= null && IsInContextWhichNeedsDynamicAttribute(node.
Parent
);
Syntax\SyntaxFactory.cs (5)
2141
CSharpSyntaxNode? parent = node.
Parent
;
2188
CSharpSyntaxNode? grandparent = parent.
Parent
;
2229
if (parent.
Parent
.IsKind(SyntaxKind.Subpattern))
2231
return parent.
Parent
;
2254
currentNode = currentNode.
Parent
;