Ignore:
Timestamp:
12/12/24 17:06:06 (5 weeks ago)
Author:
stefan toskovski <stefantoska84@…>
Branches:
main
Parents:
d565449
Message:

Pred finalna verzija

File:
1 edited

Legend:

Unmodified
Added
Removed
  • imaps-frontend/node_modules/@babel/generator/lib/node/index.js

    rd565449 r0c6b92a  
    55});
    66exports.TokenContext = void 0;
     7exports.isLastChild = isLastChild;
    78exports.needsParens = needsParens;
    89exports.needsWhitespace = needsWhitespace;
     
    1415const {
    1516  FLIPPED_ALIAS_KEYS,
     17  VISITOR_KEYS,
    1618  isCallExpression,
    1719  isDecorator,
     
    3436  function add(type, func) {
    3537    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) {
    3739      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);
    3941    } : func);
    4042  }
     
    7779  return needsWhitespace(node, parent, 2);
    7880}
    79 function needsParens(node, parent, tokenContext, inForInit) {
     81function needsParens(node, parent, tokenContext, inForInit, getRawIdentifier) {
    8082  var _expandedParens$get;
    8183  if (!parent) return false;
     
    8688    return !isDecoratorMemberExpression(node) && !(isCallExpression(node) && isDecoratorMemberExpression(node.callee)) && !isParenthesizedExpression(node);
    8789  }
    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);
    8991}
    9092function isDecoratorMemberExpression(node) {
     
    98100  }
    99101}
     102function 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}
    100118
    101119//# sourceMappingURL=index.js.map
Note: See TracChangeset for help on using the changeset viewer.