@abaplint/transpiler-cli 2.13.51 → 2.13.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.
- package/build/bundle.js +10 -3
- package/package.json +2 -2
package/build/bundle.js
CHANGED
|
@@ -107333,6 +107333,10 @@ class ValueBodyTranspiler {
|
|
|
107333
107333
|
let extraFields = "";
|
|
107334
107334
|
let baseCode = undefined;
|
|
107335
107335
|
const hasLines = body.findDirectExpression(core_1.Expressions.ValueBodyLine) !== undefined;
|
|
107336
|
+
const outerLet = body.findDirectExpression(core_1.Expressions.Let);
|
|
107337
|
+
const outerLetCode = outerLet === undefined
|
|
107338
|
+
? undefined
|
|
107339
|
+
: new let_1.LetTranspiler().transpile(outerLet, traversal).getCode();
|
|
107336
107340
|
const children = body.getChildren();
|
|
107337
107341
|
for (let i = 0; i < children.length; i++) {
|
|
107338
107342
|
const child = children[i];
|
|
@@ -107375,10 +107379,13 @@ class ValueBodyTranspiler {
|
|
|
107375
107379
|
}
|
|
107376
107380
|
}
|
|
107377
107381
|
i = idx - 1;
|
|
107378
|
-
const result = this.buildForChain(forNodes, typ, traversal, body, baseCode);
|
|
107382
|
+
const result = this.buildForChain(forNodes, typ, traversal, body, baseCode, outerLetCode);
|
|
107379
107383
|
ret = result.chunk;
|
|
107380
107384
|
post = result.post;
|
|
107381
107385
|
}
|
|
107386
|
+
else if (child.get() instanceof core_1.Expressions.Let) {
|
|
107387
|
+
continue;
|
|
107388
|
+
}
|
|
107382
107389
|
else if (child instanceof core_1.Nodes.TokenNode && child.getFirstToken().getStr().toUpperCase() === "DEFAULT") {
|
|
107383
107390
|
// note: this is last in the body, so its okay to prepend and postpend
|
|
107384
107391
|
const sources = body.findDirectExpressions(core_1.Expressions.Source);
|
|
@@ -107401,10 +107408,10 @@ class ValueBodyTranspiler {
|
|
|
107401
107408
|
}
|
|
107402
107409
|
return ret.appendString(post);
|
|
107403
107410
|
}
|
|
107404
|
-
buildForChain(forNodes, typ, traversal, body, baseCode) {
|
|
107411
|
+
buildForChain(forNodes, typ, traversal, body, baseCode, outerLetCode) {
|
|
107405
107412
|
const val = baseCode ?? new type_name_or_infer_1.TypeNameOrInfer().transpile(typ, traversal).getCode();
|
|
107406
107413
|
const chunk = new chunk_1.Chunk();
|
|
107407
|
-
const preLoopDecls = [];
|
|
107414
|
+
const preLoopDecls = outerLetCode === undefined ? [] : [outerLetCode];
|
|
107408
107415
|
const descriptors = [];
|
|
107409
107416
|
const levelIndents = [];
|
|
107410
107417
|
let uniqueCounter = 1;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abaplint/transpiler-cli",
|
|
3
|
-
"version": "2.13.
|
|
3
|
+
"version": "2.13.52",
|
|
4
4
|
"description": "Transpiler - Command Line Interface",
|
|
5
5
|
"funding": "https://github.com/sponsors/larshp",
|
|
6
6
|
"bin": {
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"license": "MIT",
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"@abaplint/core": "^2.120.20",
|
|
31
|
-
"@abaplint/transpiler": "^2.13.
|
|
31
|
+
"@abaplint/transpiler": "^2.13.52",
|
|
32
32
|
"@types/glob": "^8.1.0",
|
|
33
33
|
"@types/node": "^24.13.3",
|
|
34
34
|
"@types/progress": "^2.0.7",
|