60 references to ChildCount
System.Text.RegularExpressions.Generator (60)
RegexGenerator.cs (1)
335
int childCount = node.
ChildCount
();
RegexGenerator.Emitter.cs (4)
1485
Debug.Assert(node.
ChildCount
() == 1, "Capture nodes should have one child");
1667
Debug.Assert(node.
ChildCount
() >= 2, $"Expected at least 2 children, found {node.
ChildCount
()}");
1669
int childCount = node.
ChildCount
();
src\libraries\System.Text.RegularExpressions\src\System\Text\RegularExpressions\RegexNode.cs (37)
139
ChildCount
() > 1)
212
int childCount = node.
ChildCount
();
334
Debug.Assert(rootNode.
ChildCount
() == 1);
452
RegexNode existingChild = node.Child(node.
ChildCount
() - 1);
458
node.ReplaceChild(node.
ChildCount
() - 1, atomic);
470
int branches = node.
ChildCount
();
561
return
ChildCount
() switch
582
Debug.Assert(u.
ChildCount
() == 1);
606
Debug.Assert(
ChildCount
() == 1);
775
while (u.
ChildCount
() > 0)
844
if (u.
ChildCount
() == 1)
927
switch (
ChildCount
())
1090
if (child.Kind != RegexNodeKind.Concatenate || child.
ChildCount
() < 2)
1177
Debug.Assert(node.
ChildCount
() >= 2);
1369
return alternation.
ChildCount
() == 1 ? alternation.Child(0) : alternation;
1507
switch (
ChildCount
())
1516
int childCount =
ChildCount
();
1817
int childCount =
ChildCount
();
1854
node = node.Child(node.
ChildCount
() - 1);
1918
int alternateBranches = node.
ChildCount
();
1958
int concatCount = node.
ChildCount
();
1974
Debug.Assert(
ChildCount
() == 1);
2002
Debug.Assert(
ChildCount
() is 1 or 2);
2008
if (
ChildCount
() == 1)
2020
Debug.Assert(
ChildCount
() is 2 or 3);
2026
if (
ChildCount
() == 2)
2071
while ((childCount = subsequent.
ChildCount
()) > 0)
2296
int childCount =
ChildCount
();
2318
int childCount =
ChildCount
();
2330
Debug.Assert(
ChildCount
() == 1);
2413
int childCount =
ChildCount
();
2447
int childCount =
ChildCount
();
2468
Debug.Assert(
ChildCount
() == 1);
2654
int childCount =
ChildCount
();
2754
Debug.Assert(index <
ChildCount
());
2822
int childCount = node.
ChildCount
();
2855
if (curChild < curNode!.
ChildCount
())
src\libraries\System.Text.RegularExpressions\src\System\Text\RegularExpressions\RegexParser.cs (3)
2052
if (_group.Kind == RegexNodeKind.ExpressionConditional && _group.
ChildCount
() == 0)
2096
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
();
1042
int childCount = node.
ChildCount
();
1059
int childCount = node.
ChildCount
();
1129
Debug.Assert(node.
ChildCount
() >= 2);
1145
if (node.
ChildCount
() == 2)
1287
int childCount = node.
ChildCount
();
1356
int childCount = node.
ChildCount
();
1466
int childCount = node.
ChildCount
();
src\libraries\System.Text.RegularExpressions\src\System\Text\RegularExpressions\RegexTreeAnalyzer.cs (1)
82
int childCount = node.
ChildCount
();