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