bobe 0.0.62 → 0.0.64

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
@@ -1650,11 +1650,11 @@ class Interpreter {
1650
1650
  if (value === 'if' || value === 'else' || value === 'fail') {
1651
1651
  return this.condDeclaration(ctx);
1652
1652
  } else if (value === 'context') {
1653
- _node = this.createContextNode();
1653
+ _node = this.createContextNode(ctx);
1654
1654
  } else if (value === 'tp') {
1655
- return this.createTpNode();
1655
+ return this.createTpNode(ctx);
1656
1656
  } else if (value === 'for') {
1657
- return this.forDeclaration();
1657
+ return this.forDeclaration(ctx);
1658
1658
  } else if (hookType) {
1659
1659
  const data = this.getData();
1660
1660
  if (hookType === 'static') {
@@ -1687,7 +1687,7 @@ class Interpreter {
1687
1687
  const valueIsMapKey = Boolean(aoye.getProxyHasKey(pData, value));
1688
1688
  let node = {
1689
1689
  __logicType: null,
1690
- realParent: null,
1690
+ realParent: ctx.realParent,
1691
1691
  tokenizer: null,
1692
1692
  effect: null,
1693
1693
  textNode: null,
@@ -1773,12 +1773,12 @@ class Interpreter {
1773
1773
  });
1774
1774
  return node;
1775
1775
  }
1776
- createTpNode() {
1776
+ createTpNode(ctx) {
1777
1777
  const child = aoye.deepSignal({}, aoye.getPulling());
1778
1778
  const node = {
1779
1779
  __logicType: FakeType.Tp,
1780
1780
  data: this.getData(),
1781
- realParent: null,
1781
+ realParent: ctx.realParent,
1782
1782
  realBefore: null,
1783
1783
  realAfter: null,
1784
1784
  contentBefore: null,
@@ -1786,7 +1786,7 @@ class Interpreter {
1786
1786
  effect: null,
1787
1787
  snapshot: null,
1788
1788
  tpData: child,
1789
- owner: this.ctx.stack.peekByType(NodeSort.TokenizerSwitcher)?.node
1789
+ owner: ctx.stack.peekByType(NodeSort.TokenizerSwitcher)?.node
1790
1790
  };
1791
1791
  this.onePropParsed = createStoreOnePropParsed(child);
1792
1792
  this.tokenizer.nextToken();
@@ -1876,9 +1876,9 @@ class Interpreter {
1876
1876
  });
1877
1877
  return node;
1878
1878
  }
1879
- createContextNode() {
1879
+ createContextNode(ctx) {
1880
1880
  const child = aoye.deepSignal({}, aoye.getPulling());
1881
- const parentContext = this.ctx.stack.peekByType(NodeSort.Context)?.node?.context;
1881
+ const parentContext = ctx.stack.peekByType(NodeSort.Context)?.node?.context;
1882
1882
  if (parentContext) {
1883
1883
  aoye.backupSignal(child, parentContext);
1884
1884
  }
@@ -1886,7 +1886,7 @@ class Interpreter {
1886
1886
  const node = {
1887
1887
  __logicType: FakeType.Context,
1888
1888
  context: child,
1889
- realParent: null,
1889
+ realParent: ctx.realParent,
1890
1890
  realBefore: null,
1891
1891
  realAfter: null
1892
1892
  };
@@ -1931,7 +1931,7 @@ class Interpreter {
1931
1931
  }
1932
1932
  return res;
1933
1933
  }
1934
- forDeclaration() {
1934
+ forDeclaration(ctx) {
1935
1935
  const arrExp = this.tokenizer.jsExp().value;
1936
1936
  this.tokenizer.nextToken();
1937
1937
  const itemToken = this.tokenizer.nextToken();
@@ -1957,12 +1957,12 @@ class Interpreter {
1957
1957
  if (this.tokenizer.peekChar() !== '\n') keyExp = this.tokenizer.jsExp().value;
1958
1958
  }
1959
1959
  }
1960
- const owner = this.ctx.stack.peekByType(NodeSort.TokenizerSwitcher)?.node;
1961
- const prevSibling = this.ctx.prevSibling;
1960
+ const owner = ctx.stack.peekByType(NodeSort.TokenizerSwitcher)?.node;
1961
+ const prevSibling = ctx.prevSibling;
1962
1962
  const forNode = {
1963
1963
  __logicType: FakeType.For,
1964
1964
  snapshot: this.tokenizer.snapshot(['dentStack', 'isFirstToken']),
1965
- realParent: this.ctx.realParent,
1965
+ realParent: ctx.realParent,
1966
1966
  prevSibling,
1967
1967
  realBefore: prevSibling?.realAfter || prevSibling,
1968
1968
  realAfter: null,
@@ -2226,7 +2226,7 @@ class Interpreter {
2226
2226
  forItemNode = {
2227
2227
  id: this.forItemId++,
2228
2228
  __logicType: FakeType.ForItem,
2229
- realParent: null,
2229
+ realParent: this.ctx.realParent,
2230
2230
  realBefore: null,
2231
2231
  realAfter: null,
2232
2232
  forNode,
@@ -2378,7 +2378,7 @@ class Interpreter {
2378
2378
  const ifNode = {
2379
2379
  __logicType: isElse ? FakeType.Else : isIf ? FakeType.If : FakeType.Fail,
2380
2380
  snapshot: this.tokenizer.snapshot(),
2381
- realParent: null,
2381
+ realParent: ctx.realParent,
2382
2382
  realBefore: null,
2383
2383
  realAfter: null,
2384
2384
  condition: null,