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:
parent
3200ff5f4f
commit
dbef2b1ee9
11 changed files with 1321 additions and 25 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue