47 references to Empty
System.Text.RegularExpressions (47)
System\Text\RegularExpressions\RegexCompiler.cs (4)
2051
new RegexNode(RegexNodeKind.
Empty
, child.Options));
2288
RegexNode? noBranch = node.Child(1) is { Kind: not RegexNodeKind.
Empty
} childNo ? childNo : null;
2449
RegexNode? noBranch = node.Child(2) is { Kind: not RegexNodeKind.
Empty
} childNo ? childNo : null;
3039
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
)
1296
case RegexNodeKind.
Empty
when !seenEmpty:
1300
case RegexNodeKind.
Empty
:
1438
node.Kind = RegexNodeKind.
Empty
;
1447
node.Kind = RegexNodeKind.
Empty
;
1689
return new RegexNode(RegexNodeKind.
Empty
, Options);
1785
else if (at.Kind == RegexNodeKind.
Empty
)
2213
child.Kind is RegexNodeKind.
Empty
)
2223
if (child.Kind is RegexNodeKind.
Empty
)
2285
AddChild(new RegexNode(RegexNodeKind.
Empty
, Options));
2303
AddChild(new RegexNode(RegexNodeKind.
Empty
, Options));
2720
case RegexNodeKind.
Empty
:
2747
goto case RegexNodeKind.
Empty
;
2858
case RegexNodeKind.
Empty
:
2884
goto case RegexNodeKind.
Empty
;
2957
else if (child.Kind is RegexNodeKind.
Empty
)
3058
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>