106 references to Child
System.Text.RegularExpressions.Generator (106)
RegexGenerator.cs (1)
340if (HasCaseInsensitiveBackReferences(node.Child(i)))
RegexGenerator.Emitter.cs (9)
70DescribeExpressionAsXmlComment(writer, regexMethod.Tree.Root.Child(0), regexMethod); // skip implicit root capture 631RegexNode root = rm.Tree.Root.Child(0); 1486node = node.Child(0); 1696if (rm.Analysis.MayBacktrack(node.Child(i))) 1718if (node.Child(i).FindStartingLiteralNode(allowZeroWidth: false) is not RegexNode startingLiteralNode || 1802RegexNode child = node.Child(i); 1839case RegexNodeKind.Concatenate when child.Child(0) == startingLiteralNode && (startingLiteralNode.Kind is RegexNodeKind.One or RegexNodeKind.Set or RegexNodeKind.Multi): 1847child = child.Child(0); 1991EmitNode(node.Child(i));
src\libraries\System.Text.RegularExpressions\src\System\Text\RegularExpressions\RegexFindOptimizations.cs (1)
26RegexFindOptimizations positiveLookaheadOpts = new(positiveLookahead.Child(0), options, isLeadingPartial: true);
src\libraries\System.Text.RegularExpressions\src\System\Text\RegularExpressions\RegexNode.cs (59)
215RegexNode child = node.Child(i); 369RegexNode node = rootNode.Child(0); // skip implicit root capture node 376node = node.Child(0); 381node = node.Child(0); 441node = node.Child(0); 452RegexNode existingChild = node.Child(node.ChildCount() - 1); 473node.Child(i).EliminateEndingBacktracking(); 478node = node.Child(0); 501node = node.Child(0); 5641 => Child(0), 583u = u.Child(0); 609RegexNode child = Child(0); 613child = atomic.Child(0); 746child = atomic.Child(0); 777RegexNode child = u.Child(0); 846RegexNode child = u.Child(0); 933return Child(0); 1104RegexNode required = children[startingIndex].Child(0); 1124RegexNode other = children[endingIndex].Child(0); 1317ProcessOneOrMulti(branch.Kind == RegexNodeKind.Concatenate ? branch.Child(0) : branch, startingSpan); 1369return alternation.ChildCount() == 1 ? alternation.Child(0) : alternation; 1382RegexNode branch = Kind == RegexNodeKind.Concatenate ? Child(0) : this; 1419node = node.Child(0); 1512return Child(0); 1519RegexNode child = Child(i); 1822Child(i).FindAndMakeLoopsAtomic(); 1854node = node.Child(node.ChildCount() - 1); 1921ProcessNode(node.Child(b), subsequent); 1942node = node.Child(0); 1947node = node.Child(0); 1959RegexNode lastConcatChild = node.Child(concatCount - 1); 1960if (CanBeMadeAtomic(lastConcatChild, node.Child(0), iterateNullableSubsequent: false, allowLazy: false)) 1989if (Child(0).Kind == RegexNodeKind.Empty) 2036RegexNode condition = Child(0); 2039ReplaceChild(0, condition.Child(0)); 2044condition = Child(0); 2081subsequent = subsequent.Child(0); 2107if (!CanBeMadeAtomic(node, subsequent.Child(i), iterateNullableSubsequent, allowLazy: false)) 2291return (int)Math.Min(int.MaxValue - 1, (long)M * Child(0).ComputeMinLength()); 2298int min = Child(0).ComputeMinLength(); 2301min = Math.Min(min, Child(i).ComputeMinLength()); 2308return Math.Min(Child(0).ComputeMinLength(), Child(1).ComputeMinLength()); 2312return Math.Min(Child(1).ComputeMinLength(), Child(2).ComputeMinLength()); 2321sum += Child(i).ComputeMinLength(); 2331return Child(0).ComputeMinLength(); 2399if (Child(0).ComputeMaxLength() is int childMaxLength) 2415if (Child(0).ComputeMaxLength() is not int maxLength) 2422if (Child(i).ComputeMaxLength() is not int next) 2438return Child(i).ComputeMaxLength() is int yes && Child(i + 1).ComputeMaxLength() is int no ? 2450if (Child(i).ComputeMaxLength() is not int length) 2469return Child(0).ComputeMaxLength(); 2531RegexNode child = Child(i); 2649RegexNode child = Child(childIndex); 2657child = Child(exclusiveEnd); 2825if (ExceedsMaxDepthAllowedDepth(node.Child(i), allowedDepth - 1)) 2858curNode = curNode.Child(curChild);
src\libraries\System.Text.RegularExpressions\src\System\Text\RegularExpressions\RegexPrefixAnalyzer.cs (35)
86node = node.Child(0); 217if (!FindPrefixesCore(node.Child(i), results, ignoreCase)) 231if (!FindPrefixesCore(node.Child(0), results, ignoreCase)) 258_ = FindPrefixesCore(node.Child(i), alternateBranchResults, ignoreCase); 368if (!Process(node.Child(i), ref vsb)) 385Process(node.Child(0), ref vsb); 401Process(node.Child(i), ref alternateSb); 445if (!Process(node.Child(0), ref vsb)) 456return Process(node.Child(0), ref vsb); 494node = node.Child(0); 684return TryFindRawFixedSets(node.Child(0), results, ref distance, thorough); 693TryFindRawFixedSets(node.Child(0), results, ref distance, thorough); 701if (!TryFindRawFixedSets(node.Child(i), results, ref distance, thorough)) 721allSameSize &= TryFindRawFixedSets(node.Child(i), localResults, ref localDistance, thorough); 1022return TryFindFirstCharClass(node.Child(0), ref cc); 1029return TryFindFirstCharClass(node.Child(0), ref cc) switch 1045bool? childResult = TryFindFirstCharClass(node.Child(i), ref cc); 1063bool? childResult = TryFindFirstCharClass(node.Child(i), ref cc); 1081return (TryFindFirstCharClass(node.Child(branchStart), ref cc), TryFindFirstCharClass(node.Child(branchStart + 1), ref cc)) switch 1116node = node.Child(0); 1130RegexNode firstChild = node.Child(0); 1133firstChild = firstChild.Child(0); 1142RegexNode nextChild = node.Child(1); 1150nextChild = node.Child(2); 1203nextChild = nextChild.Child(0); 1276node = node.Child(0); 1282FindLeadingPositiveLookahead(node.Child(0), ref positiveLookahead); 1290if (!FindLeadingPositiveLookahead(node.Child(i), ref positiveLookahead)) 1348node = node.Child(0); 1363RegexNode tmpChild = node.Child(i); 1393if (node.Child(i).Kind is not (RegexNodeKind.Empty or RegexNodeKind.PositiveLookaround or RegexNodeKind.NegativeLookaround)) 1395child = node.Child(i); 1458RegexNodeKind anchor = FindLeadingOrTrailingAnchor(node.Child(0), leading); 1469if (FindLeadingOrTrailingAnchor(node.Child(i), leading) != anchor)
src\libraries\System.Text.RegularExpressions\src\System\Text\RegularExpressions\RegexTreeAnalyzer.cs (1)
85RegexNode child = node.Child(i);