1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 07:38:10 +00:00

LibJS: Treat private identifier as divisible token

And also make sure private identifiers are correctly checked when
synthesizing a binding pattern.
This commit is contained in:
davidot 2021-11-26 21:10:24 +01:00 committed by Linus Groh
parent afde1821b5
commit e751dcea43
4 changed files with 16 additions and 0 deletions

View file

@ -1989,6 +1989,7 @@ RefPtr<BindingPattern> Parser::synthesize_binding_pattern(Expression const& expr
parser.m_state.string_legacy_octal_escape_sequence_in_scope = m_state.string_legacy_octal_escape_sequence_in_scope;
parser.m_state.in_class_field_initializer = m_state.in_class_field_initializer;
parser.m_state.in_class_static_init_block = m_state.in_class_static_init_block;
parser.m_state.referenced_private_names = m_state.referenced_private_names;
auto result = parser.parse_binding_pattern(AllowDuplicates::Yes, AllowMemberExpressions::Yes);
if (parser.has_errors())