1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 19:58:11 +00:00

LibRegex: Implement an ECMA262-compatible parser

This also adds support for lookarounds and individually-negated
comparisons.
The only unimplemented part of the parser spec is the unicode stuff.
This commit is contained in:
AnotherTest 2020-11-27 19:33:53 +03:30 committed by Andreas Kling
parent 3200ff5f4f
commit dbef2b1ee9
11 changed files with 1321 additions and 25 deletions

View file

@ -91,6 +91,9 @@ public:
void reset();
void back(size_t offset);
void set_source(const StringView source) { m_source = source; }
bool try_skip(char);
StringView slice_back(size_t offset) const { return m_source.substring_view(m_position - offset - 1, offset); }
private:
ALWAYS_INLINE char peek(size_t offset = 0) const;