66 references to One
System.Text.RegularExpressions (66)
System\Text\RegularExpressions\RegexCompiler.cs (7)
1467
case RegexNodeKind.Multi or RegexNodeKind.Notone or RegexNodeKind.
One
or RegexNodeKind.Set:
2033
case RegexNodeKind.
One
:
2045
case RegexNodeKind.Concatenate when child.Child(0) == startingLiteralNode && (startingLiteralNode.Kind is RegexNodeKind.
One
or RegexNodeKind.Set or RegexNodeKind.Multi):
2097
new(RegexNodeKind.
One
, multi.Options, multi.Str[1]) :
2988
case RegexNodeKind.
One
:
3675
case RegexNodeKind.
One
or RegexNodeKind.Oneloop or RegexNodeKind.Oneloopatomic or RegexNodeKind.Onelazy:
5668
if (root.Kind is RegexNodeKind.Multi or RegexNodeKind.
One
or RegexNodeKind.Notone or RegexNodeKind.Set)
System\Text\RegularExpressions\RegexNode.cs (41)
121
return new RegexNode(RegexNodeKind.
One
, options & ~RegexOptions.IgnoreCase, ch);
131
return new RegexNode(RegexNodeKind.
One
, options, ch);
152
Kind += kind - RegexNodeKind.
One
;
287
case RegexNodeKind.
One
:
725
case RegexNodeKind.
One
:
962
case RegexNodeKind.
One
:
1026
Kind == RegexNodeKind.Set ? RegexNodeKind.
One
:
1161
else if (at.Kind is RegexNodeKind.Set or RegexNodeKind.
One
)
1190
if (prev.Kind == RegexNodeKind.
One
)
1200
if (at.Kind == RegexNodeKind.
One
)
1263
case RegexNodeKind.
One
or RegexNodeKind.Notone or RegexNodeKind.Set:
1414
if (startingNode.Kind == RegexNodeKind.
One
)
1434
if (startingNode.Kind == RegexNodeKind.
One
)
1479
new RegexNode(RegexNodeKind.
One
, startingNodeOptions, startingSpan[0]) :
1493
if (node.Kind == RegexNodeKind.
One
)
1511
node.Kind = RegexNodeKind.
One
;
1551
return branch.Kind is RegexNodeKind.
One
or RegexNodeKind.Multi ? branch : null;
1557
Debug.Assert(Kind is RegexNodeKind.
One
or RegexNodeKind.Multi || (IsOneFamily && M > 0));
1642
case RegexNodeKind.
One
:
1677
case RegexNodeKind.
One
or RegexNodeKind.Oneloop or RegexNodeKind.Oneloopatomic or RegexNodeKind.Onelazy:
1820
else if (at.Kind is RegexNodeKind.Multi or RegexNodeKind.
One
)
1834
if (prev.Kind == RegexNodeKind.
One
)
1841
((at.Kind == RegexNodeKind.
One
) ? $"{prev.Str}{at.Ch}" : prev.Str + at.Str) :
1842
((at.Kind == RegexNodeKind.
One
) ? $"{at.Ch}{prev.Str}" : at.Str + prev.Str);
1931
case RegexNodeKind.Oneloop or RegexNodeKind.Onelazy when nextNode.Kind == RegexNodeKind.
One
&& currentNode.Ch == nextNode.Ch:
1981
nextNode.Kind = RegexNodeKind.
One
;
1999
case RegexNodeKind.
One
when (nextNode.Kind is RegexNodeKind.Oneloop or RegexNodeKind.Oneloopatomic or RegexNodeKind.Onelazy) && currentNode.Ch == nextNode.Ch:
2159
RegexNodeKind.
One
or RegexNodeKind.Notone or RegexNodeKind.Set &&
2413
case RegexNodeKind.
One
when CharInLoopSet(loopNode, literal.Ch): // e.g. \w+a\s : 'a' is in \w, check \s is disjoint
2538
case RegexNodeKind.
One
when node.Ch != subsequent.Ch:
2568
case RegexNodeKind.
One
when node.Ch == subsequent.Ch:
2587
case RegexNodeKind.
One
when !RegexCharClass.CharInClass(subsequent.Ch, node.Str!):
2634
case RegexNodeKind.
One
when !CharInStartingOrEndingSet(subsequent.Ch):
2843
case RegexNodeKind.
One
:
2956
case RegexNodeKind.
One
:
3133
if (child.Kind is RegexNodeKind.
One
)
3245
RegexNodeKind.
One
or RegexNodeKind.Notone or RegexNodeKind.Set => true,
3297
case <= MultiVsRepeaterLimit when Kind == RegexNodeKind.
One
:
3312
case RegexNodeKind.
One
:
3453
public bool IsOneFamily => Kind is RegexNodeKind.
One
or RegexNodeKind.Oneloop or RegexNodeKind.Oneloopatomic or RegexNodeKind.Onelazy;
3513
case RegexNodeKind.
One
:
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
"/>.
System\Text\RegularExpressions\RegexParser.cs (4)
1742
lookbehindCr.AddChild(new RegexNode(RegexNodeKind.
One
, lookbehindOptsNoCase, '\r'));
1747
crThenLf.AddChild(new RegexNode(RegexNodeKind.
One
, lookaheadOptsNoCase, '\n'));
1770
crlfEnd.AddChild(new RegexNode(RegexNodeKind.
One
, lookaheadOptsNoCase, '\r'));
1771
crlfEnd.AddChild(new RegexNode(RegexNodeKind.
One
, lookaheadOptsNoCase, '\n'));
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
:
954
case RegexNodeKind.
One
or RegexNodeKind.Oneloop or RegexNodeKind.Onelazy or RegexNodeKind.Oneloopatomic:
959
return node.Kind is RegexNodeKind.
One
|| node.M > 0 ? true : null;
System\Text\RegularExpressions\RegexReplacement.cs (1)
54
case RegexNodeKind.
One
:
System\Text\RegularExpressions\RegexWriter.cs (1)
381
case RegexNodeKind.
One
:
System\Text\RegularExpressions\Symbolic\RegexNodeConverter.cs (1)
57
case RegexNodeKind.
One
:
System\Text\RegularExpressions\Symbolic\SymbolicRegexKind.cs (1)
11
/// <summary>A node that matches a single character (i.e. <see cref="RegexNodeKind.
One
"/>, <see cref="RegexNodeKind.Notone"/>, or <see cref="RegexNodeKind.Set"/>).</summary>