mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-22 09:19:03 +00:00
LibJS: Disallow standalone super expression
This commit is contained in:
@@ -1297,6 +1297,9 @@ NonnullRefPtr<Expression> Parser::parse_expression(int min_precedence, Associati
|
||||
}
|
||||
}
|
||||
|
||||
if (is<SuperExpression>(*expression))
|
||||
syntax_error("'super' keyword unexpected here");
|
||||
|
||||
check_for_invalid_object_property(expression);
|
||||
|
||||
if (match(TokenType::Comma) && min_precedence <= 1) {
|
||||
|
||||
Reference in New Issue
Block a user