46 references to Empty
System.Text.RegularExpressions (46)
System\Text\RegularExpressions\RegexCompiler.cs (3)
2042
RegexNode? noBranch = node.Child(1) is { Kind: not RegexNodeKind.
Empty
} childNo ? childNo : null;
2203
RegexNode? noBranch = node.Child(2) is { Kind: not RegexNodeKind.
Empty
} childNo ? childNo : null;
2813
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
)
2148
child.Kind is RegexNodeKind.
Empty
)
2158
if (child.Kind is RegexNodeKind.
Empty
)
2220
AddChild(new RegexNode(RegexNodeKind.
Empty
, Options));
2238
AddChild(new RegexNode(RegexNodeKind.
Empty
, Options));
2655
case RegexNodeKind.
Empty
:
2682
goto case RegexNodeKind.
Empty
;
2793
case RegexNodeKind.
Empty
:
2819
goto case RegexNodeKind.
Empty
;
2892
else if (child.Kind is RegexNodeKind.
Empty
)
2993
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>