91 references to ChildCount
System.Text.RegularExpressions.Generator (91)
RegexGenerator.cs (1)
378
int childCount = node.
ChildCount
();
RegexGenerator.Emitter.cs (29)
1624
Debug.Assert(node.
ChildCount
() == 1, "Capture nodes should have one child");
1806
Debug.Assert(node.
ChildCount
() >= 2, $"Expected at least 2 children, found {node.
ChildCount
()}");
1808
int childCount = node.
ChildCount
();
2273
Debug.Assert(node.
ChildCount
() == 2, $"Expected 2 children, found {node.
ChildCount
()}");
2446
Debug.Assert(node.
ChildCount
() == 3, $"Expected 3 children, found {node.
ChildCount
()}");
2626
Debug.Assert(node.
ChildCount
() == 1, $"Expected 1 child, found {node.
ChildCount
()}");
2719
Debug.Assert(node.
ChildCount
() == 1, $"Expected 1 child, found {node.
ChildCount
()}");
2760
Debug.Assert(node.
ChildCount
() == 1, $"Expected 1 child, found {node.
ChildCount
()}");
3029
Debug.Assert(node.Kind is RegexNodeKind.ExpressionConditional ? node.
ChildCount
() >= 1 : node.
ChildCount
() == 1, $"Unexpected number of children: {node.
ChildCount
()}");
3071
Debug.Assert(node.
ChildCount
() >= 2, $"Expected at least 2 children, found {node.
ChildCount
()}");
3075
int childCount = node.
ChildCount
();
3183
int childCount = node.
ChildCount
();
3787
Debug.Assert(node.
ChildCount
() == 1, $"Expected 1 child, found {node.
ChildCount
()}");
4377
Debug.Assert(node.
ChildCount
() == 1, $"Expected 1 child, found {node.
ChildCount
()}");
4397
Debug.Assert(node.
ChildCount
() == 1, $"Expected 1 child, found {node.
ChildCount
()}");
5541
RegexNodeKind.Alternate => $"Match with {node.
ChildCount
()} alternative expressions{(rm.Analysis.IsAtomicByAncestor(node) ? ", atomically" : "")}.",
5757
int childCount = node.
ChildCount
();
src\libraries\System.Text.RegularExpressions\src\System\Text\RegularExpressions\RegexNode.cs (43)
139
ChildCount
() > 1)
252
int childCount = node.
ChildCount
();
374
Debug.Assert(rootNode.
ChildCount
() == 1);
497
RegexNode existingChild = node.Child(node.
ChildCount
() - 1);
503
node.ReplaceChild(node.
ChildCount
() - 1, atomic);
515
int branches = node.
ChildCount
();
613
return
ChildCount
() switch
634
Debug.Assert(u.
ChildCount
() == 1);
658
Debug.Assert(
ChildCount
() == 1);
795
child.
ChildCount
() == 2 &&
834
while (u.
ChildCount
() > 0)
902
if (u.
ChildCount
() == 1)
1020
switch (
ChildCount
())
1045
if (node.Kind is RegexNodeKind.Alternate && node.
ChildCount
() == 2)
1287
Debug.Assert(node.
ChildCount
() >= 2);
1479
return alternation.
ChildCount
() == 1 ? alternation.Child(0) : alternation;
1524
int childCount =
ChildCount
();
1687
switch (
ChildCount
())
1696
int childCount =
ChildCount
();
2001
int childCount =
ChildCount
();
2037
node = node.Child(node.
ChildCount
() - 1);
2089
loopChild = loopChild.Child(loopChild.
ChildCount
() - 1);
2148
int alternateBranches = node.
ChildCount
();
2164
Debug.Assert(
ChildCount
() == 1);
2196
int childCount = node.
ChildCount
();
2268
int childCount = node.
ChildCount
();
2284
Debug.Assert(
ChildCount
() is 1 or 2);
2290
if (
ChildCount
() == 1)
2302
Debug.Assert(
ChildCount
() is 2 or 3);
2308
if (
ChildCount
() == 2)
2348
node = node.Child(node.
ChildCount
() - 1);
2399
int childCount = subsequent.
ChildCount
();
2629
int childCount = node.
ChildCount
();
2736
int childCount =
ChildCount
();
2758
int childCount =
ChildCount
();
2770
Debug.Assert(
ChildCount
() == 1);
2853
int childCount =
ChildCount
();
2887
int childCount =
ChildCount
();
2908
Debug.Assert(
ChildCount
() == 1);
3079
int childCount =
ChildCount
();
3179
Debug.Assert(index <
ChildCount
());
3247
int childCount = node.
ChildCount
();
3280
if (curChild < curNode!.
ChildCount
())
src\libraries\System.Text.RegularExpressions\src\System\Text\RegularExpressions\RegexParser.cs (3)
2081
if (_group.Kind == RegexNodeKind.ExpressionConditional && _group.
ChildCount
() == 0)
2125
if (_group.Kind == RegexNodeKind.BackreferenceConditional && _group.
ChildCount
() > 2 || _group.
ChildCount
() > 3)
src\libraries\System.Text.RegularExpressions\src\System\Text\RegularExpressions\RegexPrefixAnalyzer.cs (14)
214
int childCount = node.
ChildCount
();
246
int childCount = node.
ChildCount
();
365
int childCount = node.
ChildCount
();
379
int childCount = node.
ChildCount
();
498
node.TryGetOrdinalCaseInsensitiveString(0, node.
ChildCount
(), out _, out string? caseInsensitiveString, consumeZeroWidthNodes: true);
698
int childCount = node.
ChildCount
();
711
int childCount = node.
ChildCount
();
1052
int childCount = node.
ChildCount
();
1083
int childCount = node.
ChildCount
();
1153
Debug.Assert(node.
ChildCount
() >= 2);
1169
if (node.
ChildCount
() == 2)
1311
int childCount = node.
ChildCount
();
1378
int childCount = node.
ChildCount
();
1489
int childCount = node.
ChildCount
();
src\libraries\System.Text.RegularExpressions\src\System\Text\RegularExpressions\RegexTreeAnalyzer.cs (1)
78
int childCount = node.
ChildCount
();