31 references to IsNegated
System.Text.RegularExpressions.Generator (31)
RegexGenerator.Emitter.cs (9)
1879
if (RegexCharClass.
IsNegated
(startingLiteralNode.Str!) ||
5091
bool negated = RegexCharClass.
IsNegated
(node.Str) ^ negate;
5242
negate ^= RegexCharClass.
IsNegated
(charClass);
5285
negate ^= RegexCharClass.
IsNegated
(charClass);
5296
negate ^= RegexCharClass.
IsNegated
(charClass);
5316
negate ^= RegexCharClass.
IsNegated
(charClass);
5333
bool negatedClass = RegexCharClass.
IsNegated
(charClass);
5368
bool negatedClass = RegexCharClass.
IsNegated
(charClass);
5394
negate ^= RegexCharClass.
IsNegated
(charClass);
src\libraries\System.Text.RegularExpressions\src\System\Text\RegularExpressions\RegexCharClass.cs (14)
494
!
IsNegated
(charClass) &&
500
!
IsNegated
(charClass) &&
513
!
IsNegated
(set) &&
520
IsNegated
(set) &&
634
negated ^=
IsNegated
(set);
646
/// if <see cref="
IsNegated
(string)"/> is true.
721
if (hasSubtraction &&
IsNegated
(set))
792
bool set1Negated =
IsNegated
(set1);
793
bool set2Negated =
IsNegated
(set2);
879
Debug.Assert(!
IsNegated
(set1) && !
IsNegated
(set2));
979
!
IsNegated
(set) &&
1035
bool isNegated =
IsNegated
(set);
1860
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)
1568
return new StartingLiteralData(range: (lowInclusive, highInclusive), negated: RegexCharClass.
IsNegated
(node.Str!));
1575
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 (3)
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
557
result.Negated = RegexCharClass.
IsNegated
(result.Set);
1232
!RegexCharClass.
IsNegated
(nextChild.Str!) &&