148 references to Child
System.Text.RegularExpressions (148)
System\Text\RegularExpressions\RegexCompiler.cs (25)
1461
node = node.
Child
(0);
1773
EmitNode(node.
Child
(i));
1897
if (analysis.MayBacktrack(node.
Child
(i)))
1946
RegexNode child = node.
Child
(i);
2026
RegexNode child = node.
Child
(i);
2045
case RegexNodeKind.Concatenate when child.
Child
(0) == startingLiteralNode && (startingLiteralNode.Kind is RegexNodeKind.One or RegexNodeKind.Set or RegexNodeKind.Multi):
2053
RegexNode originalFirst = child.
Child
(0);
2055
child.
Child
(0).Kind is RegexNodeKind.Multi ?
2056
CreateSlicedMulti(child.
Child
(0)) :
2308
RegexNode yesBranch = node.
Child
(0);
2309
RegexNode? noBranch = node.
Child
(1) is { Kind: not RegexNodeKind.Empty } childNo ? childNo : null;
2465
RegexNode condition = node.
Child
(0);
2469
RegexNode yesBranch = node.
Child
(1);
2470
RegexNode? noBranch = node.
Child
(2) is { Kind: not RegexNodeKind.Empty } childNo ? childNo : null;
2664
RegexNode child = node.
Child
(0);
2847
RegexNode child = node.
Child
(0);
3079
RegexNode child = node.
Child
(0);
3181
EmitNode(node.
Child
(i), GetSubsequent(i, node, subsequent), emitLengthChecksIfRequired: false);
3188
EmitNode(node.
Child
(i), GetSubsequent(i, node, subsequent));
3197
RegexNode next = node.
Child
(i);
4163
RegexNode child = node.
Child
(0);
5010
Debug.Assert(!analysis.MayBacktrack(node.
Child
(0)), $"Expected non-backtracking node {node.Kind}");
5026
EmitNode(node.
Child
(0));
5048
RegexNode child = node.
Child
(0);
5665
RegexNode root = _regexTree!.Root.
Child
(0);
System\Text\RegularExpressions\RegexFindOptimizations.cs (1)
26
RegexFindOptimizations positiveLookaheadOpts = new(positiveLookahead.
Child
(0), options, isLeadingPartial: true);
System\Text\RegularExpressions\RegexNode.cs (81)
210
loopAsChild.AddChild(
Child
(0));
255
RegexNode child = node.
Child
(i);
423
RegexNode node = rootNode.
Child
(0); // skip implicit root capture node
430
node = node.
Child
(0);
435
node = node.
Child
(0);
480
RegexNode child =
Child
(i);
533
node = node.
Child
(0);
544
RegexNode existingChild = node.
Child
(node.ChildCount() - 1);
565
node.
Child
(i).EliminateEndingBacktracking();
570
node = node.
Child
(0);
593
node = node.
Child
(0);
599
if (node.N == 1 || CanBeMadeAtomic(node.
Child
(0), node.
Child
(0), iterateNullableSubsequent: false, allowLazy: false))
606
node = node.
Child
(0);
663
1 =>
Child
(0),
682
u = u.
Child
(0);
708
RegexNode child =
Child
(0);
712
child = atomic.
Child
(0);
851
(child.
Child
(0).Kind is RegexNodeKind.Empty || child.
Child
(1).Kind is RegexNodeKind.Empty); // can be transformed into a ? or ??
858
child = atomic.
Child
(0);
891
RegexNode child = u.
Child
(0);
959
RegexNode child = u.
Child
(0);
1081
return
Child
(0);
1102
if (node.
Child
(1).Kind is RegexNodeKind.Empty)
1104
node = node.
Child
(0).MakeQuantifier(lazy: false, min: 0, max: 1);
1106
else if (node.
Child
(0).Kind is RegexNodeKind.Empty)
1108
node = node.
Child
(1).MakeQuantifier(lazy: true, min: 0, max: 1);
1260
RegexNode required = startingNode.Kind == RegexNodeKind.Concatenate ? startingNode.
Child
(0) : startingNode;
1281
RegexNode other = endingNode.Kind == RegexNodeKind.Concatenate ? endingNode.
Child
(0) : endingNode;
1485
ProcessOneOrMulti(branch.Kind == RegexNodeKind.Concatenate ? branch.
Child
(0) : branch, startingSpan);
1537
return alternation.ChildCount() == 1 ? alternation.
Child
(0) : alternation;
1550
RegexNode branch = Kind == RegexNodeKind.Concatenate ?
Child
(0) : this;
1587
if (
Child
(i).FindStartingLiteralNode(allowZeroWidth: false) is not RegexNode startingLiteralNode ||
1657
node = node.
Child
(0);
1750
return
Child
(0);
1757
RegexNode child =
Child
(i);
2064
Child
(i).FindAndMakeLoopsAtomic();
2095
node = node.
Child
(node.ChildCount() - 1);
2144
RegexNode loopChild = node.
Child
(0);
2147
loopChild = loopChild.
Child
(loopChild.ChildCount() - 1);
2160
!MayContainBacktracking(node.
Child
(0)))
2178
RegexNode child = node.
Child
(0);
2188
RegexNode child = node.
Child
(0);
2209
ProcessNode(node.
Child
(b), subsequent);
2229
if (Kind is RegexNodeKind.NegativeLookaround && ContainsKind(
Child
(0), [RegexNodeKind.Backreference, RegexNodeKind.BackreferenceConditional]) is false)
2235
ReplaceChild(0,
Child
(0));
2240
RegexNode node = parent.
Child
(nodeIndex);
2246
parent.ReplaceChild(nodeIndex, node.
Child
(0));
2270
RegexNode child =
Child
(0);
2329
if (ContainsKind(node.
Child
(i), kinds) is true)
2376
RegexNode condition =
Child
(0);
2379
ReplaceChild(0, condition.
Child
(0));
2384
condition =
Child
(0);
2464
node = node.
Child
(node.ChildCount() - 1);
2495
subsequent = subsequent.
Child
(0);
2522
if (!CanBeMadeAtomic(node, subsequent.
Child
(i), iterateNullableSubsequent, allowLazy: false))
2618
RegexNode loopChild = node.
Child
(0);
2769
if (MayContainBacktracking(node.
Child
(i)))
2868
return (int)Math.Min(int.MaxValue - 1, (long)M *
Child
(0).ComputeMinLength());
2875
int min =
Child
(0).ComputeMinLength();
2878
min = Math.Min(min,
Child
(i).ComputeMinLength());
2885
return Math.Min(
Child
(0).ComputeMinLength(),
Child
(1).ComputeMinLength());
2889
return Math.Min(
Child
(1).ComputeMinLength(),
Child
(2).ComputeMinLength());
2898
sum +=
Child
(i).ComputeMinLength();
2908
return
Child
(0).ComputeMinLength();
2976
if (
Child
(0).ComputeMaxLength() is int childMaxLength)
2992
if (
Child
(0).ComputeMaxLength() is not int maxLength)
2999
if (
Child
(i).ComputeMaxLength() is not int next)
3015
return
Child
(i).ComputeMaxLength() is int yes &&
Child
(i + 1).ComputeMaxLength() is int no ?
3027
if (
Child
(i).ComputeMaxLength() is not int length)
3046
return
Child
(0).ComputeMaxLength();
3116
RegexNode child =
Child
(i);
3129
child = child.
Child
(0);
3254
RegexNode child =
Child
(childIndex);
3262
child =
Child
(exclusiveEnd);
3438
if (ExceedsMaxDepthAllowedDepth(node.
Child
(i), allowedDepth - 1))
3471
curNode = curNode.
Child
(curChild);
System\Text\RegularExpressions\RegexPrefixAnalyzer.cs (36)
86
node = node.
Child
(0);
217
if (!FindPrefixesCore(node.
Child
(i), results, ignoreCase))
231
if (!FindPrefixesCore(node.
Child
(0), results, ignoreCase))
258
_ = FindPrefixesCore(node.
Child
(i), alternateBranchResults, ignoreCase);
368
if (!Process(node.
Child
(i), ref vsb))
385
Process(node.
Child
(0), ref vsb);
401
Process(node.
Child
(i), ref alternateSb);
445
if (!Process(node.
Child
(0), ref vsb))
456
return Process(node.
Child
(0), ref vsb);
494
node = node.
Child
(0);
684
return TryFindRawFixedSets(node.
Child
(0), results, ref distance, thorough);
693
TryFindRawFixedSets(node.
Child
(0), results, ref distance, thorough);
701
if (!TryFindRawFixedSets(node.
Child
(i), results, ref distance, thorough))
721
allSameSize &= TryFindRawFixedSets(node.
Child
(i), localResults, ref localDistance, thorough);
1032
return TryFindFirstOrLastCharClass(node.
Child
(0), findFirst, ref cc);
1039
return TryFindFirstOrLastCharClass(node.
Child
(0), findFirst, ref cc) switch
1057
bool? childResult = TryFindFirstOrLastCharClass(node.
Child
(i), findFirst, ref cc);
1068
bool? childResult = TryFindFirstOrLastCharClass(node.
Child
(i), findFirst, ref cc);
1087
bool? childResult = TryFindFirstOrLastCharClass(node.
Child
(i), findFirst, ref cc);
1105
return (TryFindFirstOrLastCharClass(node.
Child
(branchStart), findFirst, ref cc), TryFindFirstOrLastCharClass(node.
Child
(branchStart + 1), findFirst, ref cc)) switch
1140
node = node.
Child
(0);
1154
RegexNode firstChild = node.
Child
(0);
1157
firstChild = firstChild.
Child
(0);
1166
RegexNode nextChild = node.
Child
(1);
1174
nextChild = node.
Child
(2);
1227
nextChild = nextChild.
Child
(0);
1300
node = node.
Child
(0);
1306
FindLeadingPositiveLookahead(node.
Child
(0), ref positiveLookahead);
1314
if (!FindLeadingPositiveLookahead(node.
Child
(i), ref positiveLookahead))
1370
node = node.
Child
(0);
1385
RegexNode tmpChild = node.
Child
(i);
1416
if (node.
Child
(i).Kind is not (RegexNodeKind.Empty or RegexNodeKind.PositiveLookaround or RegexNodeKind.NegativeLookaround))
1418
child = node.
Child
(i);
1481
RegexNodeKind anchor = FindLeadingOrTrailingAnchor(node.
Child
(0), leading);
1492
if (FindLeadingOrTrailingAnchor(node.
Child
(i), leading) != anchor)
System\Text\RegularExpressions\RegexReplacement.cs (1)
46
RegexNode child = concat.
Child
(i);
System\Text\RegularExpressions\RegexTreeAnalyzer.cs (1)
81
RegexNode child = node.
Child
(i);
System\Text\RegularExpressions\RegexWriter.cs (1)
91
curNode = curNode.
Child
(curChild);
System\Text\RegularExpressions\Symbolic\RegexNodeConverter.cs (2)
99
stack.Push((node.
Child
(i), childResults[i], CreateChildResultArray(node.
Child
(i).ChildCount())));