bobe 0.0.51 → 0.0.52

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