mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 20:29:18 +00:00
LibJS: Remove support for the "assert" keyword for import attributes
This was removed from the spec some time ago. See:
14286bb
This commit is contained in:
parent
47ba231a9b
commit
b64a355a30
Notes:
github-actions[bot]
2025-01-21 13:59:26 +00:00
Author: https://github.com/trflynn89
Commit: b64a355a30
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3324
7 changed files with 14 additions and 31 deletions
|
@ -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)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue