mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 15:48:12 +00:00
LibRegex: Use the parser state capture group count in BRE
Otherwise the users won't know how many capture groups are in the parsed regular expression.
This commit is contained in:
parent
1c584e9d80
commit
11a8476cf4
2 changed files with 1 additions and 2 deletions
|
@ -411,7 +411,7 @@ bool PosixBasicParser::parse_nonduplicating_re(ByteCode& bytecode, size_t& match
|
|||
if (try_skip("\\(")) {
|
||||
ByteCode capture_bytecode;
|
||||
size_t capture_length_minimum = 0;
|
||||
auto capture_group_index = ++m_capture_group;
|
||||
auto capture_group_index = ++m_parser_state.capture_groups_count;
|
||||
|
||||
if (!parse_re_expression(capture_bytecode, capture_length_minimum))
|
||||
return false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue