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.
@@ -1345,12 +1345,16 @@ function TokenLoc(target, context) {
1345
1345
  }
1346
1346
  function NodeHook(target, context) {
1347
1347
  return function (_node) {
1348
+ const prevParent = this.currentParent;
1348
1349
  const hook = this.hooks[context.name];
1349
1350
  const node = {
1350
1351
  loc: {}
1351
1352
  };
1353
+ node.parent = prevParent;
1352
1354
  hook?.enter?.call(this, node);
1355
+ this.currentParent = node;
1353
1356
  const result = target.call(this, node);
1357
+ this.currentParent = prevParent;
1354
1358
  hook?.leave?.call(this, node);
1355
1359
  return result;
1356
1360
  };