@xaendar/compiler 0.6.13 → 0.6.14
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.
|
@@ -2354,7 +2354,7 @@ function processFor(node, nodeName, parentNode, compilerContext) {
|
|
|
2354
2354
|
const mainBlock = new Array();
|
|
2355
2355
|
const functionsToProcess = /* @__PURE__ */ new Map();
|
|
2356
2356
|
const iterableSource = node.iterableSource;
|
|
2357
|
-
compilerContext.hasIdentifier(iterableSource)
|
|
2357
|
+
const iterableExpr = compilerContext.hasIdentifier(iterableSource) ? iterableSource : `this.${iterableSource}`;
|
|
2358
2358
|
const itemsName = getTextIdentifier(parentNode, nodeName, "items");
|
|
2359
2359
|
const counterName = getTextIdentifier(parentNode, nodeName, "i");
|
|
2360
2360
|
const indexName = resolveImplicit(node, "$index");
|
|
@@ -2380,7 +2380,7 @@ function processFor(node, nodeName, parentNode, compilerContext) {
|
|
|
2380
2380
|
counterName
|
|
2381
2381
|
]
|
|
2382
2382
|
});
|
|
2383
|
-
mainBlock.push(`_for(${parentNode}, context,
|
|
2383
|
+
mainBlock.push(`_for(${parentNode}, context, () => ${iterableExpr}, this.${forKey}.bind(this));`);
|
|
2384
2384
|
return {
|
|
2385
2385
|
mainBlock,
|
|
2386
2386
|
fns: functionsToProcess
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xaendar/compiler",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.14",
|
|
4
4
|
"description": "A library for transpiling Xaendar Templates into JavaScript code",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"type": "module",
|
|
@@ -16,8 +16,8 @@
|
|
|
16
16
|
}
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@xaendar/common": "0.6.
|
|
20
|
-
"@xaendar/types": "0.6.
|
|
19
|
+
"@xaendar/common": "0.6.14",
|
|
20
|
+
"@xaendar/types": "0.6.14",
|
|
21
21
|
"typescript": "^6.0.3"
|
|
22
22
|
}
|
|
23
23
|
}
|