@abaplint/core 2.93.26 → 2.93.27
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 +26 -8
- package/package.json +1 -1
package/build/src/registry.js
CHANGED
|
@@ -258,13 +258,31 @@ Only one transformation is applied to a statement at a time, so multiple steps m
|
|
|
258
258
|
if (found) {
|
|
259
259
|
return found;
|
|
260
260
|
}
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
261
|
+
let skipValue = false;
|
|
262
|
+
let skipReduce = false;
|
|
263
|
+
const valueBody = high.findFirstExpression(Expressions.ValueBody);
|
|
264
|
+
const reduceBody = high.findFirstExpression(Expressions.ReduceBody);
|
|
265
|
+
if (valueBody && reduceBody) {
|
|
266
|
+
const valueToken = valueBody.getFirstToken();
|
|
267
|
+
const reduceToken = reduceBody.getFirstToken();
|
|
268
|
+
if (valueToken.getStart().isBefore(reduceToken.getStart())) {
|
|
269
|
+
skipReduce = true;
|
|
270
|
+
}
|
|
271
|
+
else {
|
|
272
|
+
skipValue = true;
|
|
273
|
+
}
|
|
264
274
|
}
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
275
|
+
if (skipValue !== true) {
|
|
276
|
+
found = this.outlineValue(low, high, lowFile, highSyntax);
|
|
277
|
+
if (found) {
|
|
278
|
+
return found;
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
if (skipReduce !== true) {
|
|
282
|
+
found = this.outlineReduce(low, high, lowFile, highSyntax);
|
|
283
|
+
if (found) {
|
|
284
|
+
return found;
|
|
285
|
+
}
|
|
268
286
|
}
|
|
269
287
|
found = this.outlineSwitch(low, high, lowFile, highSyntax);
|
|
270
288
|
if (found) {
|
|
@@ -918,8 +936,8 @@ ${indentation}RAISE EXCEPTION ${uniqueName2}.`;
|
|
|
918
936
|
let code = "";
|
|
919
937
|
if (sourceRef.findFirstExpression(Expressions.TableExpression)) {
|
|
920
938
|
const uniqueName = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
|
|
921
|
-
code = `
|
|
922
|
-
GET REFERENCE OF
|
|
939
|
+
code = `ASSIGN ${sourceRef.concatTokens()} TO FIELD-SYMBOL(<${uniqueName}>).
|
|
940
|
+
GET REFERENCE OF <${uniqueName}> INTO ${target.concatTokens()}`;
|
|
923
941
|
}
|
|
924
942
|
else {
|
|
925
943
|
code = `GET REFERENCE OF ${sourceRef.concatTokens()} INTO ${target.concatTokens()}`;
|