@abaplint/core 2.95.45 → 2.95.46

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.95.45";
66
+ return "2.95.46";
67
67
  }
68
68
  getDDICReferences() {
69
69
  return this.references;
@@ -1956,7 +1956,7 @@ ${indentation} output = ${topTarget}.`;
1956
1956
  return undefined;
1957
1957
  }
1958
1958
  outlineValue(low, high, lowFile, highSyntax) {
1959
- var _a, _b, _c, _d;
1959
+ var _a, _b, _c;
1960
1960
  if (!(low.get() instanceof _statement_1.Unknown)) {
1961
1961
  return undefined;
1962
1962
  }
@@ -1991,15 +1991,10 @@ ${indentation} output = ${topTarget}.`;
1991
1991
  let added = false;
1992
1992
  let data = "";
1993
1993
  let previous = undefined;
1994
- if ((valueBody === null || valueBody === void 0 ? void 0 : valueBody.findDirectExpression(Expressions.ValueBodyLine)) !== undefined
1995
- && (valueBody === null || valueBody === void 0 ? void 0 : valueBody.findDirectExpression(Expressions.For)) === undefined) {
1996
- structureName = this.uniqueName(firstToken.getStart(), lowFile.getFilename(), highSyntax);
1997
- data = indentation + `DATA ${structureName} LIKE LINE OF ${uniqueName}.\n`;
1998
- }
1999
- else if ((valueBody === null || valueBody === void 0 ? void 0 : valueBody.findDirectExpression(Expressions.ValueBodyLine)) !== undefined
2000
- && ((_b = valueBody === null || valueBody === void 0 ? void 0 : valueBody.findDirectExpression(Expressions.For)) === null || _b === void 0 ? void 0 : _b.findDirectTokenByText("GROUPS")) !== undefined) {
1994
+ if ((valueBody === null || valueBody === void 0 ? void 0 : valueBody.findDirectExpression(Expressions.ValueBodyLine)) !== undefined) {
2001
1995
  structureName = this.uniqueName(firstToken.getStart(), lowFile.getFilename(), highSyntax);
2002
- data = indentation + ` DATA ${structureName} LIKE LINE OF ${uniqueName}.\n`;
1996
+ const extra = (valueBody === null || valueBody === void 0 ? void 0 : valueBody.findDirectExpression(Expressions.For)) ? " " : "";
1997
+ data = indentation + extra + `DATA ${structureName} LIKE LINE OF ${uniqueName}.\n`;
2003
1998
  }
2004
1999
  for (const a of (valueBody === null || valueBody === void 0 ? void 0 : valueBody.getChildren()) || []) {
2005
2000
  if (a.get() instanceof Expressions.FieldAssignment) {
@@ -2055,7 +2050,7 @@ ${indentation} output = ${topTarget}.`;
2055
2050
  }
2056
2051
  }
2057
2052
  }
2058
- if (body === "" && ((_c = valueBody === null || valueBody === void 0 ? void 0 : valueBody.getLastChild()) === null || _c === void 0 ? void 0 : _c.getFirstToken().getStr().toUpperCase()) === "OPTIONAL") {
2053
+ if (body === "" && ((_b = valueBody === null || valueBody === void 0 ? void 0 : valueBody.getLastChild()) === null || _b === void 0 ? void 0 : _b.getFirstToken().getStr().toUpperCase()) === "OPTIONAL") {
2059
2054
  const fieldChain = valueBody.findFirstExpression(Expressions.FieldChain);
2060
2055
  const rowName = this.uniqueName(firstToken.getStart(), lowFile.getFilename(), highSyntax);
2061
2056
  let tableExpression = undefined;
@@ -2074,7 +2069,7 @@ ${indentation} output = ${topTarget}.`;
2074
2069
  }
2075
2070
  let condition = "";
2076
2071
  if ((tableExpression === null || tableExpression === void 0 ? void 0 : tableExpression.getChildren().length) === 3) {
2077
- condition = "INDEX " + ((_d = tableExpression === null || tableExpression === void 0 ? void 0 : tableExpression.findDirectExpression(Expressions.Source)) === null || _d === void 0 ? void 0 : _d.concatTokens());
2072
+ condition = "INDEX " + ((_c = tableExpression === null || tableExpression === void 0 ? void 0 : tableExpression.findDirectExpression(Expressions.Source)) === null || _c === void 0 ? void 0 : _c.concatTokens());
2078
2073
  }
2079
2074
  else {
2080
2075
  condition = "WITH KEY " + (tableExpression === null || tableExpression === void 0 ? void 0 : tableExpression.concatTokens().replace("[ ", "").replace(" ]", ""));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/core",
3
- "version": "2.95.45",
3
+ "version": "2.95.46",
4
4
  "description": "abaplint - Core API",
5
5
  "main": "build/src/index.js",
6
6
  "typings": "build/abaplint.d.ts",