48 references to Empty
System.Text.RegularExpressions (48)
System\Text\RegularExpressions\RegexCompiler.cs (4)
2057
new RegexNode(RegexNodeKind.
Empty
, child.Options));
2309
RegexNode? noBranch = node.Child(1) is { Kind: not RegexNodeKind.
Empty
} childNo ? childNo : null;
2470
RegexNode? noBranch = node.Child(2) is { Kind: not RegexNodeKind.
Empty
} childNo ? childNo : null;
3060
case RegexNodeKind.
Empty
:
System\Text\RegularExpressions\RegexNode.cs (33)
189
Kind = RegexNodeKind.
Empty
;
228
Kind = RegexNodeKind.
Empty
;
275
case RegexNodeKind.
Empty
:
589
Debug.Assert(node.Kind is RegexNodeKind.Atomic or RegexNodeKind.
Empty
or RegexNodeKind.Loop or RegexNodeKind.Lazyloop);
662
0 => new RegexNode(Kind == RegexNodeKind.Alternate ? RegexNodeKind.Nothing : RegexNodeKind.
Empty
, Options),
719
case RegexNodeKind.
Empty
:
759
if (branches[0].Kind == RegexNodeKind.
Empty
)
761
return new RegexNode(RegexNodeKind.
Empty
, child.Options);
770
if (branches[i].Kind == RegexNodeKind.
Empty
)
851
(child.Child(0).Kind is RegexNodeKind.
Empty
|| child.Child(1).Kind is RegexNodeKind.
Empty
); // can be transformed into a ? or ??
866
return child.Kind == RegexNodeKind.
Empty
?
969
case RegexNodeKind.
Empty
:
990
u = u.M == 0 ? new RegexNode(RegexNodeKind.
Empty
, Options) : child;
1102
if (node.Child(1).Kind is RegexNodeKind.
Empty
)
1106
else if (node.Child(0).Kind is RegexNodeKind.
Empty
)
1311
newAlternate.AddChild(new RegexNode(RegexNodeKind.
Empty
, children[i].Options));
1352
case RegexNodeKind.
Empty
when !seenEmpty:
1356
case RegexNodeKind.
Empty
:
1497
node.Kind = RegexNodeKind.
Empty
;
1506
node.Kind = RegexNodeKind.
Empty
;
1748
return new RegexNode(RegexNodeKind.
Empty
, Options);
1844
else if (at.Kind == RegexNodeKind.
Empty
)
2278
child.Kind is RegexNodeKind.
Empty
)
2288
if (child.Kind is RegexNodeKind.
Empty
)
2350
AddChild(new RegexNode(RegexNodeKind.
Empty
, Options));
2368
AddChild(new RegexNode(RegexNodeKind.
Empty
, Options));
2910
case RegexNodeKind.
Empty
:
2937
goto case RegexNodeKind.
Empty
;
3048
case RegexNodeKind.
Empty
:
3074
goto case RegexNodeKind.
Empty
;
3190
else if (child.Kind is RegexNodeKind.
Empty
)
3291
return new RegexNode(RegexNodeKind.
Empty
, Options);
System\Text\RegularExpressions\RegexNodeKind.cs (1)
122
/// by that child, and if a concatenation has no children, it can be replaced by <see cref="
Empty
"/>.
System\Text\RegularExpressions\RegexPrefixAnalyzer.cs (7)
100
case RegexNodeKind.
Empty
:
469
case RegexNodeKind.
Empty
:
666
case RegexNodeKind.
Empty
:
1012
case RegexNodeKind.
Empty
:
1293
case RegexNodeKind.
Empty
:
1388
case RegexNodeKind.
Empty
or RegexNodeKind.NegativeLookaround:
1416
if (node.Child(i).Kind is not (RegexNodeKind.
Empty
or RegexNodeKind.PositiveLookaround or RegexNodeKind.NegativeLookaround))
System\Text\RegularExpressions\RegexWriter.cs (1)
217
case RegexNodeKind.
Empty
:
System\Text\RegularExpressions\Symbolic\RegexNodeConverter.cs (1)
132
case RegexNodeKind.
Empty
:
System\Text\RegularExpressions\Symbolic\SymbolicRegexKind.cs (1)
9
/// <summary>An empty node that matches a zero-width input (e.g. <see cref="RegexNodeKind.
Empty
"/>).</summary>