@abaplint/transpiler-cli 2.11.69 → 2.11.70
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 +61 -11
- package/package.json +4 -4
package/build/bundle.js
CHANGED
|
@@ -3751,12 +3751,10 @@ exports.CorrespondingBody = void 0;
|
|
|
3751
3751
|
const combi_1 = __webpack_require__(/*! ../combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
|
|
3752
3752
|
const _1 = __webpack_require__(/*! . */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js");
|
|
3753
3753
|
const version_1 = __webpack_require__(/*! ../../../version */ "./node_modules/@abaplint/core/build/src/version.js");
|
|
3754
|
-
const component_chain_1 = __webpack_require__(/*! ./component_chain */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/component_chain.js");
|
|
3755
3754
|
class CorrespondingBody extends combi_1.Expression {
|
|
3756
3755
|
getRunnable() {
|
|
3757
|
-
const mapping = (0, combi_1.seq)("MAPPING", (0, combi_1.plus)((0, combi_1.seq)(_1.ComponentName, "=", component_chain_1.ComponentChain)));
|
|
3758
3756
|
const discarding = (0, combi_1.ver)(version_1.Version.v751, "DISCARDING DUPLICATES");
|
|
3759
|
-
return (0, combi_1.seq)((0, combi_1.optPrio)("DEEP"), (0, combi_1.optPrio)(_1.CorrespondingBodyBase), _1.Source, (0, combi_1.optPrio)(discarding), (0, combi_1.optPrio)(
|
|
3757
|
+
return (0, combi_1.seq)((0, combi_1.optPrio)("DEEP"), (0, combi_1.optPrio)(_1.CorrespondingBodyBase), _1.Source, (0, combi_1.optPrio)(discarding), (0, combi_1.optPrio)(_1.CorrespondingBodyMapping), (0, combi_1.optPrio)("CHANGING CONTROL"), (0, combi_1.optPrio)((0, combi_1.seq)("MAPPING FROM ENTITY", (0, combi_1.optPrio)("USING CONTROL"))), // todo, version something?
|
|
3760
3758
|
(0, combi_1.optPrio)((0, combi_1.seq)("EXCEPT", (0, combi_1.alt)((0, combi_1.plus)(_1.Field), "*"))));
|
|
3761
3759
|
}
|
|
3762
3760
|
}
|
|
@@ -3788,6 +3786,29 @@ exports.CorrespondingBodyBase = CorrespondingBodyBase;
|
|
|
3788
3786
|
|
|
3789
3787
|
/***/ }),
|
|
3790
3788
|
|
|
3789
|
+
/***/ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/corresponding_body_mapping.js":
|
|
3790
|
+
/*!***********************************************************************************************************!*\
|
|
3791
|
+
!*** ./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/corresponding_body_mapping.js ***!
|
|
3792
|
+
\***********************************************************************************************************/
|
|
3793
|
+
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
3794
|
+
|
|
3795
|
+
"use strict";
|
|
3796
|
+
|
|
3797
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
3798
|
+
exports.CorrespondingBodyMapping = void 0;
|
|
3799
|
+
const combi_1 = __webpack_require__(/*! ../combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
|
|
3800
|
+
const _1 = __webpack_require__(/*! . */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js");
|
|
3801
|
+
class CorrespondingBodyMapping extends combi_1.Expression {
|
|
3802
|
+
getRunnable() {
|
|
3803
|
+
const mapping = (0, combi_1.seq)("MAPPING", (0, combi_1.plus)((0, combi_1.seq)(_1.ComponentName, "=", _1.ComponentChain)));
|
|
3804
|
+
return mapping;
|
|
3805
|
+
}
|
|
3806
|
+
}
|
|
3807
|
+
exports.CorrespondingBodyMapping = CorrespondingBodyMapping;
|
|
3808
|
+
//# sourceMappingURL=corresponding_body_mapping.js.map
|
|
3809
|
+
|
|
3810
|
+
/***/ }),
|
|
3811
|
+
|
|
3791
3812
|
/***/ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/data_definition.js":
|
|
3792
3813
|
/*!************************************************************************************************!*\
|
|
3793
3814
|
!*** ./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/data_definition.js ***!
|
|
@@ -4769,9 +4790,7 @@ __exportStar(__webpack_require__(/*! ./compare */ "./node_modules/@abaplint/core
|
|
|
4769
4790
|
__exportStar(__webpack_require__(/*! ./component_chain_simple */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/component_chain_simple.js"), exports);
|
|
4770
4791
|
__exportStar(__webpack_require__(/*! ./component_chain */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/component_chain.js"), exports);
|
|
4771
4792
|
__exportStar(__webpack_require__(/*! ./component_compare_simple */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/component_compare_simple.js"), exports);
|
|
4772
|
-
__exportStar(__webpack_require__(/*! ./value_base */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/value_base.js"), exports);
|
|
4773
4793
|
__exportStar(__webpack_require__(/*! ./component_compare_single */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/component_compare_single.js"), exports);
|
|
4774
|
-
__exportStar(__webpack_require__(/*! ./corresponding_body_base */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/corresponding_body_base.js"), exports);
|
|
4775
4794
|
__exportStar(__webpack_require__(/*! ./component_compare */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/component_compare.js"), exports);
|
|
4776
4795
|
__exportStar(__webpack_require__(/*! ./component_cond_sub */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/component_cond_sub.js"), exports);
|
|
4777
4796
|
__exportStar(__webpack_require__(/*! ./component_cond */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/component_cond.js"), exports);
|
|
@@ -4784,6 +4803,8 @@ __exportStar(__webpack_require__(/*! ./constant_field_length */ "./node_modules/
|
|
|
4784
4803
|
__exportStar(__webpack_require__(/*! ./constant_string */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/constant_string.js"), exports);
|
|
4785
4804
|
__exportStar(__webpack_require__(/*! ./constant */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/constant.js"), exports);
|
|
4786
4805
|
__exportStar(__webpack_require__(/*! ./conv_body */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/conv_body.js"), exports);
|
|
4806
|
+
__exportStar(__webpack_require__(/*! ./corresponding_body_base */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/corresponding_body_base.js"), exports);
|
|
4807
|
+
__exportStar(__webpack_require__(/*! ./corresponding_body_mapping */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/corresponding_body_mapping.js"), exports);
|
|
4787
4808
|
__exportStar(__webpack_require__(/*! ./corresponding_body */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/corresponding_body.js"), exports);
|
|
4788
4809
|
__exportStar(__webpack_require__(/*! ./data_definition */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/data_definition.js"), exports);
|
|
4789
4810
|
__exportStar(__webpack_require__(/*! ./database_connection */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/database_connection.js"), exports);
|
|
@@ -4964,6 +4985,7 @@ __exportStar(__webpack_require__(/*! ./type_structure */ "./node_modules/@abapli
|
|
|
4964
4985
|
__exportStar(__webpack_require__(/*! ./type_table_key */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/type_table_key.js"), exports);
|
|
4965
4986
|
__exportStar(__webpack_require__(/*! ./type_table */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/type_table.js"), exports);
|
|
4966
4987
|
__exportStar(__webpack_require__(/*! ./type */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/type.js"), exports);
|
|
4988
|
+
__exportStar(__webpack_require__(/*! ./value_base */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/value_base.js"), exports);
|
|
4967
4989
|
__exportStar(__webpack_require__(/*! ./value_body_line */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/value_body_line.js"), exports);
|
|
4968
4990
|
__exportStar(__webpack_require__(/*! ./value_body_lines */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/value_body_lines.js"), exports);
|
|
4969
4991
|
__exportStar(__webpack_require__(/*! ./value_body */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/value_body.js"), exports);
|
|
@@ -53851,7 +53873,7 @@ class Registry {
|
|
|
53851
53873
|
}
|
|
53852
53874
|
static abaplintVersion() {
|
|
53853
53875
|
// magic, see build script "version.sh"
|
|
53854
|
-
return "2.113.
|
|
53876
|
+
return "2.113.195";
|
|
53855
53877
|
}
|
|
53856
53878
|
getDDICReferences() {
|
|
53857
53879
|
return this.ddicReferences;
|
|
@@ -78541,7 +78563,7 @@ const chunk_1 = __webpack_require__(/*! ../chunk */ "./node_modules/@abaplint/tr
|
|
|
78541
78563
|
class CompareTranspiler {
|
|
78542
78564
|
transpile(node, traversal) {
|
|
78543
78565
|
// todo, this is not correct
|
|
78544
|
-
|
|
78566
|
+
let concat = node.concatTokens().toUpperCase();
|
|
78545
78567
|
let pre = concat.startsWith("NOT ") ? "!" : "";
|
|
78546
78568
|
const sources = node.findDirectExpressionsMulti([core_1.Expressions.Source, core_1.Expressions.SourceFieldSymbolChain, core_1.Expressions.SourceFieldSymbol]);
|
|
78547
78569
|
if (sources.length === 1) {
|
|
@@ -78571,7 +78593,10 @@ class CompareTranspiler {
|
|
|
78571
78593
|
return new chunk_1.Chunk().appendString("abap.compare.assigned(").appendChunk(s0).appendString(")");
|
|
78572
78594
|
}
|
|
78573
78595
|
if (concat.endsWith(" IS SUPPLIED")) {
|
|
78574
|
-
|
|
78596
|
+
if (concat.startsWith("NOT ")) {
|
|
78597
|
+
concat = concat.replace("NOT ", "");
|
|
78598
|
+
}
|
|
78599
|
+
return new chunk_1.Chunk().appendString(pre + "(INPUT && INPUT." + concat.replace(" IS SUPPLIED", "" + ")").toLowerCase());
|
|
78575
78600
|
}
|
|
78576
78601
|
else if (concat.endsWith(" IS NOT SUPPLIED")) {
|
|
78577
78602
|
return new chunk_1.Chunk().appendString(pre + "INPUT && INPUT." + concat.replace(" IS NOT SUPPLIED", "").toLowerCase() + " === undefined");
|
|
@@ -79277,6 +79302,8 @@ const core_1 = __webpack_require__(/*! @abaplint/core */ "./node_modules/@abapli
|
|
|
79277
79302
|
const chunk_1 = __webpack_require__(/*! ../chunk */ "./node_modules/@abaplint/transpiler/build/src/chunk.js");
|
|
79278
79303
|
const type_name_or_infer_1 = __webpack_require__(/*! ./type_name_or_infer */ "./node_modules/@abaplint/transpiler/build/src/expressions/type_name_or_infer.js");
|
|
79279
79304
|
const transpile_types_1 = __webpack_require__(/*! ../transpile_types */ "./node_modules/@abaplint/transpiler/build/src/transpile_types.js");
|
|
79305
|
+
const component_chain_1 = __webpack_require__(/*! ./component_chain */ "./node_modules/@abaplint/transpiler/build/src/expressions/component_chain.js");
|
|
79306
|
+
const unique_identifier_1 = __webpack_require__(/*! ../unique_identifier */ "./node_modules/@abaplint/transpiler/build/src/unique_identifier.js");
|
|
79280
79307
|
class CorrespondingBodyTranspiler {
|
|
79281
79308
|
transpile(typ, body, traversal) {
|
|
79282
79309
|
if (!(typ.get() instanceof core_1.Expressions.TypeNameOrInfer)) {
|
|
@@ -79285,6 +79312,8 @@ class CorrespondingBodyTranspiler {
|
|
|
79285
79312
|
const type = new type_name_or_infer_1.TypeNameOrInfer().findType(typ, traversal);
|
|
79286
79313
|
let target = transpile_types_1.TranspileTypes.toType(type);
|
|
79287
79314
|
let source;
|
|
79315
|
+
const mapping = [];
|
|
79316
|
+
const mappingRow = { componentName: undefined, componentChain: undefined };
|
|
79288
79317
|
for (const child of body.getChildren()) {
|
|
79289
79318
|
const c = child.get();
|
|
79290
79319
|
if (c instanceof core_1.Expressions.Source && child instanceof core_1.Nodes.ExpressionNode) {
|
|
@@ -79294,12 +79323,33 @@ class CorrespondingBodyTranspiler {
|
|
|
79294
79323
|
source = traversal.traverse(child?.findDirectExpression(core_1.Expressions.Source));
|
|
79295
79324
|
target = `abap.statements.moveCorresponding(${source.getCode()}, ${target})`;
|
|
79296
79325
|
}
|
|
79326
|
+
else if (c instanceof core_1.Expressions.CorrespondingBodyMapping && child instanceof core_1.Nodes.ExpressionNode) {
|
|
79327
|
+
for (const cc of child.getChildren()) {
|
|
79328
|
+
if (cc.get() instanceof core_1.Expressions.ComponentName) {
|
|
79329
|
+
mappingRow.componentName = cc;
|
|
79330
|
+
}
|
|
79331
|
+
else if (cc.get() instanceof core_1.Expressions.ComponentChain) {
|
|
79332
|
+
mappingRow.componentChain = cc;
|
|
79333
|
+
mapping.push(mappingRow);
|
|
79334
|
+
}
|
|
79335
|
+
}
|
|
79336
|
+
}
|
|
79297
79337
|
else {
|
|
79298
|
-
throw new Error("CorrespondingBodyTranspiler, todo, " + c.constructor.name);
|
|
79338
|
+
throw new Error("CorrespondingBodyTranspiler, todo, " + c.constructor.name + ", " + body.concatTokens());
|
|
79299
79339
|
}
|
|
79300
79340
|
}
|
|
79301
79341
|
const ret = new chunk_1.Chunk();
|
|
79302
|
-
|
|
79342
|
+
const id = unique_identifier_1.UniqueIdentifier.get();
|
|
79343
|
+
ret.appendString("(await (async () => {\n");
|
|
79344
|
+
ret.appendString(`const ${id} = ${target};\n`);
|
|
79345
|
+
ret.appendString(`abap.statements.moveCorresponding(${source.getCode()}, ${id});\n`);
|
|
79346
|
+
for (const map of mapping) {
|
|
79347
|
+
const componentName = map.componentName.concatTokens().toLowerCase();
|
|
79348
|
+
const chain = new component_chain_1.ComponentChainTranspiler().transpile(map.componentChain, traversal).getCode();
|
|
79349
|
+
ret.appendString(`${id}.get().${componentName}.set(${source.getCode()}.get().${chain});\n`);
|
|
79350
|
+
}
|
|
79351
|
+
ret.appendString("return " + id + ";\n");
|
|
79352
|
+
ret.appendString("})())");
|
|
79303
79353
|
return ret;
|
|
79304
79354
|
}
|
|
79305
79355
|
}
|
|
@@ -79646,7 +79696,7 @@ class FilterBodyTranspiler {
|
|
|
79646
79696
|
throw new Error("FilterBodyTranspiler, Expected TypeNameOrInfer");
|
|
79647
79697
|
}
|
|
79648
79698
|
else if (body.findDirectTokenByText("EXCEPT")) {
|
|
79649
|
-
return new chunk_1.Chunk(`throw new Error("FilterBodyTranspiler EXCEPT in, not supported, transpiler")
|
|
79699
|
+
return new chunk_1.Chunk(`(() => { throw new Error("FilterBodyTranspiler EXCEPT in, not supported, transpiler"); })()`);
|
|
79650
79700
|
}
|
|
79651
79701
|
const source = traversal.traverse(body.findDirectExpression(core_1.Expressions.Source)).getCode();
|
|
79652
79702
|
const type = new type_name_or_infer_1.TypeNameOrInfer().findType(typ, traversal);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abaplint/transpiler-cli",
|
|
3
|
-
"version": "2.11.
|
|
3
|
+
"version": "2.11.70",
|
|
4
4
|
"description": "Transpiler - Command Line Interface",
|
|
5
5
|
"funding": "https://github.com/sponsors/larshp",
|
|
6
6
|
"bin": {
|
|
@@ -27,10 +27,10 @@
|
|
|
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.195",
|
|
31
|
+
"@abaplint/transpiler": "^2.11.70",
|
|
32
32
|
"@types/glob": "^8.1.0",
|
|
33
|
-
"@types/node": "^24.3.
|
|
33
|
+
"@types/node": "^24.3.1",
|
|
34
34
|
"@types/progress": "^2.0.7",
|
|
35
35
|
"glob": "=7.2.0",
|
|
36
36
|
"progress": "^2.0.3",
|