51 references to One
System.Text.RegularExpressions.Generator (51)
RegexGenerator.Emitter.cs (4)
650
else if (root.Kind is RegexNodeKind.Multi or RegexNodeKind.
One
or RegexNodeKind.Notone or RegexNodeKind.Set)
1824
case RegexNodeKind.
One
:
1834
new RegexNode(RegexNodeKind.
One
, child.Options, child.Str![1]) :
1839
case RegexNodeKind.Concatenate when child.Child(0) == startingLiteralNode && (startingLiteralNode.Kind is RegexNodeKind.
One
or RegexNodeKind.Set or RegexNodeKind.Multi):
src\libraries\System.Text.RegularExpressions\src\System\Text\RegularExpressions\RegexNode.cs (37)
121
return new RegexNode(RegexNodeKind.
One
, options & ~RegexOptions.IgnoreCase, ch);
131
return new RegexNode(RegexNodeKind.
One
, options, ch);
152
Kind += kind - RegexNodeKind.
One
;
247
case RegexNodeKind.
One
:
849
case RegexNodeKind.
One
:
889
Kind == RegexNodeKind.Set ? RegexNodeKind.
One
:
997
else if (at.Kind is RegexNodeKind.Set or RegexNodeKind.
One
)
1026
if (prev.Kind == RegexNodeKind.
One
)
1036
if (at.Kind == RegexNodeKind.
One
)
1107
case RegexNodeKind.
One
or RegexNodeKind.Notone or RegexNodeKind.Set:
1246
if (startingNode.Kind == RegexNodeKind.
One
)
1266
if (startingNode.Kind == RegexNodeKind.
One
)
1311
new RegexNode(RegexNodeKind.
One
, startingNodeOptions, startingSpan[0]) :
1325
if (node.Kind == RegexNodeKind.
One
)
1343
node.Kind = RegexNodeKind.
One
;
1383
return branch.Kind is RegexNodeKind.
One
or RegexNodeKind.Multi ? branch : null;
1389
Debug.Assert(Kind is RegexNodeKind.
One
or RegexNodeKind.Multi || (IsOneFamily && M > 0));
1404
case RegexNodeKind.
One
:
1439
case RegexNodeKind.
One
or RegexNodeKind.Oneloop or RegexNodeKind.Oneloopatomic or RegexNodeKind.Onelazy:
1582
else if (at.Kind is RegexNodeKind.Multi or RegexNodeKind.
One
)
1596
if (prev.Kind == RegexNodeKind.
One
)
1603
((at.Kind == RegexNodeKind.
One
) ? $"{prev.Str}{at.Ch}" : prev.Str + at.Str) :
1604
((at.Kind == RegexNodeKind.
One
) ? $"{at.Ch}{prev.Str}" : at.Str + prev.Str);
1693
case RegexNodeKind.Oneloop or RegexNodeKind.Onelazy when nextNode.Kind == RegexNodeKind.
One
&& currentNode.Ch == nextNode.Ch:
1743
nextNode.Kind = RegexNodeKind.
One
;
1761
case RegexNodeKind.
One
when (nextNode.Kind is RegexNodeKind.Oneloop or RegexNodeKind.Oneloopatomic or RegexNodeKind.Onelazy) && currentNode.Ch == nextNode.Ch:
2124
case RegexNodeKind.
One
when node.Ch != subsequent.Ch:
2154
case RegexNodeKind.
One
when node.Ch == subsequent.Ch:
2173
case RegexNodeKind.
One
when !RegexCharClass.CharInClass(subsequent.Ch, node.Str!):
2266
case RegexNodeKind.
One
:
2379
case RegexNodeKind.
One
:
2533
if (child.Kind is RegexNodeKind.
One
)
2640
RegexNodeKind.
One
or RegexNodeKind.Notone or RegexNodeKind.Set => true,
2692
case <= MultiVsRepeaterLimit when Kind == RegexNodeKind.
One
:
2707
case RegexNodeKind.
One
:
2840
public bool IsOneFamily => Kind is RegexNodeKind.
One
or RegexNodeKind.Oneloop or RegexNodeKind.Oneloopatomic or RegexNodeKind.Onelazy;
2900
case RegexNodeKind.
One
:
src\libraries\System.Text.RegularExpressions\src\System\Text\RegularExpressions\RegexNodeKind.cs (3)
26
/// <remarks>The characters are specified in <see cref="RegexNode.Str"/>. This is purely a representational optimization, equivalent to multiple <see cref="
One
"/> nodes concatenated together.</remarks>
32
/// This is purely a representational optimization, equivalent to a <see cref="Loop"/> wrapped around a <see cref="
One
"/>.
46
/// This is purely a representational optimization, equivalent to a <see cref="Lazyloop"/> wrapped around a <see cref="
One
"/>.
src\libraries\System.Text.RegularExpressions\src\System\Text\RegularExpressions\RegexPrefixAnalyzer.cs (7)
112
case RegexNodeKind.
One
or RegexNodeKind.Oneloop or RegexNodeKind.Onelazy or RegexNodeKind.Oneloopatomic when !ignoreCase || !RegexCharClass.ParticipatesInCaseConversion(node.Ch):
114
int reps = node.Kind is RegexNodeKind.
One
? 1 : Math.Min(node.M, MaxPrefixLength);
119
return node.Kind is RegexNodeKind.
One
|| reps == node.N;
422
case RegexNodeKind.
One
:
600
case RegexNodeKind.
One
:
945
case RegexNodeKind.
One
or RegexNodeKind.Oneloop or RegexNodeKind.Onelazy or RegexNodeKind.Oneloopatomic:
950
return node.Kind is RegexNodeKind.
One
|| node.M > 0 ? true : null;