bobe 0.0.51 → 0.0.53

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/bobe.cjs.js CHANGED
@@ -1319,12 +1319,16 @@ function TokenLoc(target, context) {
1319
1319
  }
1320
1320
  function NodeHook(target, context) {
1321
1321
  return function (_node) {
1322
+ const prevParent = this.currentParent;
1322
1323
  const hook = this.hooks[context.name];
1323
1324
  const node = {
1324
1325
  loc: {}
1325
1326
  };
1327
+ node.parent = prevParent;
1326
1328
  hook?.enter?.call(this, node);
1329
+ this.currentParent = node;
1327
1330
  const result = target.call(this, node);
1331
+ this.currentParent = prevParent;
1328
1332
  hook?.leave?.call(this, node);
1329
1333
  return result;
1330
1334
  };