@abaplint/cli 2.101.24 → 2.101.25
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/cli.js +42 -1
- package/package.json +2 -2
package/build/cli.js
CHANGED
|
@@ -48453,7 +48453,7 @@ class Registry {
|
|
|
48453
48453
|
}
|
|
48454
48454
|
static abaplintVersion() {
|
|
48455
48455
|
// magic, see build script "version.sh"
|
|
48456
|
-
return "2.101.
|
|
48456
|
+
return "2.101.25";
|
|
48457
48457
|
}
|
|
48458
48458
|
getDDICReferences() {
|
|
48459
48459
|
return this.ddicReferences;
|
|
@@ -53487,6 +53487,10 @@ Make sure to test the downported code, it might not always be completely correct
|
|
|
53487
53487
|
return found;
|
|
53488
53488
|
}
|
|
53489
53489
|
}
|
|
53490
|
+
found = this.outlineCorresponding(low, high, lowFile, highSyntax);
|
|
53491
|
+
if (found) {
|
|
53492
|
+
return found;
|
|
53493
|
+
}
|
|
53490
53494
|
found = this.downportSelectFields(low, high, lowFile, highSyntax);
|
|
53491
53495
|
if (found) {
|
|
53492
53496
|
return found;
|
|
@@ -55080,6 +55084,43 @@ ${indentation} output = ${uniqueName}.\n`;
|
|
|
55080
55084
|
}
|
|
55081
55085
|
return undefined;
|
|
55082
55086
|
}
|
|
55087
|
+
outlineCorresponding(low, high, lowFile, highSyntax) {
|
|
55088
|
+
var _a;
|
|
55089
|
+
if (!(low.get() instanceof _statement_1.Unknown)) {
|
|
55090
|
+
return undefined;
|
|
55091
|
+
}
|
|
55092
|
+
const allSources = high.findAllExpressionsRecursive(Expressions.Source);
|
|
55093
|
+
for (const s of allSources) {
|
|
55094
|
+
const firstToken = s.getFirstToken();
|
|
55095
|
+
if (firstToken.getStr().toUpperCase() !== "CORRESPONDING") {
|
|
55096
|
+
continue;
|
|
55097
|
+
}
|
|
55098
|
+
const correspondingBody = s.findDirectExpression(Expressions.CorrespondingBody);
|
|
55099
|
+
const uniqueName = this.uniqueName(firstToken.getStart(), lowFile.getFilename(), highSyntax);
|
|
55100
|
+
const indentation = " ".repeat(high.getFirstToken().getStart().getCol() - 1);
|
|
55101
|
+
let type = this.findType(s, lowFile, highSyntax);
|
|
55102
|
+
if (type === undefined) {
|
|
55103
|
+
if (high.get() instanceof Statements.Move && high.findDirectExpression(Expressions.Source) === s) {
|
|
55104
|
+
type = "LIKE " + ((_a = high.findDirectExpression(Expressions.Target)) === null || _a === void 0 ? void 0 : _a.concatTokens());
|
|
55105
|
+
}
|
|
55106
|
+
if (type === undefined) {
|
|
55107
|
+
continue;
|
|
55108
|
+
}
|
|
55109
|
+
}
|
|
55110
|
+
else {
|
|
55111
|
+
type = "TYPE " + type;
|
|
55112
|
+
}
|
|
55113
|
+
const abap = `DATA ${uniqueName} ${type}.\n` +
|
|
55114
|
+
indentation + `CLEAR ${uniqueName}.\n` + // might be called inside a loop
|
|
55115
|
+
indentation + `MOVE-CORRESPONDING ${correspondingBody === null || correspondingBody === void 0 ? void 0 : correspondingBody.concatTokens()} TO ${uniqueName}.\n` +
|
|
55116
|
+
indentation;
|
|
55117
|
+
const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, high.getFirstToken().getStart(), abap);
|
|
55118
|
+
const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, firstToken.getStart(), s.getLastToken().getEnd(), uniqueName);
|
|
55119
|
+
const fix = edit_helper_1.EditHelper.merge(fix2, fix1);
|
|
55120
|
+
return issue_1.Issue.atToken(lowFile, firstToken, "Downport CORRESPONDING", this.getMetadata().key, this.conf.severity, fix);
|
|
55121
|
+
}
|
|
55122
|
+
return undefined;
|
|
55123
|
+
}
|
|
55083
55124
|
outlineValue(low, high, lowFile, highSyntax) {
|
|
55084
55125
|
var _a, _b, _c;
|
|
55085
55126
|
if (!(low.get() instanceof _statement_1.Unknown)) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abaplint/cli",
|
|
3
|
-
"version": "2.101.
|
|
3
|
+
"version": "2.101.25",
|
|
4
4
|
"description": "abaplint - Command Line Interface",
|
|
5
5
|
"funding": "https://github.com/sponsors/larshp",
|
|
6
6
|
"bin": {
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
},
|
|
39
39
|
"homepage": "https://abaplint.org",
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"@abaplint/core": "^2.101.
|
|
41
|
+
"@abaplint/core": "^2.101.25",
|
|
42
42
|
"@types/chai": "^4.3.5",
|
|
43
43
|
"@types/glob": "^7.2.0",
|
|
44
44
|
"@types/minimist": "^1.2.2",
|