@abaplint/transpiler-cli 2.11.63 → 2.11.65
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 +133 -15
- package/package.json +3 -3
package/build/bundle.js
CHANGED
|
@@ -6813,7 +6813,7 @@ class Source extends combi_1.Expression {
|
|
|
6813
6813
|
const old = (0, combi_1.seq)((0, combi_1.optPrio)(prefix), (0, combi_1.altPrio)(_1.Constant, _1.StringTemplate, text_element_1.TextElement, bool, method, (0, combi_1.seq)(_1.FieldChain, deref), paren), (0, combi_1.optPrio)(after));
|
|
6814
6814
|
const corr = (0, combi_1.ver)(version_1.Version.v740sp05, (0, combi_1.seq)("CORRESPONDING", _1.TypeNameOrInfer, (0, combi_1.tok)(tokens_1.ParenLeftW), _1.CorrespondingBody, rparen, (0, combi_1.optPrio)(after)), version_1.Version.OpenABAP);
|
|
6815
6815
|
const conv = (0, combi_1.ver)(version_1.Version.v740sp02, (0, combi_1.seq)("CONV", _1.TypeNameOrInfer, lparenNoSpace, _1.ConvBody, rparenNoSpace, (0, combi_1.optPrio)(after)), version_1.Version.OpenABAP);
|
|
6816
|
-
const swit = (0, combi_1.ver)(version_1.Version.v740sp02, (0, combi_1.seq)("SWITCH", _1.TypeNameOrInfer, (0, combi_1.tok)(tokens_1.ParenLeftW), _1.SwitchBody, rparenNoSpace, (0, combi_1.optPrio)(after)));
|
|
6816
|
+
const swit = (0, combi_1.ver)(version_1.Version.v740sp02, (0, combi_1.seq)("SWITCH", _1.TypeNameOrInfer, (0, combi_1.tok)(tokens_1.ParenLeftW), _1.SwitchBody, rparenNoSpace, (0, combi_1.optPrio)(after)), version_1.Version.OpenABAP);
|
|
6817
6817
|
const value = (0, combi_1.ver)(version_1.Version.v740sp02, (0, combi_1.seq)("VALUE", _1.TypeNameOrInfer, (0, combi_1.tok)(tokens_1.ParenLeftW), _1.ValueBody, rparenNoSpace, (0, combi_1.optPrio)(after)), version_1.Version.OpenABAP);
|
|
6818
6818
|
const cond = (0, combi_1.ver)(version_1.Version.v740sp02, (0, combi_1.seq)("COND", _1.TypeNameOrInfer, (0, combi_1.tok)(tokens_1.ParenLeftW), _1.CondBody, rparenNoSpace, (0, combi_1.optPrio)(after)), version_1.Version.OpenABAP);
|
|
6819
6819
|
const reff = (0, combi_1.ver)(version_1.Version.v740sp02, (0, combi_1.seq)("REF", _1.TypeNameOrInfer, (0, combi_1.tok)(tokens_1.ParenLeftW), Source, (0, combi_1.optPrio)("OPTIONAL"), rparen), version_1.Version.OpenABAP);
|
|
@@ -53851,7 +53851,7 @@ class Registry {
|
|
|
53851
53851
|
}
|
|
53852
53852
|
static abaplintVersion() {
|
|
53853
53853
|
// magic, see build script "version.sh"
|
|
53854
|
-
return "2.113.
|
|
53854
|
+
return "2.113.192";
|
|
53855
53855
|
}
|
|
53856
53856
|
getDDICReferences() {
|
|
53857
53857
|
return this.ddicReferences;
|
|
@@ -79368,8 +79368,10 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
79368
79368
|
exports.FieldAssignmentTranspiler = void 0;
|
|
79369
79369
|
const core_1 = __webpack_require__(/*! @abaplint/core */ "./node_modules/@abaplint/core/build/src/index.js");
|
|
79370
79370
|
const chunk_1 = __webpack_require__(/*! ../chunk */ "./node_modules/@abaplint/transpiler/build/src/chunk.js");
|
|
79371
|
+
const abaplint = __webpack_require__(/*! @abaplint/core */ "./node_modules/@abaplint/core/build/src/index.js");
|
|
79372
|
+
const source_1 = __webpack_require__(/*! ./source */ "./node_modules/@abaplint/transpiler/build/src/expressions/source.js");
|
|
79371
79373
|
class FieldAssignmentTranspiler {
|
|
79372
|
-
transpile(node, traversal) {
|
|
79374
|
+
transpile(node, traversal, context) {
|
|
79373
79375
|
const ret = new chunk_1.Chunk();
|
|
79374
79376
|
const field = node.findDirectExpression(core_1.Expressions.FieldSub);
|
|
79375
79377
|
if (field === undefined) {
|
|
@@ -79379,7 +79381,11 @@ class FieldAssignmentTranspiler {
|
|
|
79379
79381
|
if (source === undefined) {
|
|
79380
79382
|
throw new Error("FieldAssignmentTranspiler, Expected Source");
|
|
79381
79383
|
}
|
|
79382
|
-
|
|
79384
|
+
if (context instanceof abaplint.BasicTypes.StructureType) {
|
|
79385
|
+
context = context.getComponentByName(field.concatTokens());
|
|
79386
|
+
}
|
|
79387
|
+
const sourc = new source_1.SourceTranspiler().transpile(source, traversal, context).getCode();
|
|
79388
|
+
ret.appendString(`.setField("${field.concatTokens().toLowerCase()}", ${sourc})`);
|
|
79383
79389
|
return ret;
|
|
79384
79390
|
}
|
|
79385
79391
|
}
|
|
@@ -79728,6 +79734,7 @@ __exportStar(__webpack_require__(/*! ./attribute_chain */ "./node_modules/@abapl
|
|
|
79728
79734
|
__exportStar(__webpack_require__(/*! ./attribute_name */ "./node_modules/@abaplint/transpiler/build/src/expressions/attribute_name.js"), exports);
|
|
79729
79735
|
__exportStar(__webpack_require__(/*! ./call_transformation_options */ "./node_modules/@abaplint/transpiler/build/src/expressions/call_transformation_options.js"), exports);
|
|
79730
79736
|
__exportStar(__webpack_require__(/*! ./call_transformation_parameters */ "./node_modules/@abaplint/transpiler/build/src/expressions/call_transformation_parameters.js"), exports);
|
|
79737
|
+
__exportStar(__webpack_require__(/*! ./cast */ "./node_modules/@abaplint/transpiler/build/src/expressions/cast.js"), exports);
|
|
79731
79738
|
__exportStar(__webpack_require__(/*! ./compare_operator */ "./node_modules/@abaplint/transpiler/build/src/expressions/compare_operator.js"), exports);
|
|
79732
79739
|
__exportStar(__webpack_require__(/*! ./compare */ "./node_modules/@abaplint/transpiler/build/src/expressions/compare.js"), exports);
|
|
79733
79740
|
__exportStar(__webpack_require__(/*! ./component_chain_simple */ "./node_modules/@abaplint/transpiler/build/src/expressions/component_chain_simple.js"), exports);
|
|
@@ -79735,28 +79742,26 @@ __exportStar(__webpack_require__(/*! ./component_chain */ "./node_modules/@abapl
|
|
|
79735
79742
|
__exportStar(__webpack_require__(/*! ./component_compare */ "./node_modules/@abaplint/transpiler/build/src/expressions/component_compare.js"), exports);
|
|
79736
79743
|
__exportStar(__webpack_require__(/*! ./component_cond_sub */ "./node_modules/@abaplint/transpiler/build/src/expressions/component_cond_sub.js"), exports);
|
|
79737
79744
|
__exportStar(__webpack_require__(/*! ./component_cond */ "./node_modules/@abaplint/transpiler/build/src/expressions/component_cond.js"), exports);
|
|
79745
|
+
__exportStar(__webpack_require__(/*! ./cond_body */ "./node_modules/@abaplint/transpiler/build/src/expressions/cond_body.js"), exports);
|
|
79738
79746
|
__exportStar(__webpack_require__(/*! ./cond_sub */ "./node_modules/@abaplint/transpiler/build/src/expressions/cond_sub.js"), exports);
|
|
79739
79747
|
__exportStar(__webpack_require__(/*! ./cond */ "./node_modules/@abaplint/transpiler/build/src/expressions/cond.js"), exports);
|
|
79740
79748
|
__exportStar(__webpack_require__(/*! ./constant */ "./node_modules/@abaplint/transpiler/build/src/expressions/constant.js"), exports);
|
|
79741
|
-
__exportStar(__webpack_require__(/*! ./cast */ "./node_modules/@abaplint/transpiler/build/src/expressions/cast.js"), exports);
|
|
79742
79749
|
__exportStar(__webpack_require__(/*! ./database_table */ "./node_modules/@abaplint/transpiler/build/src/expressions/database_table.js"), exports);
|
|
79743
79750
|
__exportStar(__webpack_require__(/*! ./field_chain */ "./node_modules/@abaplint/transpiler/build/src/expressions/field_chain.js"), exports);
|
|
79744
79751
|
__exportStar(__webpack_require__(/*! ./field_length */ "./node_modules/@abaplint/transpiler/build/src/expressions/field_length.js"), exports);
|
|
79745
79752
|
__exportStar(__webpack_require__(/*! ./field_offset */ "./node_modules/@abaplint/transpiler/build/src/expressions/field_offset.js"), exports);
|
|
79746
79753
|
__exportStar(__webpack_require__(/*! ./field_symbol */ "./node_modules/@abaplint/transpiler/build/src/expressions/field_symbol.js"), exports);
|
|
79747
79754
|
__exportStar(__webpack_require__(/*! ./function_exporting */ "./node_modules/@abaplint/transpiler/build/src/expressions/function_exporting.js"), exports);
|
|
79748
|
-
__exportStar(__webpack_require__(/*! ./table_expression */ "./node_modules/@abaplint/transpiler/build/src/expressions/table_expression.js"), exports);
|
|
79749
79755
|
__exportStar(__webpack_require__(/*! ./function_parameters */ "./node_modules/@abaplint/transpiler/build/src/expressions/function_parameters.js"), exports);
|
|
79750
79756
|
__exportStar(__webpack_require__(/*! ./let */ "./node_modules/@abaplint/transpiler/build/src/expressions/let.js"), exports);
|
|
79751
79757
|
__exportStar(__webpack_require__(/*! ./message_number */ "./node_modules/@abaplint/transpiler/build/src/expressions/message_number.js"), exports);
|
|
79752
79758
|
__exportStar(__webpack_require__(/*! ./method_call_body */ "./node_modules/@abaplint/transpiler/build/src/expressions/method_call_body.js"), exports);
|
|
79753
79759
|
__exportStar(__webpack_require__(/*! ./method_call_chain */ "./node_modules/@abaplint/transpiler/build/src/expressions/method_call_chain.js"), exports);
|
|
79754
|
-
__exportStar(__webpack_require__(/*! ./cond_body */ "./node_modules/@abaplint/transpiler/build/src/expressions/cond_body.js"), exports);
|
|
79755
79760
|
__exportStar(__webpack_require__(/*! ./method_call_param */ "./node_modules/@abaplint/transpiler/build/src/expressions/method_call_param.js"), exports);
|
|
79756
|
-
__exportStar(__webpack_require__(/*! ./new_object */ "./node_modules/@abaplint/transpiler/build/src/expressions/new_object.js"), exports);
|
|
79757
79761
|
__exportStar(__webpack_require__(/*! ./method_call */ "./node_modules/@abaplint/transpiler/build/src/expressions/method_call.js"), exports);
|
|
79758
79762
|
__exportStar(__webpack_require__(/*! ./method_parameters */ "./node_modules/@abaplint/transpiler/build/src/expressions/method_parameters.js"), exports);
|
|
79759
79763
|
__exportStar(__webpack_require__(/*! ./method_source */ "./node_modules/@abaplint/transpiler/build/src/expressions/method_source.js"), exports);
|
|
79764
|
+
__exportStar(__webpack_require__(/*! ./new_object */ "./node_modules/@abaplint/transpiler/build/src/expressions/new_object.js"), exports);
|
|
79760
79765
|
__exportStar(__webpack_require__(/*! ./parameter_list_s */ "./node_modules/@abaplint/transpiler/build/src/expressions/parameter_list_s.js"), exports);
|
|
79761
79766
|
__exportStar(__webpack_require__(/*! ./parameter_list_t */ "./node_modules/@abaplint/transpiler/build/src/expressions/parameter_list_t.js"), exports);
|
|
79762
79767
|
__exportStar(__webpack_require__(/*! ./parameter_name */ "./node_modules/@abaplint/transpiler/build/src/expressions/parameter_name.js"), exports);
|
|
@@ -79788,6 +79793,8 @@ __exportStar(__webpack_require__(/*! ./sql_source */ "./node_modules/@abaplint/t
|
|
|
79788
79793
|
__exportStar(__webpack_require__(/*! ./sql_target */ "./node_modules/@abaplint/transpiler/build/src/expressions/sql_target.js"), exports);
|
|
79789
79794
|
__exportStar(__webpack_require__(/*! ./string_template_source */ "./node_modules/@abaplint/transpiler/build/src/expressions/string_template_source.js"), exports);
|
|
79790
79795
|
__exportStar(__webpack_require__(/*! ./string_template */ "./node_modules/@abaplint/transpiler/build/src/expressions/string_template.js"), exports);
|
|
79796
|
+
__exportStar(__webpack_require__(/*! ./switch_body */ "./node_modules/@abaplint/transpiler/build/src/expressions/switch_body.js"), exports);
|
|
79797
|
+
__exportStar(__webpack_require__(/*! ./table_expression */ "./node_modules/@abaplint/transpiler/build/src/expressions/table_expression.js"), exports);
|
|
79791
79798
|
__exportStar(__webpack_require__(/*! ./target_field */ "./node_modules/@abaplint/transpiler/build/src/expressions/target_field.js"), exports);
|
|
79792
79799
|
__exportStar(__webpack_require__(/*! ./target */ "./node_modules/@abaplint/transpiler/build/src/expressions/target.js"), exports);
|
|
79793
79800
|
__exportStar(__webpack_require__(/*! ./type_name_or_infer */ "./node_modules/@abaplint/transpiler/build/src/expressions/type_name_or_infer.js"), exports);
|
|
@@ -80715,6 +80722,9 @@ class SourceTranspiler {
|
|
|
80715
80722
|
else if (c.get() instanceof core_1.Expressions.CondBody) {
|
|
80716
80723
|
continue;
|
|
80717
80724
|
}
|
|
80725
|
+
else if (c.get() instanceof core_1.Expressions.SwitchBody) {
|
|
80726
|
+
continue;
|
|
80727
|
+
}
|
|
80718
80728
|
else {
|
|
80719
80729
|
ret.appendString("SourceUnknown$" + c.get().constructor.name);
|
|
80720
80730
|
}
|
|
@@ -80770,6 +80780,17 @@ class SourceTranspiler {
|
|
|
80770
80780
|
}
|
|
80771
80781
|
ret.appendChunk(new _1.CondBodyTranspiler().transpile(typ, condBody, traversal));
|
|
80772
80782
|
}
|
|
80783
|
+
else if (c instanceof core_1.Nodes.TokenNode && c.getFirstToken().getStr().toUpperCase() === "SWITCH") {
|
|
80784
|
+
const typ = node.findDirectExpression(core_1.Expressions.TypeNameOrInfer);
|
|
80785
|
+
if (typ === undefined) {
|
|
80786
|
+
throw new Error("TypeNameOrInfer not found in SwitchBody");
|
|
80787
|
+
}
|
|
80788
|
+
const switchBody = node.findDirectExpression(core_1.Expressions.SwitchBody);
|
|
80789
|
+
if (switchBody === undefined) {
|
|
80790
|
+
throw new Error("SwitchBody not found");
|
|
80791
|
+
}
|
|
80792
|
+
ret.appendChunk(new _1.SwitchBodyTranspiler().transpile(typ, switchBody, traversal));
|
|
80793
|
+
}
|
|
80773
80794
|
else if (c instanceof core_1.Nodes.TokenNode && c.getFirstToken().getStr().toUpperCase() === "REF") {
|
|
80774
80795
|
const infer = node.findDirectExpression(core_1.Expressions.TypeNameOrInfer);
|
|
80775
80796
|
if (infer?.concatTokens() !== "#") {
|
|
@@ -81628,7 +81649,7 @@ class StringTemplateSourceTranspiler {
|
|
|
81628
81649
|
let post = ")";
|
|
81629
81650
|
const formatting = node.findDirectExpression(core_1.Expressions.StringTemplateFormatting);
|
|
81630
81651
|
if (formatting) {
|
|
81631
|
-
const options = this.build(formatting, traversal, context);
|
|
81652
|
+
const options = this.build(formatting, traversal, context, node);
|
|
81632
81653
|
if (options) {
|
|
81633
81654
|
post = "," + options + ")";
|
|
81634
81655
|
}
|
|
@@ -81640,7 +81661,7 @@ class StringTemplateSourceTranspiler {
|
|
|
81640
81661
|
ret += pre + new _1.SourceTranspiler().transpile(c, traversal).getCode() + post;
|
|
81641
81662
|
return new chunk_1.Chunk(ret);
|
|
81642
81663
|
}
|
|
81643
|
-
build(node, traversal, context) {
|
|
81664
|
+
build(node, traversal, context, _top) {
|
|
81644
81665
|
let option = "";
|
|
81645
81666
|
let count = 0;
|
|
81646
81667
|
for (const c of node.getChildren()) {
|
|
@@ -81661,10 +81682,9 @@ class StringTemplateSourceTranspiler {
|
|
|
81661
81682
|
}
|
|
81662
81683
|
}
|
|
81663
81684
|
if (option.startsWith(`"alpha":"in"`)) {
|
|
81664
|
-
if (context
|
|
81665
|
-
|
|
81685
|
+
if (context !== undefined) {
|
|
81686
|
+
option += `, "alphaInContext": ` + transpile_types_1.TranspileTypes.toType(context);
|
|
81666
81687
|
}
|
|
81667
|
-
option += `, "alphaInContext": ` + transpile_types_1.TranspileTypes.toType(context);
|
|
81668
81688
|
}
|
|
81669
81689
|
if (option !== "") {
|
|
81670
81690
|
return "{" + option + "}";
|
|
@@ -81677,6 +81697,103 @@ exports.StringTemplateSourceTranspiler = StringTemplateSourceTranspiler;
|
|
|
81677
81697
|
|
|
81678
81698
|
/***/ }),
|
|
81679
81699
|
|
|
81700
|
+
/***/ "./node_modules/@abaplint/transpiler/build/src/expressions/switch_body.js":
|
|
81701
|
+
/*!********************************************************************************!*\
|
|
81702
|
+
!*** ./node_modules/@abaplint/transpiler/build/src/expressions/switch_body.js ***!
|
|
81703
|
+
\********************************************************************************/
|
|
81704
|
+
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
81705
|
+
|
|
81706
|
+
"use strict";
|
|
81707
|
+
|
|
81708
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
81709
|
+
exports.SwitchBodyTranspiler = void 0;
|
|
81710
|
+
const core_1 = __webpack_require__(/*! @abaplint/core */ "./node_modules/@abaplint/core/build/src/index.js");
|
|
81711
|
+
const chunk_1 = __webpack_require__(/*! ../chunk */ "./node_modules/@abaplint/transpiler/build/src/chunk.js");
|
|
81712
|
+
const type_name_or_infer_1 = __webpack_require__(/*! ./type_name_or_infer */ "./node_modules/@abaplint/transpiler/build/src/expressions/type_name_or_infer.js");
|
|
81713
|
+
const transpile_types_1 = __webpack_require__(/*! ../transpile_types */ "./node_modules/@abaplint/transpiler/build/src/transpile_types.js");
|
|
81714
|
+
const source_1 = __webpack_require__(/*! ./source */ "./node_modules/@abaplint/transpiler/build/src/expressions/source.js");
|
|
81715
|
+
class SwitchBodyTranspiler {
|
|
81716
|
+
transpile(typ, body, traversal) {
|
|
81717
|
+
if (!(typ.get() instanceof core_1.Expressions.TypeNameOrInfer)) {
|
|
81718
|
+
throw new Error("SwitchBodyTranspiler, Expected TypeNameOrInfer");
|
|
81719
|
+
}
|
|
81720
|
+
else if (body.findDirectExpression(core_1.Expressions.Let)) {
|
|
81721
|
+
throw new Error("SwitchBodyTranspiler, Let not supported, todo");
|
|
81722
|
+
}
|
|
81723
|
+
const source = traversal.traverse(body.findDirectExpression(core_1.Expressions.Source));
|
|
81724
|
+
const whenThenOr = [];
|
|
81725
|
+
const elseExpression = body.findExpressionAfterToken("ELSE");
|
|
81726
|
+
{
|
|
81727
|
+
let currentWhenThen = { whenOr: [], then: undefined };
|
|
81728
|
+
let mode = "";
|
|
81729
|
+
for (const c of body.getChildren()) {
|
|
81730
|
+
if (c instanceof core_1.Nodes.TokenNode) {
|
|
81731
|
+
if (c.concatTokens() === "WHEN") {
|
|
81732
|
+
if (currentWhenThen.whenOr.length > 0) {
|
|
81733
|
+
whenThenOr.push(currentWhenThen);
|
|
81734
|
+
}
|
|
81735
|
+
currentWhenThen = { whenOr: [], then: undefined };
|
|
81736
|
+
mode = "WHEN";
|
|
81737
|
+
}
|
|
81738
|
+
else if (c.concatTokens() === "THEN") {
|
|
81739
|
+
mode = "THEN";
|
|
81740
|
+
}
|
|
81741
|
+
}
|
|
81742
|
+
else if (mode === "WHEN" && c instanceof core_1.Nodes.ExpressionNode) {
|
|
81743
|
+
currentWhenThen.whenOr.push(c);
|
|
81744
|
+
}
|
|
81745
|
+
else if (mode === "THEN" && c instanceof core_1.Nodes.ExpressionNode) {
|
|
81746
|
+
currentWhenThen.then = c;
|
|
81747
|
+
}
|
|
81748
|
+
}
|
|
81749
|
+
if (currentWhenThen.whenOr.length > 0) {
|
|
81750
|
+
whenThenOr.push(currentWhenThen);
|
|
81751
|
+
}
|
|
81752
|
+
}
|
|
81753
|
+
const type = new type_name_or_infer_1.TypeNameOrInfer().findType(typ, traversal);
|
|
81754
|
+
const target = transpile_types_1.TranspileTypes.toType(type);
|
|
81755
|
+
const ret = new chunk_1.Chunk();
|
|
81756
|
+
ret.appendString("(" + target + ".set(");
|
|
81757
|
+
ret.appendString("await (async () => {\n");
|
|
81758
|
+
for (const wto of whenThenOr) {
|
|
81759
|
+
let thenValue = "";
|
|
81760
|
+
if (wto.then?.get() instanceof core_1.Expressions.Source) {
|
|
81761
|
+
thenValue = new source_1.SourceTranspiler().transpile(wto.then, traversal).getCode();
|
|
81762
|
+
}
|
|
81763
|
+
else {
|
|
81764
|
+
throw new Error("SwitchBodyTranspiler, Expected Source1, todo, " + wto.then?.get().constructor.name);
|
|
81765
|
+
}
|
|
81766
|
+
// todo, async await?
|
|
81767
|
+
for (const thenOr of wto.whenOr) {
|
|
81768
|
+
let condition = "";
|
|
81769
|
+
if (thenOr.get() instanceof core_1.Expressions.Source) {
|
|
81770
|
+
condition = new source_1.SourceTranspiler().transpile(thenOr, traversal).getCode();
|
|
81771
|
+
}
|
|
81772
|
+
else {
|
|
81773
|
+
throw new Error("SwitchBodyTranspiler, Expected Source2, todo, " + thenOr.get().constructor.name);
|
|
81774
|
+
}
|
|
81775
|
+
ret.appendString(`if (abap.compare.eq(${source.getCode()}, ${condition})) { return ${thenValue}; }\n`);
|
|
81776
|
+
}
|
|
81777
|
+
}
|
|
81778
|
+
if (elseExpression) {
|
|
81779
|
+
if (!(elseExpression.get() instanceof core_1.Expressions.Source)) {
|
|
81780
|
+
throw new Error("SwitchBodyTranspiler, Expected Source3, todo, " + elseExpression.get().constructor.name);
|
|
81781
|
+
}
|
|
81782
|
+
const value = new source_1.SourceTranspiler().transpile(elseExpression, traversal).getCode();
|
|
81783
|
+
ret.appendString(`return ${value};\n`);
|
|
81784
|
+
}
|
|
81785
|
+
else {
|
|
81786
|
+
ret.appendString(`return ${target};\n`);
|
|
81787
|
+
}
|
|
81788
|
+
ret.appendString("})()))");
|
|
81789
|
+
return ret;
|
|
81790
|
+
}
|
|
81791
|
+
}
|
|
81792
|
+
exports.SwitchBodyTranspiler = SwitchBodyTranspiler;
|
|
81793
|
+
//# sourceMappingURL=switch_body.js.map
|
|
81794
|
+
|
|
81795
|
+
/***/ }),
|
|
81796
|
+
|
|
81680
81797
|
/***/ "./node_modules/@abaplint/transpiler/build/src/expressions/table_expression.js":
|
|
81681
81798
|
/*!*************************************************************************************!*\
|
|
81682
81799
|
!*** ./node_modules/@abaplint/transpiler/build/src/expressions/table_expression.js ***!
|
|
@@ -81956,7 +82073,7 @@ class ValueBodyTranspiler {
|
|
|
81956
82073
|
const hasLines = body.findDirectExpression(core_1.Expressions.ValueBodyLine) !== undefined;
|
|
81957
82074
|
for (const child of body.getChildren()) {
|
|
81958
82075
|
if (child.get() instanceof core_1.Expressions.FieldAssignment && child instanceof core_1.Nodes.ExpressionNode) {
|
|
81959
|
-
const transpiled = new field_assignment_1.FieldAssignmentTranspiler().transpile(child, traversal).getCode();
|
|
82076
|
+
const transpiled = new field_assignment_1.FieldAssignmentTranspiler().transpile(child, traversal, context).getCode();
|
|
81960
82077
|
if (hasLines === false) {
|
|
81961
82078
|
ret.appendString(transpiled);
|
|
81962
82079
|
}
|
|
@@ -87247,7 +87364,8 @@ class MoveTranspiler {
|
|
|
87247
87364
|
if (targetExpressions.length === 1
|
|
87248
87365
|
&& sourceExpression?.getChildren().length === 1
|
|
87249
87366
|
&& sourceExpression.findDirectExpression(abaplint.Expressions.StringTemplate)
|
|
87250
|
-
&& sourceExpression.concatTokens().toUpperCase().endsWith(" ALPHA = IN }|")
|
|
87367
|
+
&& sourceExpression.concatTokens().toUpperCase().endsWith(" ALPHA = IN }|")
|
|
87368
|
+
&& sourceExpression.concatTokens().toUpperCase().startsWith("|{")) {
|
|
87251
87369
|
const target = targets[0].getCode();
|
|
87252
87370
|
const tSource = traversal.traverse(sourceExpression.findFirstExpression(abaplint.Expressions.StringTemplateSource)?.findDirectExpression(abaplint.Expressions.Source));
|
|
87253
87371
|
ret.appendString(target + `.set(abap.alphaIn(${tSource.getCode()}, ${target}, ${target}));`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abaplint/transpiler-cli",
|
|
3
|
-
"version": "2.11.
|
|
3
|
+
"version": "2.11.65",
|
|
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.192",
|
|
31
|
+
"@abaplint/transpiler": "^2.11.65",
|
|
32
32
|
"@types/glob": "^8.1.0",
|
|
33
33
|
"@types/node": "^24.3.0",
|
|
34
34
|
"@types/progress": "^2.0.7",
|