mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 07:37: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
|
@ -204,6 +204,7 @@ bool Token::is_identifier_name() const
|
|||
// The standard defines this reversed: Identifiers are IdentifierNames except reserved words
|
||||
// https://tc39.es/ecma262/#prod-Identifier
|
||||
return m_type == TokenType::Identifier
|
||||
|| m_type == TokenType::EscapedKeyword
|
||||
|| m_type == TokenType::Await
|
||||
|| m_type == TokenType::BoolLiteral
|
||||
|| m_type == TokenType::Break
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue