@@ -65,10 +65,10 @@ def __init__(
6565 SubRule (r"Comparer<[^>\n]+>\.Default\.Compare\(\s*(?P<first>[^,)\n]+),\s*(?P<second>[^\)\n]+)\s*\)\s*(?P<comparison>[<>=]=?)\s*0(?P<after>\D)" , r"\g<first> \g<comparison> \g<second>\g<after>" , max_repeat = 0 ),
6666 # public static bool operator ==(Range<T> left, Range<T> right) => left.Equals(right);
6767 #
68- SubRule (r"\r?\n[^\n]+bool operator ==\((?P<type>[^\n]+) (?P<left>[a-zA-Z0-9]+), \k<type> (?P<right>[a-zA-Z0-9]+)\) => (\k<left>|\k<right>)\.Equals\((\k<left>|\k<right>)\);" , r"" , max_repeat = 10 ),
68+ SubRule (r"\r?\n[^\n]+bool operator==\((?P<type>[^\n]+) (?P<left>[a-zA-Z0-9]+), \k<type> (?P<right>[a-zA-Z0-9]+)\) => (\k<left>|\k<right>)\.Equals\((\k<left>|\k<right>)\);" , r"" , max_repeat = 10 ),
6969 # public static bool operator !=(Range<T> left, Range<T> right) => !(left == right);
7070 #
71- SubRule (r"\r?\n[^\n]+bool operator !=\((?P<type>[^\n]+) (?P<left>[a-zA-Z0-9]+), \k<type> (?P<right>[a-zA-Z0-9]+)\) => !\((\k<left>|\k<right>) == (\k<left>|\k<right>)\);" , r"" , max_repeat = 10 ),
71+ SubRule (r"\r?\n[^\n]+bool operator!=\((?P<type>[^\n]+) (?P<left>[a-zA-Z0-9]+), \k<type> (?P<right>[a-zA-Z0-9]+)\) => !\((\k<left>|\k<right>) == (\k<left>|\k<right>)\);" , r"" , max_repeat = 10 ),
7272 # public override bool Equals(object obj) => obj is Range<T> range ? Equals(range) : false;
7373 #
7474 SubRule (r"\r?\n[^\n]+override bool Equals\((System\.)?[Oo]bject (?P<this>[a-zA-Z0-9]+)\) => \k<this> is [^\n]+ (?P<other>[a-zA-Z0-9]+) \? Equals\(\k<other>\) : false;" , r"" , max_repeat = 10 ),
@@ -357,7 +357,7 @@ def __init__(
357357 SubRule (r"(\r?\n[\t ]+)[a-zA-Z0-9]+ ([a-zA-Z0-9]+) = new ([a-zA-Z0-9]+)\[([_a-zA-Z0-9]+)\];" , r"\1\3 \2[\4] = { {0} };" , max_repeat = 0 ),
358358 # bool Equals(Range<T> other) { ... }
359359 # bool operator ==(const Key &other) const { ... }
360- SubRule (r"(?P<before>\r?\n[^\n]+bool )Equals\((?P<type>[^\n{]+) (?P<variable>[a-zA-Z0-9]+)\)(?P<after>(\s|\n)*{)" , r"\g<before>operator ==(const \g<type> &\g<variable>) const\g<after>" , max_repeat = 0 ),
360+ SubRule (r"(?P<before>\r?\n[^\n]+bool )Equals\((?P<type>[^\n{]+) (?P<variable>[a-zA-Z0-9]+)\)(?P<after>(\s|\n)*{)" , r"\g<before>operator==(const \g<type> &\g<variable>) const\g<after>" , max_repeat = 0 ),
361361 # Insert scope borders.
362362 # class Range { ... public: override std::string ToString() { return ...; }
363363 # class Range {/*~Range<T>~*/ ... public: override std::string ToString() { return ...; }
0 commit comments