mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-22 17:28:30 +00:00
LibJS: Fix computed property ending token in binding pattern parsing
The syntax is supposed to be '[expression]', not '[expression['.
This commit is contained in:
committed by
Linus Groh
parent
b5b84029ab
commit
7dae25eceb
@@ -1635,7 +1635,7 @@ RefPtr<BindingPattern> Parser::parse_binding_pattern()
|
|||||||
} else if (match(TokenType::BracketOpen)) {
|
} else if (match(TokenType::BracketOpen)) {
|
||||||
consume();
|
consume();
|
||||||
name = parse_expression(0);
|
name = parse_expression(0);
|
||||||
consume(TokenType::BracketOpen);
|
consume(TokenType::BracketClose);
|
||||||
} else {
|
} else {
|
||||||
syntax_error("Expected identifier or computed property name");
|
syntax_error("Expected identifier or computed property name");
|
||||||
return {};
|
return {};
|
||||||
|
|||||||
Reference in New Issue
Block a user