1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 23:37:36 +00:00

LibRegex: Make Fork{Jump,Stay} non-recursive

This makes very fork-heavy expressions (like `(aa)*`) not run out of
stack space when matching very long strings.
This commit is contained in:
Ali Mohammad Pur 2021-07-31 16:03:45 +04:30 committed by Ali Mohammad Pur
parent a08870cc19
commit 5f342e4fa9
3 changed files with 29 additions and 52 deletions

View file

@ -469,6 +469,7 @@ struct MatchState {
Vector<Match> matches;
Vector<Vector<Match>> capture_group_matches;
Vector<HashMap<String, Match>> named_capture_group_matches;
size_t recursion_level { 0 };
};
struct MatchOutput {