14 writes to Parent
System.Text.RegularExpressions (14)
System\Text\RegularExpressions\RegexNode.cs (11)
486
reduced.
Parent
= this;
1149
atChildren[k].
Parent
= this;
1156
atChild.
Parent
= this;
1808
atChildren[k].
Parent
= this;
1815
atChild.
Parent
= this;
3323
newChild.
Parent
= this; // so that the child can see its parent while being reduced
3325
newChild.
Parent
= this; // in case Reduce returns a different node that needs to be reparented
3345
newChild.
Parent
= this; // so that the child can see its parent while being reduced
3347
newChild.
Parent
= this; // in case Reduce returns a different node that needs to be reparented
3357
newChild.
Parent
= this; // so that the child can see its parent while being reduced
3359
newChild.
Parent
= this; // in case Reduce returns a different node that needs to be reparented
System\Text\RegularExpressions\RegexParser.cs (3)
2213
_group!.
Parent
= _stack;
2214
_alternation!.
Parent
= _group;
2215
_concatenation!.
Parent
= _alternation;
17 references to Parent
System.Text.RegularExpressions (17)
System\Text\RegularExpressions\RegexCompiler.cs (1)
1684
Debug.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"/>.
205
if (
Parent
is not { Kind: RegexNodeKind.Atomic })
256
Debug.Assert(child.
Parent
== node, $"{child.Describe()} missing reference to parent {node.Describe()}");
373
Debug.Assert(rootNode.
Parent
is null);
440
if (node.
Parent
is { Kind: RegexNodeKind.Concatenate } parent)
546
node.
Parent
is not { Kind: RegexNodeKind.Atomic }) // validate grandparent isn't atomic
1316
if (alternation.
Parent
is RegexNode { Kind: RegexNodeKind.Atomic })
1523
if (alternation.
Parent
is RegexNode parent && parent.Kind == RegexNodeKind.Atomic)
2696
RegexNode? parent = node.
Parent
;
2790
node.
Parent
is not RegexNode parent)
3481
curNode = curNode.
Parent
;
System\Text\RegularExpressions\RegexParser.cs (3)
2223
_alternation = _concatenation!.
Parent
;
2224
_group = _alternation!.
Parent
;
2225
_stack = _group!.
Parent
;
System\Text\RegularExpressions\RegexWriter.cs (1)
103
curNode = curNode.
Parent
!;