mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-29 18:47:31 +09:00
Issue #1918 - m-c 1345960: Handle shorthand property and destructuring with async keyword properly.
This was previously partially present, but got lost along the way
This commit is contained in:
parent
5e1b813aac
commit
8b14220c3c
1 changed files with 5 additions and 4 deletions
|
|
@ -9743,13 +9743,14 @@ Parser<ParseHandler>::propertyName(YieldHandling yieldHandling,
|
||||||
// ComputedPropertyName[Yield, Await]:
|
// ComputedPropertyName[Yield, Await]:
|
||||||
// [ ...
|
// [ ...
|
||||||
TokenKind tt = TOK_EOF;
|
TokenKind tt = TOK_EOF;
|
||||||
if (!tokenStream.getToken(&tt))
|
if (!tokenStream.peekTokenSameLine(&tt))
|
||||||
return null();
|
return null();
|
||||||
if (tt != TOK_LP && tt != TOK_COLON && tt != TOK_RC && tt != TOK_ASSIGN) {
|
if (tt == TOK_STRING || tt == TOK_NUMBER || tt == TOK_LB ||
|
||||||
|
TokenKindIsPossibleIdentifierName(tt))
|
||||||
|
{
|
||||||
isAsync = true;
|
isAsync = true;
|
||||||
|
tokenStream.consumeKnownToken(tt);
|
||||||
ltok = tt;
|
ltok = tt;
|
||||||
} else {
|
|
||||||
tokenStream.ungetToken();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue