@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.
@@ -63,7 +63,7 @@ class Registry {
63
63
  }
64
64
  static abaplintVersion() {
65
65
  // magic, see build script "version.sh"
66
- return "2.93.26";
66
+ return "2.93.27";
67
67
  }
68
68
  getDDICReferences() {
69
69
  return this.references;
@@ -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
- found = this.outlineValue(low, high, lowFile, highSyntax);
262
- if (found) {
263
- return found;
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
- found = this.outlineReduce(low, high, lowFile, highSyntax);
266
- if (found) {
267
- return found;
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 = `DATA(${uniqueName}) = ${sourceRef.concatTokens()}.
922
- GET REFERENCE OF ${uniqueName} INTO ${target.concatTokens()}`;
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()}`;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/core",
3
- "version": "2.93.26",
3
+ "version": "2.93.27",
4
4
  "description": "abaplint - Core API",
5
5
  "main": "build/src/index.js",
6
6
  "typings": "build/abaplint.d.ts",