LibJS: Update the noted grammar for ImportDeclaration

This commit is contained in:
Timothy Flynn 2025-01-20 11:14:03 -05:00 committed by Andreas Kling
parent 263fd9b7c6
commit 7d420bbd3d
Notes: github-actions[bot] 2025-01-21 13:59:55 +00:00

View file

@ -4631,10 +4631,10 @@ static DeprecatedFlyString default_string_value = "default";
NonnullRefPtr<ImportStatement const> Parser::parse_import_statement(Program& program)
{
// We use the extended syntax which adds:
// ImportDeclaration:
// import ImportClause FromClause [no LineTerminator here] WithClause;
// import ModuleSpecifier [no LineTerminator here] WithClause;
// From: https://tc39.es/proposal-import-attributes/#prod-ImportDeclaration
// ImportDeclaration:
// import ImportClause FromClause WithClause[opt] ;
// import ModuleSpecifier WithClause[opt] ;
// From: https://tc39.es/proposal-import-attributes/#prod-ImportDeclaration
auto rule_start = push_start();
if (program.type() != Program::Type::Module)