Enable logical assignment by default in @babel/parser (#11860) (#11869)

This commit is contained in:
Vahagn Aharonian
2020-07-22 21:14:37 +04:00
committed by Huáng Jùnliàng
parent 0e985fb287
commit b651a6f6ab
19 changed files with 15 additions and 44 deletions

View File

@@ -229,12 +229,6 @@ export default class ExpressionParser extends LValParser {
const operator = this.state.value;
node.operator = operator;
if (operator === "??=") {
this.expectPlugin("logicalAssignment");
}
if (operator === "||=" || operator === "&&=") {
this.expectPlugin("logicalAssignment");
}
if (this.match(tt.eq)) {
node.left = this.toAssignable(left);
refExpressionErrors.doubleProto = -1; // reset because double __proto__ is valid in assignment expression