mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 04:37:34 +00:00
LibRegex: Avoid using GenericLexer::consume() when at eof
Fixes #10027.
This commit is contained in:
parent
047c013be0
commit
8e3fe80c06
1 changed files with 4 additions and 1 deletions
|
@ -2229,6 +2229,7 @@ size_t ECMA262Parser::ensure_total_number_of_capturing_parenthesis()
|
|||
}
|
||||
break;
|
||||
case '(':
|
||||
lexer.consume();
|
||||
if (lexer.consume_specific('?')) {
|
||||
// non-capturing group '(?:', lookaround '(?<='/'(?<!', or named capture '(?<'
|
||||
if (!lexer.consume_specific('<'))
|
||||
|
@ -2242,8 +2243,10 @@ size_t ECMA262Parser::ensure_total_number_of_capturing_parenthesis()
|
|||
++count;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
lexer.consume();
|
||||
break;
|
||||
}
|
||||
lexer.consume();
|
||||
}
|
||||
|
||||
m_total_number_of_capturing_parenthesis = count;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue