mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 15:47:44 +00:00
LibRegex: Reset capture group indices when resetting parser state
This commit is contained in:
parent
7b7cbcecdf
commit
be0182d049
1 changed files with 5 additions and 0 deletions
|
@ -151,6 +151,11 @@ ALWAYS_INLINE void Parser::reset()
|
|||
m_parser_state.current_token = m_parser_state.lexer.next();
|
||||
m_parser_state.error = Error::NoError;
|
||||
m_parser_state.error_token = { TokenType::Eof, 0, StringView(nullptr) };
|
||||
m_parser_state.capture_group_minimum_lengths.clear();
|
||||
m_parser_state.capture_groups_count = 0;
|
||||
m_parser_state.named_capture_groups_count = 0;
|
||||
m_parser_state.named_capture_group_minimum_lengths.clear();
|
||||
m_parser_state.named_capture_groups.clear();
|
||||
}
|
||||
|
||||
Parser::Result Parser::parse(Optional<AllOptions> regex_options)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue