LibRegex: Make infinite repetitions short-circuit on empty matches

This makes (addmittedly weird) patterns like `(a*)*` work correctly
without going into an infinite fork loop.
This commit is contained in:
Ali Mohammad Pur 2021-09-06 02:38:47 +04:30 committed by Ali Mohammad Pur
commit abbe9da255
Notes: sideshowbarker 2024-07-18 04:37:58 +09:00
4 changed files with 131 additions and 69 deletions

View file

@ -524,6 +524,7 @@ struct MatchState {
Vector<Match> matches;
Vector<Vector<Match>> capture_group_matches;
Vector<u64> repetition_marks;
HashMap<u64, u64> checkpoints;
};
}