46 references to Empty
System.Text.RegularExpressions (46)
System\Text\RegularExpressions\RegexCompiler.cs (3)
2061
RegexNode? noBranch = node.Child(1) is { Kind: not RegexNodeKind.
Empty
} childNo ? childNo : null;
2222
RegexNode? noBranch = node.Child(2) is { Kind: not RegexNodeKind.
Empty
} childNo ? childNo : null;
2812
case RegexNodeKind.
Empty
:
System\Text\RegularExpressions\RegexNode.cs (32)
189
Kind = RegexNodeKind.
Empty
;
228
Kind = RegexNodeKind.
Empty
;
275
case RegexNodeKind.
Empty
:
542
Debug.Assert(node.Kind is RegexNodeKind.Atomic or RegexNodeKind.
Empty
or RegexNodeKind.Loop or RegexNodeKind.Lazyloop);
615
0 => new RegexNode(Kind == RegexNodeKind.Alternate ? RegexNodeKind.Nothing : RegexNodeKind.
Empty
, Options),
672
case RegexNodeKind.
Empty
:
704
if (branches[0].Kind == RegexNodeKind.
Empty
)
706
return new RegexNode(RegexNodeKind.
Empty
, child.Options);
715
if (branches[i].Kind == RegexNodeKind.
Empty
)
796
(child.Child(0).Kind is RegexNodeKind.
Empty
|| child.Child(1).Kind is RegexNodeKind.
Empty
); // can be transformed into a ? or ??
811
return child.Kind == RegexNodeKind.
Empty
?
914
case RegexNodeKind.
Empty
:
935
u = u.M == 0 ? new RegexNode(RegexNodeKind.
Empty
, Options) : child;
1047
if (node.Child(1).Kind is RegexNodeKind.
Empty
)
1051
else if (node.Child(0).Kind is RegexNodeKind.
Empty
)
1305
case RegexNodeKind.
Empty
when !seenEmpty:
1309
case RegexNodeKind.
Empty
:
1447
node.Kind = RegexNodeKind.
Empty
;
1456
node.Kind = RegexNodeKind.
Empty
;
1628
return new RegexNode(RegexNodeKind.
Empty
, Options);
1724
else if (at.Kind == RegexNodeKind.
Empty
)
2152
child.Kind is RegexNodeKind.
Empty
)
2162
if (child.Kind is RegexNodeKind.
Empty
)
2224
AddChild(new RegexNode(RegexNodeKind.
Empty
, Options));
2242
AddChild(new RegexNode(RegexNodeKind.
Empty
, Options));
2659
case RegexNodeKind.
Empty
:
2686
goto case RegexNodeKind.
Empty
;
2797
case RegexNodeKind.
Empty
:
2823
goto case RegexNodeKind.
Empty
;
2896
else if (child.Kind is RegexNodeKind.
Empty
)
2997
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>