Issue #2173 - Add a new PNK_PROPERTYNAME to hold location information about property access name

Based-on: m-c 1378808/2
This commit is contained in:
Martok 2023-03-23 18:53:27 +01:00 • committed by roytam1
commit fa1193b8c9
10 changed files with 104 additions and 76 deletions

View file

@ -642,16 +642,16 @@ static ParseNode*
DotBase(ParseNode* pn)
{
MOZ_ASSERT(pn->isKind(PNK_DOT));
MOZ_ASSERT(pn->isArity(PN_NAME));
return pn->expr();
MOZ_ASSERT(pn->isArity(PN_BINARY));
return pn->pn_left;
}
static PropertyName*
DotMember(ParseNode* pn)
{
MOZ_ASSERT(pn->isKind(PNK_DOT));
MOZ_ASSERT(pn->isArity(PN_NAME));
return pn->pn_atom->asPropertyName();
MOZ_ASSERT(pn->isArity(PN_BINARY));
return pn->pn_right->pn_atom->asPropertyName();
}
static ParseNode*