@abaplint/core 2.93.19 → 2.93.20

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.19";
66
+ return "2.93.20";
67
67
  }
68
68
  getDDICReferences() {
69
69
  return this.references;
@@ -1085,17 +1085,24 @@ LOOP AT ${groupTargetName}tab ${groupTarget}.`;
1085
1085
  return;
1086
1086
  }
1087
1087
  const valueBody = source.findDirectExpression(Expressions.ValueBody);
1088
- if (valueBody === undefined || valueBody.getChildren().length !== 1) {
1088
+ if (valueBody === undefined) {
1089
1089
  return;
1090
1090
  }
1091
- const fieldAssignment = valueBody.findDirectExpression(Expressions.FieldAssignment);
1092
- if (fieldAssignment === undefined) {
1091
+ const fieldAssignments = valueBody.findDirectExpressions(Expressions.FieldAssignment);
1092
+ if (fieldAssignments.length === 0) {
1093
+ return;
1094
+ }
1095
+ else if (fieldAssignments.length !== valueBody.getChildren().length) {
1093
1096
  return;
1094
1097
  }
1095
1098
  const indentation = " ".repeat(high.getFirstToken().getStart().getCol() - 1);
1096
- const code = `CLEAR ${target.concatTokens()}.\n` + indentation + target.concatTokens() + "-" + fieldAssignment.concatTokens();
1099
+ let code = `CLEAR ${target.concatTokens()}.\n`;
1100
+ for (const fieldAssignment of fieldAssignments) {
1101
+ code += indentation + target.concatTokens() + "-" + fieldAssignment.concatTokens() + `.\n`;
1102
+ }
1103
+ code = code.trimEnd();
1097
1104
  const start = high.getFirstToken().getStart();
1098
- const end = high.getLastToken().getStart();
1105
+ const end = high.getLastToken().getEnd();
1099
1106
  const fix = edit_helper_1.EditHelper.replaceRange(lowFile, start, end, code);
1100
1107
  return issue_1.Issue.atToken(lowFile, high.getFirstToken(), "Downport, simple move", this.getMetadata().key, this.conf.severity, fix);
1101
1108
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/core",
3
- "version": "2.93.19",
3
+ "version": "2.93.20",
4
4
  "description": "abaplint - Core API",
5
5
  "main": "build/src/index.js",
6
6
  "typings": "build/abaplint.d.ts",