@abaplint/transpiler-cli 2.5.8 → 2.5.10
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 +28 -9
- package/package.json +3 -3
package/build/bundle.js
CHANGED
|
@@ -46041,7 +46041,7 @@ class Registry {
|
|
|
46041
46041
|
}
|
|
46042
46042
|
static abaplintVersion() {
|
|
46043
46043
|
// magic, see build script "version.sh"
|
|
46044
|
-
return "2.95.
|
|
46044
|
+
return "2.95.27";
|
|
46045
46045
|
}
|
|
46046
46046
|
getDDICReferences() {
|
|
46047
46047
|
return this.references;
|
|
@@ -51583,7 +51583,7 @@ ${indentation}RAISE EXCEPTION ${uniqueName2}.`;
|
|
|
51583
51583
|
return issue_1.Issue.atToken(lowFile, high.getFirstToken(), "Downport, call function parameter", this.getMetadata().key, this.conf.severity, fix);
|
|
51584
51584
|
}
|
|
51585
51585
|
downportCorrespondingSimple(high, lowFile) {
|
|
51586
|
-
var _a;
|
|
51586
|
+
var _a, _b;
|
|
51587
51587
|
if (!(high.get() instanceof Statements.Move)
|
|
51588
51588
|
|| high.getChildren().length !== 4
|
|
51589
51589
|
|| high.getChildren()[2].getFirstToken().getStr().toUpperCase() !== "CORRESPONDING") {
|
|
@@ -51594,14 +51594,22 @@ ${indentation}RAISE EXCEPTION ${uniqueName2}.`;
|
|
|
51594
51594
|
return undefined;
|
|
51595
51595
|
}
|
|
51596
51596
|
const sourceRef = (_a = high.findFirstExpression(Expressions.Source)) === null || _a === void 0 ? void 0 : _a.findFirstExpression(Expressions.CorrespondingBody);
|
|
51597
|
-
if (sourceRef ===
|
|
51598
|
-
|
|
51597
|
+
if ((sourceRef === null || sourceRef === void 0 ? void 0 : sourceRef.getChildren().length) === 1) {
|
|
51598
|
+
const code = `MOVE-CORRESPONDING ${sourceRef.concatTokens()} TO ${target.concatTokens()}`;
|
|
51599
|
+
const start = high.getFirstToken().getStart();
|
|
51600
|
+
const end = high.getLastToken().getStart();
|
|
51601
|
+
const fix = edit_helper_1.EditHelper.replaceRange(lowFile, start, end, code);
|
|
51602
|
+
return issue_1.Issue.atToken(lowFile, high.getFirstToken(), "Downport, simple CORRESPONDING move", this.getMetadata().key, this.conf.severity, fix);
|
|
51603
|
+
}
|
|
51604
|
+
else if ((sourceRef === null || sourceRef === void 0 ? void 0 : sourceRef.getChildren().length) === 5 && ((_b = sourceRef.getFirstChild()) === null || _b === void 0 ? void 0 : _b.concatTokens().toUpperCase()) === "BASE") {
|
|
51605
|
+
let code = `${target.concatTokens()} = ${sourceRef.getChildren()[2].concatTokens()}.\n`;
|
|
51606
|
+
code += `MOVE-CORRESPONDING ${sourceRef.getChildren()[4].concatTokens()} TO ${target.concatTokens()}`;
|
|
51607
|
+
const start = high.getFirstToken().getStart();
|
|
51608
|
+
const end = high.getLastToken().getStart();
|
|
51609
|
+
const fix = edit_helper_1.EditHelper.replaceRange(lowFile, start, end, code);
|
|
51610
|
+
return issue_1.Issue.atToken(lowFile, high.getFirstToken(), "Downport, CORRESPONDING BASE move", this.getMetadata().key, this.conf.severity, fix);
|
|
51599
51611
|
}
|
|
51600
|
-
|
|
51601
|
-
const start = high.getFirstToken().getStart();
|
|
51602
|
-
const end = high.getLastToken().getStart();
|
|
51603
|
-
const fix = edit_helper_1.EditHelper.replaceRange(lowFile, start, end, code);
|
|
51604
|
-
return issue_1.Issue.atToken(lowFile, high.getFirstToken(), "Downport, simple CORRESPONDING move", this.getMetadata().key, this.conf.severity, fix);
|
|
51612
|
+
return undefined;
|
|
51605
51613
|
}
|
|
51606
51614
|
downportRefSimple(high, lowFile, highSyntax) {
|
|
51607
51615
|
var _a;
|
|
@@ -73292,6 +73300,7 @@ class MethodImplementationTranspiler {
|
|
|
73292
73300
|
const varName = n.toLowerCase();
|
|
73293
73301
|
if (identifier.getMeta().includes("importing" /* abaplint.IdentifierMeta.MethodImporting */)
|
|
73294
73302
|
|| identifier.getMeta().includes("changing" /* abaplint.IdentifierMeta.MethodChanging */)
|
|
73303
|
+
|| identifier.getMeta().includes("event_parameter" /* abaplint.IdentifierMeta.EventParameter */)
|
|
73295
73304
|
|| identifier.getMeta().includes("exporting" /* abaplint.IdentifierMeta.MethodExporting */)) {
|
|
73296
73305
|
if (unique === "") {
|
|
73297
73306
|
unique = "INPUT";
|
|
@@ -76660,6 +76669,16 @@ class Traversal {
|
|
|
76660
76669
|
dataFromInterfaces(name, scope) {
|
|
76661
76670
|
let ret = "";
|
|
76662
76671
|
const intf = this.findInterfaceDefinition(name, scope);
|
|
76672
|
+
for (const a of (intf === null || intf === void 0 ? void 0 : intf.getAttributes().getConstants()) || []) {
|
|
76673
|
+
const fname = Traversal.escapeNamespace(a.getName().toLowerCase());
|
|
76674
|
+
const iname = Traversal.escapeNamespace(intf === null || intf === void 0 ? void 0 : intf.getName().toLowerCase());
|
|
76675
|
+
if ((intf === null || intf === void 0 ? void 0 : intf.isGlobal()) === true) {
|
|
76676
|
+
ret += "this." + iname + "$" + fname + " = abap.Classes['" + (intf === null || intf === void 0 ? void 0 : intf.getName().toUpperCase()) + "']." + iname + "$" + fname + ";\n";
|
|
76677
|
+
}
|
|
76678
|
+
else {
|
|
76679
|
+
ret += "this." + iname + "$" + fname + " = " + iname + "." + iname + "$" + fname + ";\n";
|
|
76680
|
+
}
|
|
76681
|
+
}
|
|
76663
76682
|
for (const a of (intf === null || intf === void 0 ? void 0 : intf.getAttributes().getAll()) || []) {
|
|
76664
76683
|
if (a.getMeta().includes("static" /* abaplint.IdentifierMeta.Static */) === true) {
|
|
76665
76684
|
continue;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abaplint/transpiler-cli",
|
|
3
|
-
"version": "2.5.
|
|
3
|
+
"version": "2.5.10",
|
|
4
4
|
"description": "Transpiler - Command Line Interface",
|
|
5
5
|
"bin": {
|
|
6
6
|
"abap_transpile": "./abap_transpile"
|
|
@@ -25,11 +25,11 @@
|
|
|
25
25
|
"author": "abaplint",
|
|
26
26
|
"license": "MIT",
|
|
27
27
|
"devDependencies": {
|
|
28
|
-
"@abaplint/transpiler": "^2.5.
|
|
28
|
+
"@abaplint/transpiler": "^2.5.10",
|
|
29
29
|
"@types/glob": "^7.2.0",
|
|
30
30
|
"glob": "=7.2.0",
|
|
31
31
|
"@types/progress": "^2.0.5",
|
|
32
|
-
"@abaplint/core": "^2.95.
|
|
32
|
+
"@abaplint/core": "^2.95.27",
|
|
33
33
|
"progress": "^2.0.3",
|
|
34
34
|
"webpack": "^5.75.0",
|
|
35
35
|
"webpack-cli": "^5.0.1",
|