13 writes to Parent
System.Text.RegularExpressions (13)
System\Text\RegularExpressions\RegexNode.cs (10)
1094atChildren[k].Parent = this; 1101atChild.Parent = this; 1688atChildren[k].Parent = this; 1695atChild.Parent = this; 3029newChild.Parent = this; // so that the child can see its parent while being reduced 3031newChild.Parent = this; // in case Reduce returns a different node that needs to be reparented 3051newChild.Parent = this; // so that the child can see its parent while being reduced 3053newChild.Parent = this; // in case Reduce returns a different node that needs to be reparented 3063newChild.Parent = this; // so that the child can see its parent while being reduced 3065newChild.Parent = this; // in case Reduce returns a different node that needs to be reparented
System\Text\RegularExpressions\RegexParser.cs (3)
2037_group!.Parent = _stack; 2038_alternation!.Parent = _group; 2039_concatenation!.Parent = _alternation;
17 references to Parent
System.Text.RegularExpressions (17)
System\Text\RegularExpressions\RegexCompiler.cs (1)
1659Debug.Assert(node.Parent is not null);
System\Text\RegularExpressions\RegexNode.cs (12)
46/// During parsing, top-level nodes are also stacked onto a parse stack (a stack of trees) using <see cref="Parent"/>. 47/// After parsing, <see cref="Parent"/> is the node in the tree that has this node as or in <see cref="Children"/>. 205if (Parent is not { Kind: RegexNodeKind.Atomic }) 256Debug.Assert(child.Parent == node, $"{child.Describe()} missing reference to parent {node.Describe()}"); 373Debug.Assert(rootNode.Parent is null); 426if (node.Parent is { Kind: RegexNodeKind.Concatenate } parent) 499node.Parent is not { Kind: RegexNodeKind.Atomic }) // validate grandparent isn't atomic 1269if (alternation.Parent is RegexNode { Kind: RegexNodeKind.Atomic }) 1473if (alternation.Parent is RegexNode parent && parent.Kind == RegexNodeKind.Atomic) 2485RegexNode? parent = subsequent.Parent; 2539node.Parent is not RegexNode parent) 3179curNode = curNode.Parent;
System\Text\RegularExpressions\RegexParser.cs (3)
2047_alternation = _concatenation!.Parent; 2048_group = _alternation!.Parent; 2049_stack = _group!.Parent;
System\Text\RegularExpressions\RegexWriter.cs (1)
103curNode = curNode.Parent!;