Updated the files.
This commit is contained in:
parent
1553e6b971
commit
753967d4f5
23418 changed files with 3784666 additions and 0 deletions
42
my-app/node_modules/@babel/helper-builder-binary-assignment-operator-visitor/lib/index.js
generated
vendored
Executable file
42
my-app/node_modules/@babel/helper-builder-binary-assignment-operator-visitor/lib/index.js
generated
vendored
Executable file
|
|
@ -0,0 +1,42 @@
|
|||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = _default;
|
||||
var _t = require("@babel/types");
|
||||
var _explodeAssignableExpression = require("./explode-assignable-expression.js");
|
||||
const {
|
||||
assignmentExpression,
|
||||
sequenceExpression
|
||||
} = _t;
|
||||
function _default(opts) {
|
||||
const {
|
||||
build,
|
||||
operator
|
||||
} = opts;
|
||||
const visitor = {
|
||||
AssignmentExpression(path) {
|
||||
const {
|
||||
node,
|
||||
scope
|
||||
} = path;
|
||||
if (node.operator !== operator + "=") return;
|
||||
const nodes = [];
|
||||
const exploded = (0, _explodeAssignableExpression.default)(node.left, nodes, scope);
|
||||
nodes.push(assignmentExpression("=", exploded.ref, build(exploded.uid, node.right)));
|
||||
path.replaceWith(sequenceExpression(nodes));
|
||||
},
|
||||
BinaryExpression(path) {
|
||||
const {
|
||||
node
|
||||
} = path;
|
||||
if (node.operator === operator) {
|
||||
path.replaceWith(build(node.left, node.right));
|
||||
}
|
||||
}
|
||||
};
|
||||
return visitor;
|
||||
}
|
||||
|
||||
//# sourceMappingURL=index.js.map
|
||||
Loading…
Add table
Add a link
Reference in a new issue