mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-03 23:25:20 +00:00
LibRegex: Reset capture group indices when resetting parser state
This commit is contained in:
committed by
Andreas Kling
parent
7b7cbcecdf
commit
be0182d049
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user