Parse import attributes

https://github.com/tc39/proposal-import-attributes#import-attributes
This commit is contained in:
Jarred Sumner
2023-04-09 07:49:08 -07:00
committed by Dylan Conway
parent 742b8f3f1b
commit a107a7cd95

View File

@@ -10309,7 +10309,7 @@ fn NewParser_(
// But some code may still use "assert"
// We support both and treat them identically.
// Once Prettier & TypeScript support import attributes, we will add runtime support
p.lexer.isContextualKeyword("assert") or p.lexer.isContextualKeyword("with")))
p.lexer.isContextualKeyword("assert") or p.lexer.token == .t_with))
{
try p.lexer.next();
try p.lexer.expect(.t_open_brace);