mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 16:57:35 +00:00
LibRegex: Error out on Eof when parsing nonempty class range elements
Fixes #22507.
This commit is contained in:
parent
ee3d09f225
commit
267040dde7
2 changed files with 18 additions and 0 deletions
|
@ -1963,6 +1963,11 @@ bool ECMA262Parser::parse_nonempty_class_ranges(Vector<CompareTypeAndValuePair>&
|
|||
return {};
|
||||
}
|
||||
|
||||
if (match(TokenType::Eof)) {
|
||||
set_error(Error::MismatchingBracket);
|
||||
return {};
|
||||
}
|
||||
|
||||
if (match(TokenType::RightBracket) || match(TokenType::HyphenMinus))
|
||||
return {};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue