22 references to IsNegated
System.Text.RegularExpressions.Generator (22)
RegexGenerator.Emitter.cs (1)
1741
if (RegexCharClass.
IsNegated
(startingLiteralNode.Str!) ||
src\libraries\System.Text.RegularExpressions\src\System\Text\RegularExpressions\RegexCharClass.cs (14)
607
!
IsNegated
(charClass) &&
613
!
IsNegated
(charClass) &&
626
!
IsNegated
(set) &&
633
IsNegated
(set) &&
747
negated ^=
IsNegated
(set);
759
/// if <see cref="
IsNegated
(string)"/> is true.
834
if (hasSubtraction &&
IsNegated
(set))
905
bool set1Negated =
IsNegated
(set1);
906
bool set2Negated =
IsNegated
(set2);
947
Debug.Assert(!
IsNegated
(set1) && !
IsNegated
(set2));
1065
!
IsNegated
(set) &&
1121
bool isNegated =
IsNegated
(set);
1873
bool negated =
IsNegated
(set);
src\libraries\System.Text.RegularExpressions\src\System\Text\RegularExpressions\RegexFindOptimizations.cs (3)
131
if (!RegexCharClass.
IsNegated
(charClass) &&
142
Debug.Assert(!RegexCharClass.
IsNegated
(charClass));
149
Debug.Assert(!RegexCharClass.
IsNegated
(charClass) || chars is null);
src\libraries\System.Text.RegularExpressions\src\System\Text\RegularExpressions\RegexNode.cs (2)
1450
return new StartingLiteralData(range: (lowInclusive, highInclusive), negated: RegexCharClass.
IsNegated
(node.Str!));
1457
return new StartingLiteralData(setChars: setChars.Slice(0, numChars).ToString(), negated: RegexCharClass.
IsNegated
(node.Str!));
src\libraries\System.Text.RegularExpressions\src\System\Text\RegularExpressions\RegexPrefixAnalyzer.cs (2)
156
case RegexNodeKind.Set or RegexNodeKind.Setloop or RegexNodeKind.Setlazy or RegexNodeKind.Setloopatomic when !RegexCharClass.
IsNegated
(node.Str!): // negated sets are too complex to analyze
1208
!RegexCharClass.
IsNegated
(nextChild.Str!) &&