mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-03 14:28:39 +09:00
Issue #1691 - Part 15: Make |new import()| a syntax error. https://bugzilla.mozilla.org/show_bug.cgi?id=1508672
(cherry picked from commit 45fda91268b6a3ca8471c8094f2d640ebad682f9)
This commit is contained in:
parent
79ea755b7f
commit
f2b179156b
2 changed files with 4 additions and 4 deletions
|
|
@ -9392,7 +9392,7 @@ Parser<ParseHandler>::memberExpr(YieldHandling yieldHandling, TripledotHandling
|
|||
if (!lhs)
|
||||
return null();
|
||||
} else if (tt == TOK_IMPORT) {
|
||||
lhs = importExpr(yieldHandling);
|
||||
lhs = importExpr(yieldHandling, allowCallSyntax);
|
||||
if (!lhs)
|
||||
return null();
|
||||
} else {
|
||||
|
|
@ -10579,7 +10579,7 @@ Parser<ParseHandler>::tryNewTarget(BinaryNodeType* newTarget)
|
|||
|
||||
template <typename ParseHandler>
|
||||
typename ParseHandler::Node
|
||||
Parser<ParseHandler>::importExpr(YieldHandling yieldHandling)
|
||||
Parser<ParseHandler>::importExpr(YieldHandling yieldHandling, bool allowCallSyntax)
|
||||
{
|
||||
MOZ_ASSERT(tokenStream.isCurrentTokenType(TOK_IMPORT));
|
||||
|
||||
|
|
@ -10609,7 +10609,7 @@ Parser<ParseHandler>::importExpr(YieldHandling yieldHandling)
|
|||
return null();
|
||||
|
||||
return handler.newImportMeta(importHolder, metaHolder);
|
||||
} else if (next == TOK_LP) {
|
||||
} else if (next == TOK_LP && allowCallSyntax) {
|
||||
Node arg = assignExpr(InAllowed, yieldHandling, TripledotProhibited);
|
||||
if (!arg)
|
||||
return null();
|
||||
|
|
|
|||
|
|
@ -1421,7 +1421,7 @@ FOR_EACH_PARSENODE_SUBCLASS(DECLARE_TYPE)
|
|||
bool tryNewTarget(BinaryNodeType* newTarget);
|
||||
bool checkAndMarkSuperScope();
|
||||
|
||||
Node importExpr(YieldHandling yieldHandling);
|
||||
Node importExpr(YieldHandling yieldHandling, bool allowCallSyntax);
|
||||
|
||||
FunctionNodeType methodDefinition(uint32_t toStringStart, PropertyType propType, HandleAtom funName);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue