LibRegex: Correctly track current inversion state in the optimizer
This is currently not important as we do not nest TemporaryInverse.
This commit is contained in:
parent
9c5febe800
commit
fe46b2c141
Notes:
sideshowbarker
2024-07-17 09:32:32 +09:00
Author: https://github.com/alimpfard Commit: https://github.com/SerenityOS/serenity/commit/fe46b2c141 Pull-request: https://github.com/SerenityOS/serenity/pull/14534
1 changed files with 4 additions and 2 deletions
|
@ -163,7 +163,8 @@ static bool has_overlap(Vector<CompareTypeAndValuePair> const& lhs, Vector<Compa
|
|||
inverse = !inverse;
|
||||
break;
|
||||
case CharacterCompareType::TemporaryInverse:
|
||||
temporary_inverse = !temporary_inverse;
|
||||
temporary_inverse = true;
|
||||
reset_temporary_inverse = true;
|
||||
break;
|
||||
case CharacterCompareType::AnyChar:
|
||||
// Special case: if not inverted, AnyChar is always in the range.
|
||||
|
@ -237,7 +238,8 @@ static bool has_overlap(Vector<CompareTypeAndValuePair> const& lhs, Vector<Compa
|
|||
inverse = !inverse;
|
||||
break;
|
||||
case CharacterCompareType::TemporaryInverse:
|
||||
temporary_inverse = !temporary_inverse;
|
||||
temporary_inverse = true;
|
||||
reset_temporary_inverse = true;
|
||||
break;
|
||||
case CharacterCompareType::AnyChar:
|
||||
// Special case: if not inverted, AnyChar is always in the range.
|
||||
|
|
Loading…
Add table
Reference in a new issue