@abaplint/transpiler-cli 2.11.40 → 2.11.42
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 +70 -17
- package/package.json +3 -3
package/build/bundle.js
CHANGED
|
@@ -25803,7 +25803,6 @@ class MethodCallParam {
|
|
|
25803
25803
|
new method_parameters_1.MethodParameters().runSyntax(child, input, method);
|
|
25804
25804
|
}
|
|
25805
25805
|
else {
|
|
25806
|
-
// console.dir(child);
|
|
25807
25806
|
const message = "MethodCallParam, unexpected child";
|
|
25808
25807
|
input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
|
|
25809
25808
|
return;
|
|
@@ -26130,9 +26129,13 @@ class MethodParameters {
|
|
|
26130
26129
|
for (const i of method.getParameters().getImporting()) {
|
|
26131
26130
|
if (i.getName().toUpperCase() === name) {
|
|
26132
26131
|
targetType = i.getType();
|
|
26132
|
+
break;
|
|
26133
26133
|
}
|
|
26134
26134
|
}
|
|
26135
26135
|
}
|
|
26136
|
+
else {
|
|
26137
|
+
targetType = method;
|
|
26138
|
+
}
|
|
26136
26139
|
let sourceType = source_1.Source.runSyntax(source, input, targetType);
|
|
26137
26140
|
if (sourceType === undefined) {
|
|
26138
26141
|
if (method instanceof basic_1.VoidType) {
|
|
@@ -53791,7 +53794,7 @@ class Registry {
|
|
|
53791
53794
|
}
|
|
53792
53795
|
static abaplintVersion() {
|
|
53793
53796
|
// magic, see build script "version.sh"
|
|
53794
|
-
return "2.113.
|
|
53797
|
+
return "2.113.182";
|
|
53795
53798
|
}
|
|
53796
53799
|
getDDICReferences() {
|
|
53797
53800
|
return this.ddicReferences;
|
|
@@ -79502,6 +79505,7 @@ __exportStar(__webpack_require__(/*! ./field_symbol */ "./node_modules/@abaplint
|
|
|
79502
79505
|
__exportStar(__webpack_require__(/*! ./function_exporting */ "./node_modules/@abaplint/transpiler/build/src/expressions/function_exporting.js"), exports);
|
|
79503
79506
|
__exportStar(__webpack_require__(/*! ./table_expression */ "./node_modules/@abaplint/transpiler/build/src/expressions/table_expression.js"), exports);
|
|
79504
79507
|
__exportStar(__webpack_require__(/*! ./function_parameters */ "./node_modules/@abaplint/transpiler/build/src/expressions/function_parameters.js"), exports);
|
|
79508
|
+
__exportStar(__webpack_require__(/*! ./let */ "./node_modules/@abaplint/transpiler/build/src/expressions/let.js"), exports);
|
|
79505
79509
|
__exportStar(__webpack_require__(/*! ./message_number */ "./node_modules/@abaplint/transpiler/build/src/expressions/message_number.js"), exports);
|
|
79506
79510
|
__exportStar(__webpack_require__(/*! ./method_call_body */ "./node_modules/@abaplint/transpiler/build/src/expressions/method_call_body.js"), exports);
|
|
79507
79511
|
__exportStar(__webpack_require__(/*! ./method_call_chain */ "./node_modules/@abaplint/transpiler/build/src/expressions/method_call_chain.js"), exports);
|
|
@@ -79548,6 +79552,50 @@ __exportStar(__webpack_require__(/*! ./type_name_or_infer */ "./node_modules/@ab
|
|
|
79548
79552
|
|
|
79549
79553
|
/***/ }),
|
|
79550
79554
|
|
|
79555
|
+
/***/ "./node_modules/@abaplint/transpiler/build/src/expressions/let.js":
|
|
79556
|
+
/*!************************************************************************!*\
|
|
79557
|
+
!*** ./node_modules/@abaplint/transpiler/build/src/expressions/let.js ***!
|
|
79558
|
+
\************************************************************************/
|
|
79559
|
+
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
79560
|
+
|
|
79561
|
+
"use strict";
|
|
79562
|
+
|
|
79563
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
79564
|
+
exports.LetTranspiler = void 0;
|
|
79565
|
+
const core_1 = __webpack_require__(/*! @abaplint/core */ "./node_modules/@abaplint/core/build/src/index.js");
|
|
79566
|
+
const chunk_1 = __webpack_require__(/*! ../chunk */ "./node_modules/@abaplint/transpiler/build/src/chunk.js");
|
|
79567
|
+
const transpile_types_1 = __webpack_require__(/*! ../transpile_types */ "./node_modules/@abaplint/transpiler/build/src/transpile_types.js");
|
|
79568
|
+
class LetTranspiler {
|
|
79569
|
+
transpile(node, traversal) {
|
|
79570
|
+
if (!(node.get() instanceof core_1.Expressions.Let)) {
|
|
79571
|
+
throw new Error("LetTranspiler, Expected Let");
|
|
79572
|
+
}
|
|
79573
|
+
const ret = new chunk_1.Chunk();
|
|
79574
|
+
for (const def of node.findAllExpressions(core_1.Expressions.InlineFieldDefinition)) {
|
|
79575
|
+
const nameToken = def.findDirectExpression(core_1.Expressions.Field);
|
|
79576
|
+
if (nameToken === undefined) {
|
|
79577
|
+
throw new Error("LetTranspiler, Expected Field");
|
|
79578
|
+
}
|
|
79579
|
+
const name = nameToken?.concatTokens();
|
|
79580
|
+
const scope = traversal.findCurrentScopeByToken(node.getFirstToken());
|
|
79581
|
+
const variable = scope?.findVariable(name);
|
|
79582
|
+
if (variable === undefined) {
|
|
79583
|
+
throw new Error("LetTranspiler, Expected Variable");
|
|
79584
|
+
}
|
|
79585
|
+
ret.appendString(transpile_types_1.TranspileTypes.declare(variable));
|
|
79586
|
+
const source = def.findDirectExpression(core_1.Expressions.Source);
|
|
79587
|
+
if (source) {
|
|
79588
|
+
ret.appendString(name + `.set(${traversal.traverse(source).getCode()});`);
|
|
79589
|
+
}
|
|
79590
|
+
}
|
|
79591
|
+
return ret;
|
|
79592
|
+
}
|
|
79593
|
+
}
|
|
79594
|
+
exports.LetTranspiler = LetTranspiler;
|
|
79595
|
+
//# sourceMappingURL=let.js.map
|
|
79596
|
+
|
|
79597
|
+
/***/ }),
|
|
79598
|
+
|
|
79551
79599
|
/***/ "./node_modules/@abaplint/transpiler/build/src/expressions/message_number.js":
|
|
79552
79600
|
/*!***********************************************************************************!*\
|
|
79553
79601
|
!*** ./node_modules/@abaplint/transpiler/build/src/expressions/message_number.js ***!
|
|
@@ -81585,17 +81633,10 @@ const chunk_1 = __webpack_require__(/*! ../chunk */ "./node_modules/@abaplint/tr
|
|
|
81585
81633
|
const transpile_types_1 = __webpack_require__(/*! ../transpile_types */ "./node_modules/@abaplint/transpiler/build/src/transpile_types.js");
|
|
81586
81634
|
class TypeNameOrInfer {
|
|
81587
81635
|
findType(node, traversal) {
|
|
81588
|
-
// let type: AbstractType | undefined;
|
|
81589
81636
|
const scope = traversal.findCurrentScopeByToken(node.getFirstToken());
|
|
81590
|
-
// if (node.concatTokens() === "#") {
|
|
81591
81637
|
const type = traversal.lookupInferred(node, scope);
|
|
81592
|
-
/*
|
|
81593
|
-
} else {
|
|
81594
|
-
type = traversal.lookupType(node.getFirstChild() as Nodes.ExpressionNode, scope);
|
|
81595
|
-
}
|
|
81596
|
-
*/
|
|
81597
81638
|
if (type === undefined) {
|
|
81598
|
-
throw new Error("TypeNameOrInfer, type not found: " + node.concatTokens());
|
|
81639
|
+
throw new Error("TypeNameOrInfer, type not found: " + node.concatTokens() + ", " + traversal.getCurrentObject().getName() + " line " + node.getFirstToken().getStart().getRow());
|
|
81599
81640
|
}
|
|
81600
81641
|
return type;
|
|
81601
81642
|
}
|
|
@@ -81628,6 +81669,8 @@ const value_body_line_1 = __webpack_require__(/*! ./value_body_line */ "./node_m
|
|
|
81628
81669
|
const field_assignment_1 = __webpack_require__(/*! ./field_assignment */ "./node_modules/@abaplint/transpiler/build/src/expressions/field_assignment.js");
|
|
81629
81670
|
const statements_1 = __webpack_require__(/*! ../statements */ "./node_modules/@abaplint/transpiler/build/src/statements/index.js");
|
|
81630
81671
|
const source_field_symbol_1 = __webpack_require__(/*! ./source_field_symbol */ "./node_modules/@abaplint/transpiler/build/src/expressions/source_field_symbol.js");
|
|
81672
|
+
const transpile_types_1 = __webpack_require__(/*! ../transpile_types */ "./node_modules/@abaplint/transpiler/build/src/transpile_types.js");
|
|
81673
|
+
const let_1 = __webpack_require__(/*! ./let */ "./node_modules/@abaplint/transpiler/build/src/expressions/let.js");
|
|
81631
81674
|
class ValueBodyTranspiler {
|
|
81632
81675
|
transpile(typ, body, traversal) {
|
|
81633
81676
|
if (!(typ.get() instanceof core_1.Expressions.TypeNameOrInfer)) {
|
|
@@ -81635,6 +81678,10 @@ class ValueBodyTranspiler {
|
|
|
81635
81678
|
}
|
|
81636
81679
|
let ret = new chunk_1.Chunk().appendString(new type_name_or_infer_1.TypeNameOrInfer().transpile(typ, traversal).getCode());
|
|
81637
81680
|
const context = new type_name_or_infer_1.TypeNameOrInfer().findType(typ, traversal);
|
|
81681
|
+
if (context instanceof core_1.BasicTypes.VoidType || context instanceof core_1.BasicTypes.UnknownType) {
|
|
81682
|
+
// compile option is runtime error, or it failed during the validation step
|
|
81683
|
+
return new chunk_1.Chunk(transpile_types_1.TranspileTypes.toType(context));
|
|
81684
|
+
}
|
|
81638
81685
|
let post = "";
|
|
81639
81686
|
let extraFields = "";
|
|
81640
81687
|
const hasLines = body.findDirectExpression(core_1.Expressions.ValueBodyLine) !== undefined;
|
|
@@ -81654,7 +81701,7 @@ class ValueBodyTranspiler {
|
|
|
81654
81701
|
}
|
|
81655
81702
|
else if (child.get() instanceof core_1.Expressions.ValueBodyLine && child instanceof core_1.Nodes.ExpressionNode) {
|
|
81656
81703
|
if (!(context instanceof core_1.BasicTypes.TableType)) {
|
|
81657
|
-
throw new Error("ValueBodyTranspiler, Expected BasicTypes");
|
|
81704
|
+
throw new Error("ValueBodyTranspiler, Expected BasicTypes, " + body.concatTokens());
|
|
81658
81705
|
}
|
|
81659
81706
|
const rowType = context.getRowType();
|
|
81660
81707
|
ret.appendString(new value_body_line_1.ValueBodyLineTranspiler().transpile(rowType, child, traversal, extraFields).getCode());
|
|
@@ -81664,15 +81711,16 @@ class ValueBodyTranspiler {
|
|
|
81664
81711
|
ret.appendString(".set(" + source.getCode() + ".clone())");
|
|
81665
81712
|
}
|
|
81666
81713
|
else if (child.get() instanceof core_1.Expressions.For && child instanceof core_1.Nodes.ExpressionNode) {
|
|
81667
|
-
if (
|
|
81668
|
-
throw new Error("ValueBody FOR todo,
|
|
81714
|
+
if (["THEN", "UNTIL", "WHILE", "FROM", "TO", "WHERE", "GROUPS"].some(token => child.findDirectTokenByText(token))) {
|
|
81715
|
+
throw new Error("ValueBody FOR todo, " + body.concatTokens());
|
|
81669
81716
|
}
|
|
81670
81717
|
const loop = child.findDirectExpression(core_1.Expressions.InlineLoopDefinition);
|
|
81671
81718
|
if (loop === undefined) {
|
|
81672
|
-
throw new Error("ValueBody FOR todo");
|
|
81719
|
+
throw new Error("ValueBody FOR todo, " + body.concatTokens());
|
|
81673
81720
|
}
|
|
81674
|
-
|
|
81675
|
-
|
|
81721
|
+
const base = loop.findDirectExpression(core_1.Expressions.ValueBase);
|
|
81722
|
+
if (base) {
|
|
81723
|
+
throw new Error("ValueBody FOR todo, base, " + body.concatTokens());
|
|
81676
81724
|
}
|
|
81677
81725
|
let targetDeclare = "";
|
|
81678
81726
|
let targetAction = "";
|
|
@@ -81685,10 +81733,14 @@ class ValueBodyTranspiler {
|
|
|
81685
81733
|
else {
|
|
81686
81734
|
const field = traversal.traverse(loop.findDirectExpression(core_1.Expressions.TargetField));
|
|
81687
81735
|
if (field === undefined) {
|
|
81688
|
-
throw new Error("ValueBody FOR empty field todo");
|
|
81736
|
+
throw new Error("ValueBody FOR empty field todo, " + body.concatTokens());
|
|
81689
81737
|
}
|
|
81690
81738
|
targetAction = `const ${field.getCode()} = unique1.clone();`;
|
|
81691
81739
|
}
|
|
81740
|
+
const llet = child.findDirectExpression(core_1.Expressions.Let);
|
|
81741
|
+
if (llet) {
|
|
81742
|
+
targetAction += new let_1.LetTranspiler().transpile(llet, traversal).getCode();
|
|
81743
|
+
}
|
|
81692
81744
|
const source = traversal.traverse(loop.findDirectExpression(core_1.Expressions.Source)).getCode();
|
|
81693
81745
|
const val = new type_name_or_infer_1.TypeNameOrInfer().transpile(typ, traversal).getCode();
|
|
81694
81746
|
ret = new chunk_1.Chunk().appendString(`await (async () => {
|
|
@@ -91705,6 +91757,7 @@ exports.config = {
|
|
|
91705
91757
|
"DTEL",
|
|
91706
91758
|
"ENHS",
|
|
91707
91759
|
"ENQU",
|
|
91760
|
+
"HTTP",
|
|
91708
91761
|
"FUGR",
|
|
91709
91762
|
"INTF",
|
|
91710
91763
|
"IWMO",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abaplint/transpiler-cli",
|
|
3
|
-
"version": "2.11.
|
|
3
|
+
"version": "2.11.42",
|
|
4
4
|
"description": "Transpiler - Command Line Interface",
|
|
5
5
|
"funding": "https://github.com/sponsors/larshp",
|
|
6
6
|
"bin": {
|
|
@@ -27,8 +27,8 @@
|
|
|
27
27
|
"author": "abaplint",
|
|
28
28
|
"license": "MIT",
|
|
29
29
|
"devDependencies": {
|
|
30
|
-
"@abaplint/core": "^2.113.
|
|
31
|
-
"@abaplint/transpiler": "^2.11.
|
|
30
|
+
"@abaplint/core": "^2.113.182",
|
|
31
|
+
"@abaplint/transpiler": "^2.11.42",
|
|
32
32
|
"@types/glob": "^8.1.0",
|
|
33
33
|
"@types/node": "^24.3.0",
|
|
34
34
|
"@types/progress": "^2.0.7",
|