31 references to IsNegated
System.Text.RegularExpressions.Generator (31)
RegexGenerator.Emitter.cs (9)
1741if (RegexCharClass.IsNegated(startingLiteralNode.Str!) || 4963bool negated = RegexCharClass.IsNegated(node.Str) ^ negate; 5114negate ^= RegexCharClass.IsNegated(charClass); 5157negate ^= RegexCharClass.IsNegated(charClass); 5168negate ^= RegexCharClass.IsNegated(charClass); 5188negate ^= RegexCharClass.IsNegated(charClass); 5205bool negatedClass = RegexCharClass.IsNegated(charClass); 5240bool negatedClass = RegexCharClass.IsNegated(charClass); 5266negate ^= RegexCharClass.IsNegated(charClass);
src\libraries\System.Text.RegularExpressions\src\System\Text\RegularExpressions\RegexCharClass.cs (14)
607!IsNegated(charClass) && 613!IsNegated(charClass) && 626!IsNegated(set) && 633IsNegated(set) && 747negated ^= IsNegated(set); 759/// if <see cref="IsNegated(string)"/> is true. 834if (hasSubtraction && IsNegated(set)) 905bool set1Negated = IsNegated(set1); 906bool set2Negated = IsNegated(set2); 947Debug.Assert(!IsNegated(set1) && !IsNegated(set2)); 1065!IsNegated(set) && 1121bool isNegated = IsNegated(set); 1892bool negated = IsNegated(set);
src\libraries\System.Text.RegularExpressions\src\System\Text\RegularExpressions\RegexFindOptimizations.cs (3)
131if (!RegexCharClass.IsNegated(charClass) && 142Debug.Assert(!RegexCharClass.IsNegated(charClass)); 149Debug.Assert(!RegexCharClass.IsNegated(charClass) || chars is null);
src\libraries\System.Text.RegularExpressions\src\System\Text\RegularExpressions\RegexNode.cs (2)
1450return new StartingLiteralData(range: (lowInclusive, highInclusive), negated: RegexCharClass.IsNegated(node.Str!)); 1457return 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)
156case RegexNodeKind.Set or RegexNodeKind.Setloop or RegexNodeKind.Setlazy or RegexNodeKind.Setloopatomic when !RegexCharClass.IsNegated(node.Str!): // negated sets are too complex to analyze 557result.Negated = RegexCharClass.IsNegated(result.Set); 1208!RegexCharClass.IsNegated(nextChild.Str!) &&