mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 01:07:36 +00:00
LibRegex: Allow references to capture groups that aren't parsed yet
This only applies to the ECMA262 parser. This behaviour is an ECMA262-specific quirk, such references always generate zero-length matches (even on subsequent passes). Also adds a test in LibJS's test suite. Fixes #6039.
This commit is contained in:
parent
804ab79995
commit
6bbb26fdaf
6 changed files with 80 additions and 6 deletions
|
@ -93,6 +93,7 @@ public:
|
|||
void set_source(const StringView source) { m_source = source; }
|
||||
bool try_skip(char);
|
||||
char skip();
|
||||
const auto& source() const { return m_source; }
|
||||
|
||||
private:
|
||||
ALWAYS_INLINE char peek(size_t offset = 0) const;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue