Add ??= to Logical Assignment Operators (#7623)

`??=` is being merged into the Logical Assignment Operator proposal, and the overall proposal will wait until nullish coalescing is finalized.
This commit is contained in:
Justin Ridgewell
2018-03-25 18:58:51 +01:00
committed by GitHub
parent 023f8bd1cb
commit a7bddc02ba
19 changed files with 391 additions and 9 deletions

View File

@@ -12,7 +12,7 @@ export default declare(api => {
AssignmentExpression(path) {
const { node, scope } = path;
const { operator, left, right } = node;
if (operator !== "||=" && operator !== "&&=") {
if (operator !== "||=" && operator !== "&&=" && operator !== "??=") {
return;
}