@abaplint/cli 2.120.35 → 2.120.36

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.
Files changed (2) hide show
  1. package/build/cli.js +17 -4
  2. package/package.json +2 -2
package/build/cli.js CHANGED
@@ -28657,7 +28657,7 @@ class BasicTypes {
28657
28657
  return Types.VoidType.get((_f = node.findFirstExpression(Expressions.TypeStructure)) === null || _f === void 0 ? void 0 : _f.concatTokens());
28658
28658
  }
28659
28659
  else if (text.startsWith("LIKE LINE OF ")) {
28660
- const name = (_g = node.findFirstExpression(Expressions.FieldChain)) === null || _g === void 0 ? void 0 : _g.concatTokens();
28660
+ let name = (_g = node.findFirstExpression(Expressions.FieldChain)) === null || _g === void 0 ? void 0 : _g.concatTokens();
28661
28661
  let e = node.findFirstExpression(Expressions.Type);
28662
28662
  if (e === undefined) {
28663
28663
  e = node.findFirstExpression(Expressions.FormParamType);
@@ -28665,19 +28665,32 @@ class BasicTypes {
28665
28665
  if (e === undefined) {
28666
28666
  e = node.findFirstExpression(Expressions.FieldChain);
28667
28667
  }
28668
+ if (e === undefined) {
28669
+ // old style, eg "LIKE LINE OF tab OCCURS 0 WITH HEADER LINE", it is parsed as TypeName
28670
+ e = typeName;
28671
+ name = typeName === null || typeName === void 0 ? void 0 : typeName.concatTokens();
28672
+ }
28668
28673
  const type = this.resolveLikeName(e, false);
28674
+ let row = undefined;
28669
28675
  if (type === undefined) {
28670
28676
  return new Types.UnknownType("Type error, could not resolve \"" + name + "\", parseType");
28671
28677
  }
28672
28678
  else if (type instanceof Types.TableType) {
28673
- return type.getRowType();
28679
+ row = type.getRowType();
28674
28680
  }
28675
28681
  else if (type instanceof Types.VoidType) {
28676
- return type;
28682
+ row = type;
28677
28683
  }
28678
28684
  else {
28679
28685
  return new Types.UnknownType("Type error, not a table type " + name);
28680
28686
  }
28687
+ if (this.isOccurs(node)) {
28688
+ return new Types.TableType(row, {
28689
+ withHeader: text.includes(" WITH HEADER LINE"),
28690
+ keyType: Types.TableKeyType.default
28691
+ }, qualifiedName);
28692
+ }
28693
+ return row;
28681
28694
  }
28682
28695
  else if (text.startsWith("LIKE REF TO ")) {
28683
28696
  const name = (_h = node.findFirstExpression(Expressions.FieldChain)) === null || _h === void 0 ? void 0 : _h.concatTokens();
@@ -70106,7 +70119,7 @@ class Registry {
70106
70119
  }
70107
70120
  static abaplintVersion() {
70108
70121
  // magic, see build script "version.js"
70109
- return "2.120.35";
70122
+ return "2.120.36";
70110
70123
  }
70111
70124
  getDDICReferences() {
70112
70125
  return this.ddicReferences;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/cli",
3
- "version": "2.120.35",
3
+ "version": "2.120.36",
4
4
  "description": "abaplint - Command Line Interface",
5
5
  "funding": "https://github.com/sponsors/larshp",
6
6
  "bin": {
@@ -39,7 +39,7 @@
39
39
  },
40
40
  "homepage": "https://abaplint.org",
41
41
  "devDependencies": {
42
- "@abaplint/core": "^2.120.35",
42
+ "@abaplint/core": "^2.120.36",
43
43
  "@types/chai": "^4.3.20",
44
44
  "@types/minimist": "^1.2.5",
45
45
  "@types/mocha": "^10.0.10",