@abaplint/core 2.86.1 → 2.86.2

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.
@@ -68,7 +68,7 @@ class Registry {
68
68
  }
69
69
  static abaplintVersion() {
70
70
  // magic, see build script "version.sh"
71
- return "2.86.1";
71
+ return "2.86.2";
72
72
  }
73
73
  getDDICReferences() {
74
74
  return this.references;
@@ -1269,6 +1269,7 @@ ${indentation} output = ${topTarget}.`;
1269
1269
  return undefined;
1270
1270
  }
1271
1271
  outlineCond(node, lowFile, highSyntax) {
1272
+ var _a, _b;
1272
1273
  for (const i of node.findAllExpressionsRecursive(Expressions.Source)) {
1273
1274
  if (i.getFirstToken().getStr().toUpperCase() !== "COND") {
1274
1275
  continue;
@@ -1278,13 +1279,23 @@ ${indentation} output = ${topTarget}.`;
1278
1279
  continue;
1279
1280
  }
1280
1281
  const uniqueName = this.uniqueName(i.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
1281
- const type = this.findType(i, lowFile, highSyntax);
1282
+ let type = this.findType(i, lowFile, highSyntax);
1282
1283
  if (type === undefined) {
1283
- continue;
1284
+ if (node.get() instanceof Statements.Move
1285
+ && node.findDirectExpression(Expressions.Source) === i
1286
+ && ((_a = node.findDirectExpression(Expressions.Target)) === null || _a === void 0 ? void 0 : _a.findDirectExpression(Expressions.TargetField)) !== undefined) {
1287
+ type = "LIKE " + ((_b = node.findDirectExpression(Expressions.Target)) === null || _b === void 0 ? void 0 : _b.concatTokens());
1288
+ }
1289
+ if (type === undefined) {
1290
+ continue;
1291
+ }
1292
+ }
1293
+ else {
1294
+ type = "TYPE " + type;
1284
1295
  }
1285
1296
  const indent = " ".repeat(node.getFirstToken().getStart().getCol() - 1);
1286
1297
  const bodyCode = this.buildCondBody(body, uniqueName, indent, lowFile, highSyntax);
1287
- const abap = `DATA ${uniqueName} TYPE ${type}.\n` + bodyCode;
1298
+ const abap = `DATA ${uniqueName} ${type}.\n` + bodyCode;
1288
1299
  const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, node.getFirstToken().getStart(), abap);
1289
1300
  const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, i.getFirstToken().getStart(), i.getLastToken().getEnd(), uniqueName);
1290
1301
  const fix = edit_helper_1.EditHelper.merge(fix2, fix1);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/core",
3
- "version": "2.86.1",
3
+ "version": "2.86.2",
4
4
  "description": "abaplint - Core API",
5
5
  "main": "build/src/index.js",
6
6
  "typings": "build/abaplint.d.ts",