mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 13:57:35 +00:00
LibJS: Fix some small remaining issues with parsing unicode escapes
Added a test to ensure the behavior stays the same. We now throw on a direct usage of an escaped keywords with a specific error to make it more clear to the user.
This commit is contained in:
parent
b012170d69
commit
7bcffd1b6a
6 changed files with 125 additions and 9 deletions
|
@ -41,7 +41,7 @@ private:
|
|||
bool is_eof() const;
|
||||
bool is_line_terminator() const;
|
||||
bool is_whitespace() const;
|
||||
Optional<u32> is_unicode_escape(size_t& identifier_length) const;
|
||||
Optional<u32> is_identifier_unicode_escape(size_t& identifier_length) const;
|
||||
Optional<u32> is_identifier_start(size_t& identifier_length) const;
|
||||
Optional<u32> is_identifier_middle(size_t& identifier_length) const;
|
||||
bool is_line_comment_start(bool line_has_token_yet) const;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue