Legend:
- Unmodified
- Added
- Removed
-
imaps-frontend/node_modules/@babel/traverse/lib/path/replacement.js
rd565449 r0c6b92a 17 17 var _parser = require("@babel/parser"); 18 18 var _t = require("@babel/types"); 19 var _context = require("./context.js"); 19 20 const { 20 21 FUNCTION_TYPES, … … 49 50 function replaceWithMultiple(nodes) { 50 51 var _getCachedPaths; 51 this.resync();52 _context.resync.call(this); 52 53 nodes = _modification._verifyNodeList.call(this, nodes); 53 54 inheritLeadingComments(nodes[0], this.node); … … 64 65 } 65 66 function replaceWithSourceString(replacement) { 66 this.resync();67 _context.resync.call(this); 67 68 let ast; 68 69 try { … … 87 88 } 88 89 function replaceWith(replacementPath) { 89 this.resync();90 _context.resync.call(this); 90 91 if (this.removed) { 91 92 throw new Error("You can't replace this node, we've already removed it"); … … 126 127 _replaceWith.call(this, replacement); 127 128 this.type = replacement.type; 128 this.setScope();129 _context.setScope.call(this); 129 130 this.requeue(); 130 131 return [nodePath ? this.get(nodePath) : this]; … … 145 146 } 146 147 function replaceExpressionWithStatements(nodes) { 147 this.resync();148 _context.resync.call(this); 148 149 const declars = []; 149 150 const nodesAsSingleExpression = gatherSequenceExpressions(nodes, declars); … … 155 156 } 156 157 const functionParent = this.getFunctionParent(); 157 const isParentAsync = functionParent == null ? void 0 : functionParent. is("async");158 const isParentGenerator = functionParent == null ? void 0 : functionParent. is("generator");158 const isParentAsync = functionParent == null ? void 0 : functionParent.node.async; 159 const isParentGenerator = functionParent == null ? void 0 : functionParent.node.generator; 159 160 const container = arrowFunctionExpression([], blockStatement(nodes)); 160 161 this.replaceWith(callExpression(container, [])); … … 245 246 } 246 247 function replaceInline(nodes) { 247 this.resync();248 _context.resync.call(this); 248 249 if (Array.isArray(nodes)) { 249 250 if (Array.isArray(this.container)) {
Note:
See TracChangeset
for help on using the changeset viewer.