@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.
@@ -63,7 +63,7 @@ class Registry {
63
63
  }
64
64
  static abaplintVersion() {
65
65
  // magic, see build script "version.sh"
66
- return "2.93.32";
66
+ return "2.93.33";
67
67
  }
68
68
  getDDICReferences() {
69
69
  return this.references;
@@ -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
- if ((fieldChain === null || fieldChain === void 0 ? void 0 : fieldChain.getChildren().length) !== 2) {
1110
- return undefined;
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 ${fieldChain === null || fieldChain === void 0 ? void 0 : fieldChain.getChildren()[0].concatTokens()} ${condition} ASSIGNING ${fsTarget === null || fsTarget === void 0 ? void 0 : fsTarget.concatTokens()}.`;
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
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/core",
3
- "version": "2.93.32",
3
+ "version": "2.93.33",
4
4
  "description": "abaplint - Core API",
5
5
  "main": "build/src/index.js",
6
6
  "typings": "build/abaplint.d.ts",