@abaplint/transpiler-cli 2.11.62 → 2.11.63
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 +41 -15
- package/package.json +3 -3
package/build/bundle.js
CHANGED
|
@@ -7972,7 +7972,7 @@ class StringTemplateFormatting extends combi_1.Expression {
|
|
|
7972
7972
|
const number = (0, combi_1.seq)("NUMBER =", numberOptions);
|
|
7973
7973
|
const sign = (0, combi_1.seq)("SIGN =", signOptions);
|
|
7974
7974
|
const decimals = (0, combi_1.seq)("DECIMALS =", _1.Source);
|
|
7975
|
-
const alpha = (0, combi_1.ver)(version_1.Version.v740sp02, (0, combi_1.seq)("ALPHA =", alphaOptions));
|
|
7975
|
+
const alpha = (0, combi_1.ver)(version_1.Version.v740sp02, (0, combi_1.seq)("ALPHA =", alphaOptions), version_1.Version.OpenABAP);
|
|
7976
7976
|
const xsd = (0, combi_1.ver)(version_1.Version.v740sp02, (0, combi_1.seq)("XSD =", zeroXSDOptions));
|
|
7977
7977
|
const country = (0, combi_1.seq)("COUNTRY =", _1.Source);
|
|
7978
7978
|
const formatting = (0, combi_1.altPrio)((0, combi_1.seq)("TIME =", dateTimeOptions), (0, combi_1.seq)("DATE =", dateTimeOptions), (0, combi_1.seq)("CASE =", caseOptions), (0, combi_1.seq)("EXPONENT", _1.Source), (0, combi_1.seq)("ZERO =", zeroXSDOptions), xsd, (0, combi_1.seq)("STYLE =", styleOptions), (0, combi_1.seq)("CURRENCY =", _1.Source), (0, combi_1.per)(sign, number, decimals, width, pad, alpha, align, country), (0, combi_1.per)(timezone, timestamp));
|
|
@@ -13694,7 +13694,7 @@ class InterfaceDef {
|
|
|
13694
13694
|
getMatcher() {
|
|
13695
13695
|
const val = (0, combi_1.seq)(expressions_1.AttributeName, "=", expressions_1.Source);
|
|
13696
13696
|
const dataValues = (0, combi_1.seq)("DATA VALUES", (0, combi_1.plus)(val));
|
|
13697
|
-
const options = (0, combi_1.alt)(expressions_1.AbstractMethods, expressions_1.FinalMethods, "ALL METHODS ABSTRACT", "ALL METHODS FINAL", (0, combi_1.ver)(version_1.Version.v740sp02, "PARTIALLY IMPLEMENTED"));
|
|
13697
|
+
const options = (0, combi_1.alt)(expressions_1.AbstractMethods, expressions_1.FinalMethods, "ALL METHODS ABSTRACT", "ALL METHODS FINAL", (0, combi_1.ver)(version_1.Version.v740sp02, "PARTIALLY IMPLEMENTED", version_1.Version.OpenABAP));
|
|
13698
13698
|
return (0, combi_1.seq)("INTERFACES", expressions_1.InterfaceName, (0, combi_1.opt)(options), (0, combi_1.opt)(dataValues));
|
|
13699
13699
|
}
|
|
13700
13700
|
}
|
|
@@ -18368,7 +18368,7 @@ const Structures = __webpack_require__(/*! ./ */ "./node_modules/@abaplint/core/
|
|
|
18368
18368
|
const _combi_1 = __webpack_require__(/*! ./_combi */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/_combi.js");
|
|
18369
18369
|
class DynproLogic {
|
|
18370
18370
|
getMatcher() {
|
|
18371
|
-
return (0, _combi_1.seq)((0, _combi_1.sub)(Structures.ProcessBeforeOutput), (0, _combi_1.sub)(Structures.ProcessAfterInput), (0, _combi_1.opt)((0, _combi_1.sub)(Structures.ProcessOnHelpRequest)), (0, _combi_1.opt)((0, _combi_1.sub)(Structures.ProcessOnValueRequest)), (0, _combi_1.opt)((0, _combi_1.sub)(Structures.ProcessOnHelpRequest)));
|
|
18371
|
+
return (0, _combi_1.seq)((0, _combi_1.sub)(Structures.ProcessBeforeOutput), (0, _combi_1.opt)((0, _combi_1.sub)(Structures.ProcessAfterInput)), (0, _combi_1.opt)((0, _combi_1.sub)(Structures.ProcessOnHelpRequest)), (0, _combi_1.opt)((0, _combi_1.sub)(Structures.ProcessOnValueRequest)), (0, _combi_1.opt)((0, _combi_1.sub)(Structures.ProcessOnHelpRequest)));
|
|
18372
18372
|
}
|
|
18373
18373
|
}
|
|
18374
18374
|
exports.DynproLogic = DynproLogic;
|
|
@@ -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.191";
|
|
53855
53855
|
}
|
|
53856
53856
|
getDDICReferences() {
|
|
53857
53857
|
return this.ddicReferences;
|
|
@@ -60099,6 +60099,9 @@ ${indentation}CATCH ${className} INTO ${targetName}.`;
|
|
|
60099
60099
|
return issue_1.Issue.atToken(lowFile, node.getFirstToken(), "Outline DATA", this.getMetadata().key, this.conf.severity, fix);
|
|
60100
60100
|
}
|
|
60101
60101
|
partiallyImplemented(node, lowFile) {
|
|
60102
|
+
if (this.lowReg.getConfig().getVersion() === version_1.Version.OpenABAP) {
|
|
60103
|
+
return undefined;
|
|
60104
|
+
}
|
|
60102
60105
|
if (node.get() instanceof Statements.InterfaceDef) {
|
|
60103
60106
|
const partially = node.findDirectTokenByText("PARTIALLY");
|
|
60104
60107
|
if (partially === undefined) {
|
|
@@ -61940,7 +61943,11 @@ ${indentation} output = ${uniqueName}.\n`;
|
|
|
61940
61943
|
if (cdef instanceof _typed_identifier_1.TypedIdentifier) {
|
|
61941
61944
|
const foo = cdef.getType();
|
|
61942
61945
|
if (foo instanceof basic_1.ObjectReferenceType) {
|
|
61943
|
-
cdef = foo.
|
|
61946
|
+
cdef = spag === null || spag === void 0 ? void 0 : spag.findClassDefinition(foo.getQualifiedName());
|
|
61947
|
+
if (cdef === undefined) {
|
|
61948
|
+
const cglobal = this.highReg.getObject("CLAS", foo.getQualifiedName());
|
|
61949
|
+
cdef = cglobal === null || cglobal === void 0 ? void 0 : cglobal.getDefinition();
|
|
61950
|
+
}
|
|
61944
61951
|
}
|
|
61945
61952
|
else {
|
|
61946
61953
|
throw new Error("newParameters, downport, unexpected");
|
|
@@ -80625,7 +80632,7 @@ class SourceTranspiler {
|
|
|
80625
80632
|
constructor(addGet = false) {
|
|
80626
80633
|
this.addGet = addGet;
|
|
80627
80634
|
}
|
|
80628
|
-
transpile(node, traversal) {
|
|
80635
|
+
transpile(node, traversal, context) {
|
|
80629
80636
|
let ret = new chunk_1.Chunk();
|
|
80630
80637
|
const post = new chunk_1.Chunk();
|
|
80631
80638
|
const children = node.getChildren();
|
|
@@ -80640,7 +80647,7 @@ class SourceTranspiler {
|
|
|
80640
80647
|
ret.appendChunk(new constant_1.ConstantTranspiler(this.addGet).transpile(c, traversal));
|
|
80641
80648
|
}
|
|
80642
80649
|
else if (c.get() instanceof core_1.Expressions.StringTemplate) {
|
|
80643
|
-
ret.appendChunk(
|
|
80650
|
+
ret.appendChunk(new _1.StringTemplateTranspiler().transpile(c, traversal, context));
|
|
80644
80651
|
}
|
|
80645
80652
|
else if (c.get() instanceof core_1.Expressions.Cond) {
|
|
80646
80653
|
ret.appendChunk(traversal.traverse(c));
|
|
@@ -80695,7 +80702,8 @@ class SourceTranspiler {
|
|
|
80695
80702
|
ret = new chunk_1.Chunk().appendString(new _1.TypeNameOrInfer().transpile(typ, traversal).getCode());
|
|
80696
80703
|
ret.appendString(".set(");
|
|
80697
80704
|
// todo: handle LET
|
|
80698
|
-
|
|
80705
|
+
const context = new _1.TypeNameOrInfer().findType(typ, traversal);
|
|
80706
|
+
ret.appendString(new SourceTranspiler().transpile(c.getFirstChild(), traversal, context).getCode());
|
|
80699
80707
|
ret.appendString(")");
|
|
80700
80708
|
}
|
|
80701
80709
|
else if (c.get() instanceof core_1.Expressions.ValueBody) {
|
|
@@ -81563,7 +81571,7 @@ const core_1 = __webpack_require__(/*! @abaplint/core */ "./node_modules/@abapli
|
|
|
81563
81571
|
const _1 = __webpack_require__(/*! . */ "./node_modules/@abaplint/transpiler/build/src/expressions/index.js");
|
|
81564
81572
|
const chunk_1 = __webpack_require__(/*! ../chunk */ "./node_modules/@abaplint/transpiler/build/src/chunk.js");
|
|
81565
81573
|
class StringTemplateTranspiler {
|
|
81566
|
-
transpile(node, traversal) {
|
|
81574
|
+
transpile(node, traversal, context) {
|
|
81567
81575
|
let ret = "";
|
|
81568
81576
|
const children = node.getChildren();
|
|
81569
81577
|
// eslint-disable-next-line @typescript-eslint/prefer-for-of
|
|
@@ -81588,7 +81596,7 @@ class StringTemplateTranspiler {
|
|
|
81588
81596
|
}
|
|
81589
81597
|
}
|
|
81590
81598
|
else if (c instanceof core_1.Nodes.ExpressionNode) {
|
|
81591
|
-
ret += new _1.StringTemplateSourceTranspiler().transpile(c, traversal).getCode();
|
|
81599
|
+
ret += new _1.StringTemplateSourceTranspiler().transpile(c, traversal, context).getCode();
|
|
81592
81600
|
}
|
|
81593
81601
|
}
|
|
81594
81602
|
return new chunk_1.Chunk("new abap.types.String().set(" + ret + ")");
|
|
@@ -81612,14 +81620,15 @@ exports.StringTemplateSourceTranspiler = void 0;
|
|
|
81612
81620
|
const core_1 = __webpack_require__(/*! @abaplint/core */ "./node_modules/@abaplint/core/build/src/index.js");
|
|
81613
81621
|
const _1 = __webpack_require__(/*! . */ "./node_modules/@abaplint/transpiler/build/src/expressions/index.js");
|
|
81614
81622
|
const chunk_1 = __webpack_require__(/*! ../chunk */ "./node_modules/@abaplint/transpiler/build/src/chunk.js");
|
|
81623
|
+
const transpile_types_1 = __webpack_require__(/*! ../transpile_types */ "./node_modules/@abaplint/transpiler/build/src/transpile_types.js");
|
|
81615
81624
|
class StringTemplateSourceTranspiler {
|
|
81616
|
-
transpile(node, traversal) {
|
|
81625
|
+
transpile(node, traversal, context) {
|
|
81617
81626
|
let ret = "";
|
|
81618
81627
|
const pre = "abap.templateFormatting(";
|
|
81619
81628
|
let post = ")";
|
|
81620
81629
|
const formatting = node.findDirectExpression(core_1.Expressions.StringTemplateFormatting);
|
|
81621
81630
|
if (formatting) {
|
|
81622
|
-
const options = this.build(formatting, traversal);
|
|
81631
|
+
const options = this.build(formatting, traversal, context);
|
|
81623
81632
|
if (options) {
|
|
81624
81633
|
post = "," + options + ")";
|
|
81625
81634
|
}
|
|
@@ -81631,7 +81640,7 @@ class StringTemplateSourceTranspiler {
|
|
|
81631
81640
|
ret += pre + new _1.SourceTranspiler().transpile(c, traversal).getCode() + post;
|
|
81632
81641
|
return new chunk_1.Chunk(ret);
|
|
81633
81642
|
}
|
|
81634
|
-
build(node, traversal) {
|
|
81643
|
+
build(node, traversal, context) {
|
|
81635
81644
|
let option = "";
|
|
81636
81645
|
let count = 0;
|
|
81637
81646
|
for (const c of node.getChildren()) {
|
|
@@ -81651,6 +81660,12 @@ class StringTemplateSourceTranspiler {
|
|
|
81651
81660
|
option += new _1.SourceTranspiler(true).transpile(c, traversal).getCode();
|
|
81652
81661
|
}
|
|
81653
81662
|
}
|
|
81663
|
+
if (option.startsWith(`"alpha":"in"`)) {
|
|
81664
|
+
if (context === undefined) {
|
|
81665
|
+
throw new Error("ALPHA = IN, context undefined");
|
|
81666
|
+
}
|
|
81667
|
+
option += `, "alphaInContext": ` + transpile_types_1.TranspileTypes.toType(context);
|
|
81668
|
+
}
|
|
81654
81669
|
if (option !== "") {
|
|
81655
81670
|
return "{" + option + "}";
|
|
81656
81671
|
}
|
|
@@ -87222,12 +87237,23 @@ const abaplint = __webpack_require__(/*! @abaplint/core */ "./node_modules/@abap
|
|
|
87222
87237
|
const chunk_1 = __webpack_require__(/*! ../chunk */ "./node_modules/@abaplint/transpiler/build/src/chunk.js");
|
|
87223
87238
|
class MoveTranspiler {
|
|
87224
87239
|
transpile(node, traversal) {
|
|
87225
|
-
|
|
87240
|
+
const sourceExpression = node.findDirectExpression(abaplint.Expressions.Source);
|
|
87226
87241
|
const targets = [];
|
|
87227
|
-
|
|
87242
|
+
const targetExpressions = node.findDirectExpressions(abaplint.Expressions.Target);
|
|
87243
|
+
for (const t of targetExpressions) {
|
|
87228
87244
|
targets.push(traversal.traverse(t));
|
|
87229
87245
|
}
|
|
87230
87246
|
const ret = new chunk_1.Chunk();
|
|
87247
|
+
if (targetExpressions.length === 1
|
|
87248
|
+
&& sourceExpression?.getChildren().length === 1
|
|
87249
|
+
&& sourceExpression.findDirectExpression(abaplint.Expressions.StringTemplate)
|
|
87250
|
+
&& sourceExpression.concatTokens().toUpperCase().endsWith(" ALPHA = IN }|")) {
|
|
87251
|
+
const target = targets[0].getCode();
|
|
87252
|
+
const tSource = traversal.traverse(sourceExpression.findFirstExpression(abaplint.Expressions.StringTemplateSource)?.findDirectExpression(abaplint.Expressions.Source));
|
|
87253
|
+
ret.appendString(target + `.set(abap.alphaIn(${tSource.getCode()}, ${target}, ${target}));`);
|
|
87254
|
+
return ret;
|
|
87255
|
+
}
|
|
87256
|
+
let source = traversal.traverse(sourceExpression);
|
|
87231
87257
|
const second = node.getChildren()[1]?.concatTokens();
|
|
87232
87258
|
switch (second) {
|
|
87233
87259
|
case "?=":
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abaplint/transpiler-cli",
|
|
3
|
-
"version": "2.11.
|
|
3
|
+
"version": "2.11.63",
|
|
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.191",
|
|
31
|
+
"@abaplint/transpiler": "^2.11.63",
|
|
32
32
|
"@types/glob": "^8.1.0",
|
|
33
33
|
"@types/node": "^24.3.0",
|
|
34
34
|
"@types/progress": "^2.0.7",
|