@abaplint/transpiler-cli 2.13.71 → 2.13.73
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 +45 -6
- package/package.json +2 -2
package/build/bundle.js
CHANGED
|
@@ -115312,6 +115312,7 @@ __exportStar(__webpack_require__(/*! ./select */ "./node_modules/@abaplint/trans
|
|
|
115312
115312
|
__exportStar(__webpack_require__(/*! ./selection_screen */ "./node_modules/@abaplint/transpiler/build/src/statements/selection_screen.js"), exports);
|
|
115313
115313
|
__exportStar(__webpack_require__(/*! ./set_bit */ "./node_modules/@abaplint/transpiler/build/src/statements/set_bit.js"), exports);
|
|
115314
115314
|
__exportStar(__webpack_require__(/*! ./set_blank */ "./node_modules/@abaplint/transpiler/build/src/statements/set_blank.js"), exports);
|
|
115315
|
+
__exportStar(__webpack_require__(/*! ./set_cursor */ "./node_modules/@abaplint/transpiler/build/src/statements/set_cursor.js"), exports);
|
|
115315
115316
|
__exportStar(__webpack_require__(/*! ./set_dataset */ "./node_modules/@abaplint/transpiler/build/src/statements/set_dataset.js"), exports);
|
|
115316
115317
|
__exportStar(__webpack_require__(/*! ./set_extended_check */ "./node_modules/@abaplint/transpiler/build/src/statements/set_extended_check.js"), exports);
|
|
115317
115318
|
__exportStar(__webpack_require__(/*! ./set_handler */ "./node_modules/@abaplint/transpiler/build/src/statements/set_handler.js"), exports);
|
|
@@ -115710,9 +115711,11 @@ class LoopTranspiler {
|
|
|
115710
115711
|
unique = "";
|
|
115711
115712
|
injectFrom = undefined;
|
|
115712
115713
|
skipInto = undefined;
|
|
115714
|
+
atLast = undefined;
|
|
115713
115715
|
constructor(options) {
|
|
115714
115716
|
this.injectFrom = options?.injectFrom;
|
|
115715
115717
|
this.skipInto = options?.skipInto;
|
|
115718
|
+
this.atLast = options?.atLast;
|
|
115716
115719
|
}
|
|
115717
115720
|
getTarget() {
|
|
115718
115721
|
return this.unique;
|
|
@@ -115810,6 +115813,9 @@ class LoopTranspiler {
|
|
|
115810
115813
|
}
|
|
115811
115814
|
extra.push(`dynamicWhere: {condition: ${code}, evaluate: (name) => {try { return eval(name);} catch {}}}`);
|
|
115812
115815
|
}
|
|
115816
|
+
if (this.atLast !== undefined) {
|
|
115817
|
+
extra.push(`atLast: (last) => { ${this.atLast} = last; }`);
|
|
115818
|
+
}
|
|
115813
115819
|
const topEquals = {};
|
|
115814
115820
|
for (const compare of whereNode?.findDirectExpressions(abaplint.Expressions.ComponentCompare) || []) {
|
|
115815
115821
|
const op = compare.findDirectExpression(abaplint.Expressions.CompareOperator)?.concatTokens().toUpperCase();
|
|
@@ -118490,6 +118496,27 @@ exports.SetBlankTranspiler = SetBlankTranspiler;
|
|
|
118490
118496
|
|
|
118491
118497
|
/***/ },
|
|
118492
118498
|
|
|
118499
|
+
/***/ "./node_modules/@abaplint/transpiler/build/src/statements/set_cursor.js"
|
|
118500
|
+
/*!******************************************************************************!*\
|
|
118501
|
+
!*** ./node_modules/@abaplint/transpiler/build/src/statements/set_cursor.js ***!
|
|
118502
|
+
\******************************************************************************/
|
|
118503
|
+
(__unused_webpack_module, exports, __webpack_require__) {
|
|
118504
|
+
|
|
118505
|
+
"use strict";
|
|
118506
|
+
|
|
118507
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
118508
|
+
exports.SetCursorTranspiler = void 0;
|
|
118509
|
+
const chunk_1 = __webpack_require__(/*! ../chunk */ "./node_modules/@abaplint/transpiler/build/src/chunk.js");
|
|
118510
|
+
class SetCursorTranspiler {
|
|
118511
|
+
transpile(_node, _traversal) {
|
|
118512
|
+
return new chunk_1.Chunk(`throw new Error("SET CURSOR, not supported, transpiler");`);
|
|
118513
|
+
}
|
|
118514
|
+
}
|
|
118515
|
+
exports.SetCursorTranspiler = SetCursorTranspiler;
|
|
118516
|
+
//# sourceMappingURL=set_cursor.js.map
|
|
118517
|
+
|
|
118518
|
+
/***/ },
|
|
118519
|
+
|
|
118493
118520
|
/***/ "./node_modules/@abaplint/transpiler/build/src/statements/set_dataset.js"
|
|
118494
118521
|
/*!*******************************************************************************!*\
|
|
118495
118522
|
!*** ./node_modules/@abaplint/transpiler/build/src/statements/set_dataset.js ***!
|
|
@@ -121566,12 +121593,14 @@ const at_last_1 = __webpack_require__(/*! ./at_last */ "./node_modules/@abaplint
|
|
|
121566
121593
|
const unique_identifier_1 = __webpack_require__(/*! ../unique_identifier */ "./node_modules/@abaplint/transpiler/build/src/unique_identifier.js");
|
|
121567
121594
|
const statements_1 = __webpack_require__(/*! ../statements */ "./node_modules/@abaplint/transpiler/build/src/statements/index.js");
|
|
121568
121595
|
const at_1 = __webpack_require__(/*! ./at */ "./node_modules/@abaplint/transpiler/build/src/structures/at.js");
|
|
121596
|
+
const inline_1 = __webpack_require__(/*! ../inline */ "./node_modules/@abaplint/transpiler/build/src/inline.js");
|
|
121569
121597
|
class LoopTranspiler {
|
|
121570
121598
|
transpile(node, traversal) {
|
|
121571
121599
|
const ret = new chunk_1.Chunk();
|
|
121572
121600
|
let pre = "";
|
|
121573
121601
|
let atFirst = undefined;
|
|
121574
121602
|
let atLast = undefined;
|
|
121603
|
+
let atLastFlag = "";
|
|
121575
121604
|
let loopStatement = undefined;
|
|
121576
121605
|
let previous = "";
|
|
121577
121606
|
let tabix = "";
|
|
@@ -121583,6 +121612,18 @@ class LoopTranspiler {
|
|
|
121583
121612
|
break;
|
|
121584
121613
|
}
|
|
121585
121614
|
}
|
|
121615
|
+
const hasAtLast = (node.findDirectStructure(abaplint.Structures.Body)
|
|
121616
|
+
?.findDirectStructures(abaplint.Structures.Normal) || [])
|
|
121617
|
+
.some(n => n.findDirectStructure(abaplint.Structures.AtLast) !== undefined);
|
|
121618
|
+
const scope = traversal.findCurrentScopeByToken(node.getFirstToken());
|
|
121619
|
+
if (scope?.getIdentifier().stype === abaplint.ScopeType.Program
|
|
121620
|
+
|| scope?.getIdentifier().stype === abaplint.ScopeType.SelectionEvent) {
|
|
121621
|
+
ret.appendString(inline_1.InlineDeclarations.buildDeclarations(node, traversal));
|
|
121622
|
+
}
|
|
121623
|
+
if (hasAtLast) {
|
|
121624
|
+
atLastFlag = unique_identifier_1.UniqueIdentifier.get();
|
|
121625
|
+
ret.appendString(`let ${atLastFlag} = false;\n`);
|
|
121626
|
+
}
|
|
121586
121627
|
if (node.findDirectStatement(abaplint.Statements.Loop)?.findDirectTokenByText("GROUP") !== undefined) {
|
|
121587
121628
|
return new chunk_1.Chunk(`throw new Error("transpiler todo, GROUP BY");`);
|
|
121588
121629
|
}
|
|
@@ -121601,6 +121642,9 @@ class LoopTranspiler {
|
|
|
121601
121642
|
}
|
|
121602
121643
|
else if (n instanceof abaplint.Nodes.StructureNode && n.get() instanceof abaplint.Structures.AtLast) {
|
|
121603
121644
|
atLast = new at_last_1.AtLastTranspiler().transpile(n, traversal);
|
|
121645
|
+
ret.appendString(`if (${atLastFlag}) {\n`);
|
|
121646
|
+
ret.appendChunk(atLast);
|
|
121647
|
+
ret.appendString("}\n");
|
|
121604
121648
|
}
|
|
121605
121649
|
else if (n instanceof abaplint.Nodes.StructureNode && n.get() instanceof abaplint.Structures.At) {
|
|
121606
121650
|
ret.appendChunk(new at_1.AtTranspiler().transpile(n, traversal, previous, loopTarget, tabix, loopStatement));
|
|
@@ -121618,7 +121662,7 @@ class LoopTranspiler {
|
|
|
121618
121662
|
ret.appendString(`let ${previous} = undefined;\n`);
|
|
121619
121663
|
ret.appendString(`let ${tabix} = undefined;\n`);
|
|
121620
121664
|
}
|
|
121621
|
-
const loop = new statements_1.LoopTranspiler();
|
|
121665
|
+
const loop = new statements_1.LoopTranspiler({ atLast: atLastFlag || undefined });
|
|
121622
121666
|
// LoopStatementTranspiler maps its own head, so no ensureStartMapping needed here
|
|
121623
121667
|
ret.appendChunk(loop.transpile(c, traversal));
|
|
121624
121668
|
ret.appendString("\n");
|
|
@@ -121643,11 +121687,6 @@ class LoopTranspiler {
|
|
|
121643
121687
|
atted.appendString(pre);
|
|
121644
121688
|
}
|
|
121645
121689
|
atted.appendChunk(ret);
|
|
121646
|
-
if (atLast) {
|
|
121647
|
-
atted.appendString("if (abap.builtin.sy.get().subrc.get() === 0) {\n");
|
|
121648
|
-
atted.appendChunk(atLast);
|
|
121649
|
-
atted.appendString("}\n");
|
|
121650
|
-
}
|
|
121651
121690
|
return atted;
|
|
121652
121691
|
}
|
|
121653
121692
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abaplint/transpiler-cli",
|
|
3
|
-
"version": "2.13.
|
|
3
|
+
"version": "2.13.73",
|
|
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.42",
|
|
31
|
-
"@abaplint/transpiler": "^2.13.
|
|
31
|
+
"@abaplint/transpiler": "^2.13.73",
|
|
32
32
|
"@types/glob": "^8.1.0",
|
|
33
33
|
"@types/node": "^24.13.3",
|
|
34
34
|
"@types/progress": "^2.0.7",
|