@abaplint/core 2.93.32 → 2.93.33
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/src/registry.js +1 -1
- package/build/src/rules/downport.js +11 -6
- package/package.json +1 -1
package/build/src/registry.js
CHANGED
|
@@ -1106,11 +1106,9 @@ LOOP AT ${groupTargetName}tab ${groupTarget}.`;
|
|
|
1106
1106
|
return undefined;
|
|
1107
1107
|
}
|
|
1108
1108
|
const fieldChain = (_b = (_a = high.findDirectExpression(Expressions.AssignSource)) === null || _a === void 0 ? void 0 : _a.findDirectExpression(Expressions.Source)) === null || _b === void 0 ? void 0 : _b.findDirectExpression(Expressions.FieldChain);
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
const tableExpression = fieldChain === null || fieldChain === void 0 ? void 0 : fieldChain.getChildren()[1];
|
|
1113
|
-
if (!(tableExpression.get() instanceof Expressions.TableExpression)
|
|
1109
|
+
const tableExpression = fieldChain === null || fieldChain === void 0 ? void 0 : fieldChain.getLastChild();
|
|
1110
|
+
if (tableExpression === undefined
|
|
1111
|
+
|| !(tableExpression.get() instanceof Expressions.TableExpression)
|
|
1114
1112
|
|| !(tableExpression instanceof nodes_1.ExpressionNode)) {
|
|
1115
1113
|
return undefined;
|
|
1116
1114
|
}
|
|
@@ -1128,8 +1126,15 @@ LOOP AT ${groupTargetName}tab ${groupTarget}.`;
|
|
|
1128
1126
|
concat = concat.substring(0, concat.length - 2);
|
|
1129
1127
|
condition = `WITH KEY ${concat}`;
|
|
1130
1128
|
}
|
|
1129
|
+
let pre = "";
|
|
1130
|
+
for (const c of fieldChain.getChildren()) {
|
|
1131
|
+
if (c === tableExpression) {
|
|
1132
|
+
break;
|
|
1133
|
+
}
|
|
1134
|
+
pre += c.concatTokens();
|
|
1135
|
+
}
|
|
1131
1136
|
const fsTarget = high.findDirectExpression(Expressions.FSTarget);
|
|
1132
|
-
const code = `READ TABLE ${
|
|
1137
|
+
const code = `READ TABLE ${pre} ${condition} ASSIGNING ${fsTarget === null || fsTarget === void 0 ? void 0 : fsTarget.concatTokens()}.`;
|
|
1133
1138
|
const fix = edit_helper_1.EditHelper.replaceRange(lowFile, high.getFirstToken().getStart(), high.getLastToken().getEnd(), code);
|
|
1134
1139
|
return issue_1.Issue.atToken(lowFile, high.getFirstToken(), "Downport, ASSIGN table expr", this.getMetadata().key, this.conf.severity, fix);
|
|
1135
1140
|
}
|