mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-09 17:31:47 +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]:
|
||||
// [ ...
|
||||
TokenKind tt = TOK_EOF;
|
||||
if (!tokenStream.getToken(&tt))
|
||||
if (!tokenStream.peekTokenSameLine(&tt))
|
||||
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;
|
||||
tokenStream.consumeKnownToken(tt);
|
||||
ltok = tt;
|
||||
} else {
|
||||
tokenStream.ungetToken();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue