mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-27 11:48:32 +00:00
LibJS: Remove support for the "assert" keyword for import attributes
This was removed from the spec some time ago. See: https://github.com/tc39/proposal-import-attributes/commit/14286bb
This commit is contained in:
committed by
Andreas Kling
parent
47ba231a9b
commit
b64a355a30
@@ -4544,13 +4544,6 @@ void Parser::check_identifier_name_for_assignment_validity(DeprecatedFlyString c
|
||||
}
|
||||
}
|
||||
|
||||
bool Parser::match_with_clause() const
|
||||
{
|
||||
if (m_state.current_token.original_value() == "with"sv)
|
||||
return true;
|
||||
return !m_state.current_token.trivia_contains_line_terminator() && m_state.current_token.original_value() == "assert"sv;
|
||||
}
|
||||
|
||||
DeprecatedFlyString Parser::consume_string_value()
|
||||
{
|
||||
VERIFY(match(TokenType::StringLiteral));
|
||||
@@ -4585,11 +4578,10 @@ ModuleRequest Parser::parse_module_request()
|
||||
|
||||
ModuleRequest request { consume_string_value() };
|
||||
|
||||
if (!match_with_clause())
|
||||
if (!match(TokenType::With))
|
||||
return request;
|
||||
|
||||
VERIFY(m_state.current_token.original_value().is_one_of("with"sv, "assert"sv));
|
||||
consume();
|
||||
consume(TokenType::With);
|
||||
consume(TokenType::CurlyOpen);
|
||||
|
||||
while (!done() && !match(TokenType::CurlyClose)) {
|
||||
|
||||
Reference in New Issue
Block a user