Legend:
- Unmodified
- Added
- Removed
-
imaps-frontend/node_modules/@babel/generator/lib/node/index.js
rd565449 r0c6b92a 5 5 }); 6 6 exports.TokenContext = void 0; 7 exports.isLastChild = isLastChild; 7 8 exports.needsParens = needsParens; 8 9 exports.needsWhitespace = needsWhitespace; … … 14 15 const { 15 16 FLIPPED_ALIAS_KEYS, 17 VISITOR_KEYS, 16 18 isCallExpression, 17 19 isDecorator, … … 34 36 function add(type, func) { 35 37 const fn = map.get(type); 36 map.set(type, fn ? function (node, parent, stack, inForInit ) {38 map.set(type, fn ? function (node, parent, stack, inForInit, getRawIdentifier) { 37 39 var _fn; 38 return (_fn = fn(node, parent, stack, inForInit )) != null ? _fn : func(node, parent, stack, inForInit);40 return (_fn = fn(node, parent, stack, inForInit, getRawIdentifier)) != null ? _fn : func(node, parent, stack, inForInit, getRawIdentifier); 39 41 } : func); 40 42 } … … 77 79 return needsWhitespace(node, parent, 2); 78 80 } 79 function needsParens(node, parent, tokenContext, inForInit ) {81 function needsParens(node, parent, tokenContext, inForInit, getRawIdentifier) { 80 82 var _expandedParens$get; 81 83 if (!parent) return false; … … 86 88 return !isDecoratorMemberExpression(node) && !(isCallExpression(node) && isDecoratorMemberExpression(node.callee)) && !isParenthesizedExpression(node); 87 89 } 88 return (_expandedParens$get = expandedParens.get(node.type)) == null ? void 0 : _expandedParens$get(node, parent, tokenContext, inForInit );90 return (_expandedParens$get = expandedParens.get(node.type)) == null ? void 0 : _expandedParens$get(node, parent, tokenContext, inForInit, getRawIdentifier); 89 91 } 90 92 function isDecoratorMemberExpression(node) { … … 98 100 } 99 101 } 102 function isLastChild(parent, child) { 103 const visitorKeys = VISITOR_KEYS[parent.type]; 104 for (let i = visitorKeys.length - 1; i >= 0; i--) { 105 const val = parent[visitorKeys[i]]; 106 if (val === child) { 107 return true; 108 } else if (Array.isArray(val)) { 109 let j = val.length - 1; 110 while (j >= 0 && val[j] === null) j--; 111 return j >= 0 && val[j] === child; 112 } else if (val) { 113 return false; 114 } 115 } 116 return false; 117 } 100 118 101 119 //# sourceMappingURL=index.js.map
Note:
See TracChangeset
for help on using the changeset viewer.