Simplify checking of the left-hand side of assignment and compound

assignment expressions.
This commit is contained in:
wolfbeast 2019-04-06 10:46:15 +02:00 • committed by Roy Tam
commit e9b63ee1fe
2 changed files with 28 additions and 50 deletions

View file

@ -1332,15 +1332,11 @@ class Parser final : private JS::AutoGCRooter, public StrictModeGetter
}
enum AssignmentFlavor {
PlainAssignment,
CompoundAssignment,
KeyedDestructuringAssignment,
IncrementAssignment,
DecrementAssignment,
};
bool checkAndMarkAsAssignmentLhs(Node pn, AssignmentFlavor flavor,
PossibleError* possibleError=nullptr);
bool matchInOrOf(bool* isForInp, bool* isForOfp);
bool hasUsedFunctionSpecialName(HandlePropertyName name);