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 +16 -16
- package/dist/bobe.cjs.js.map +1 -1
- package/dist/bobe.compiler.cjs.js +16 -16
- package/dist/bobe.compiler.cjs.js.map +1 -1
- package/dist/bobe.compiler.esm.js +16 -16
- package/dist/bobe.compiler.esm.js.map +1 -1
- package/dist/bobe.esm.js +16 -16
- package/dist/bobe.esm.js.map +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.umd.js +16 -16
- package/dist/index.umd.js.map +1 -1
- package/package.json +3 -3
|
@@ -1676,11 +1676,11 @@ class Interpreter {
|
|
|
1676
1676
|
if (value === 'if' || value === 'else' || value === 'fail') {
|
|
1677
1677
|
return this.condDeclaration(ctx);
|
|
1678
1678
|
} else if (value === 'context') {
|
|
1679
|
-
_node = this.createContextNode();
|
|
1679
|
+
_node = this.createContextNode(ctx);
|
|
1680
1680
|
} else if (value === 'tp') {
|
|
1681
|
-
return this.createTpNode();
|
|
1681
|
+
return this.createTpNode(ctx);
|
|
1682
1682
|
} else if (value === 'for') {
|
|
1683
|
-
return this.forDeclaration();
|
|
1683
|
+
return this.forDeclaration(ctx);
|
|
1684
1684
|
} else if (hookType) {
|
|
1685
1685
|
const data = this.getData();
|
|
1686
1686
|
if (hookType === 'static') {
|
|
@@ -1713,7 +1713,7 @@ class Interpreter {
|
|
|
1713
1713
|
const valueIsMapKey = Boolean(getProxyHasKey(pData, value));
|
|
1714
1714
|
let node = {
|
|
1715
1715
|
__logicType: null,
|
|
1716
|
-
realParent:
|
|
1716
|
+
realParent: ctx.realParent,
|
|
1717
1717
|
tokenizer: null,
|
|
1718
1718
|
effect: null,
|
|
1719
1719
|
textNode: null,
|
|
@@ -1799,12 +1799,12 @@ class Interpreter {
|
|
|
1799
1799
|
});
|
|
1800
1800
|
return node;
|
|
1801
1801
|
}
|
|
1802
|
-
createTpNode() {
|
|
1802
|
+
createTpNode(ctx) {
|
|
1803
1803
|
const child = deepSignal({}, getPulling());
|
|
1804
1804
|
const node = {
|
|
1805
1805
|
__logicType: FakeType.Tp,
|
|
1806
1806
|
data: this.getData(),
|
|
1807
|
-
realParent:
|
|
1807
|
+
realParent: ctx.realParent,
|
|
1808
1808
|
realBefore: null,
|
|
1809
1809
|
realAfter: null,
|
|
1810
1810
|
contentBefore: null,
|
|
@@ -1812,7 +1812,7 @@ class Interpreter {
|
|
|
1812
1812
|
effect: null,
|
|
1813
1813
|
snapshot: null,
|
|
1814
1814
|
tpData: child,
|
|
1815
|
-
owner:
|
|
1815
|
+
owner: ctx.stack.peekByType(NodeSort.TokenizerSwitcher)?.node
|
|
1816
1816
|
};
|
|
1817
1817
|
this.onePropParsed = createStoreOnePropParsed(child);
|
|
1818
1818
|
this.tokenizer.nextToken();
|
|
@@ -1902,9 +1902,9 @@ class Interpreter {
|
|
|
1902
1902
|
});
|
|
1903
1903
|
return node;
|
|
1904
1904
|
}
|
|
1905
|
-
createContextNode() {
|
|
1905
|
+
createContextNode(ctx) {
|
|
1906
1906
|
const child = deepSignal({}, getPulling());
|
|
1907
|
-
const parentContext =
|
|
1907
|
+
const parentContext = ctx.stack.peekByType(NodeSort.Context)?.node?.context;
|
|
1908
1908
|
if (parentContext) {
|
|
1909
1909
|
backupSignal(child, parentContext);
|
|
1910
1910
|
}
|
|
@@ -1912,7 +1912,7 @@ class Interpreter {
|
|
|
1912
1912
|
const node = {
|
|
1913
1913
|
__logicType: FakeType.Context,
|
|
1914
1914
|
context: child,
|
|
1915
|
-
realParent:
|
|
1915
|
+
realParent: ctx.realParent,
|
|
1916
1916
|
realBefore: null,
|
|
1917
1917
|
realAfter: null
|
|
1918
1918
|
};
|
|
@@ -1957,7 +1957,7 @@ class Interpreter {
|
|
|
1957
1957
|
}
|
|
1958
1958
|
return res;
|
|
1959
1959
|
}
|
|
1960
|
-
forDeclaration() {
|
|
1960
|
+
forDeclaration(ctx) {
|
|
1961
1961
|
const arrExp = this.tokenizer.jsExp().value;
|
|
1962
1962
|
this.tokenizer.nextToken();
|
|
1963
1963
|
const itemToken = this.tokenizer.nextToken();
|
|
@@ -1983,12 +1983,12 @@ class Interpreter {
|
|
|
1983
1983
|
if (this.tokenizer.peekChar() !== '\n') keyExp = this.tokenizer.jsExp().value;
|
|
1984
1984
|
}
|
|
1985
1985
|
}
|
|
1986
|
-
const owner =
|
|
1987
|
-
const prevSibling =
|
|
1986
|
+
const owner = ctx.stack.peekByType(NodeSort.TokenizerSwitcher)?.node;
|
|
1987
|
+
const prevSibling = ctx.prevSibling;
|
|
1988
1988
|
const forNode = {
|
|
1989
1989
|
__logicType: FakeType.For,
|
|
1990
1990
|
snapshot: this.tokenizer.snapshot(['dentStack', 'isFirstToken']),
|
|
1991
|
-
realParent:
|
|
1991
|
+
realParent: ctx.realParent,
|
|
1992
1992
|
prevSibling,
|
|
1993
1993
|
realBefore: prevSibling?.realAfter || prevSibling,
|
|
1994
1994
|
realAfter: null,
|
|
@@ -2252,7 +2252,7 @@ class Interpreter {
|
|
|
2252
2252
|
forItemNode = {
|
|
2253
2253
|
id: this.forItemId++,
|
|
2254
2254
|
__logicType: FakeType.ForItem,
|
|
2255
|
-
realParent:
|
|
2255
|
+
realParent: this.ctx.realParent,
|
|
2256
2256
|
realBefore: null,
|
|
2257
2257
|
realAfter: null,
|
|
2258
2258
|
forNode,
|
|
@@ -2404,7 +2404,7 @@ class Interpreter {
|
|
|
2404
2404
|
const ifNode = {
|
|
2405
2405
|
__logicType: isElse ? FakeType.Else : isIf ? FakeType.If : FakeType.Fail,
|
|
2406
2406
|
snapshot: this.tokenizer.snapshot(),
|
|
2407
|
-
realParent:
|
|
2407
|
+
realParent: ctx.realParent,
|
|
2408
2408
|
realBefore: null,
|
|
2409
2409
|
realAfter: null,
|
|
2410
2410
|
condition: null,
|