@abaplint/cli 2.120.13 → 2.120.14

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 +12 -10
  2. package/package.json +2 -2
package/build/cli.js CHANGED
@@ -29018,7 +29018,7 @@ class BasicTypes {
29018
29018
  }
29019
29019
  }
29020
29020
  if (val === undefined) {
29021
- return 1;
29021
+ return undefined;
29022
29022
  }
29023
29023
  const intExpr = val.findFirstExpression(Expressions.Integer);
29024
29024
  if (intExpr) {
@@ -35412,9 +35412,11 @@ class Target {
35412
35412
  else if (context instanceof basic_1.TableType && context.isWithHeader() && context.getRowType() instanceof unknown_type_1.UnknownType) {
35413
35413
  return basic_1.VoidType.get(_syntax_input_1.CheckSyntaxKey);
35414
35414
  }
35415
+ else if (context instanceof basic_1.TableType && context.isWithHeader() && context.getRowType() instanceof basic_1.VoidType) {
35416
+ return context.getRowType();
35417
+ }
35415
35418
  else if (!(context instanceof basic_1.StructureType)
35416
35419
  && !(context instanceof basic_1.TableType && context.isWithHeader() && context.getRowType() instanceof basic_1.StructureType)
35417
- && !(context instanceof basic_1.TableType && context.isWithHeader() && context.getRowType() instanceof basic_1.VoidType)
35418
35420
  && !(context instanceof basic_1.VoidType)) {
35419
35421
  const message = "Not a structure, target, " + (context === null || context === void 0 ? void 0 : context.constructor.name) + ", " + current.concatTokens();
35420
35422
  input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
@@ -45949,7 +45951,7 @@ class Type {
45949
45951
  input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
45950
45952
  return new _typed_identifier_1.TypedIdentifier(found.getToken(), input.filename, basic_1.VoidType.get(_syntax_input_1.CheckSyntaxKey));
45951
45953
  }
45952
- if (input.scope.isGlobalOO() && found.getType() instanceof basic_1.PackedType) {
45954
+ if (input.scope.isAnyOO() && found.getType() instanceof basic_1.PackedType) {
45953
45955
  const concat = node.concatTokens().toUpperCase();
45954
45956
  if ((concat.includes(" TYPE P ") || concat.includes(" TYPE P."))
45955
45957
  && concat.includes(" DECIMALS ") === false) {
@@ -55449,7 +55451,7 @@ class DDIC {
55449
55451
  return new Types.PackedType(length, 0, { qualifiedName: qualifiedName });
55450
55452
  }
55451
55453
  else {
55452
- return new Types.PackedType(1, 0, { qualifiedName: qualifiedName });
55454
+ return new Types.PackedType(8, 0, { qualifiedName: qualifiedName });
55453
55455
  }
55454
55456
  case "C":
55455
55457
  if (length) {
@@ -55677,14 +55679,14 @@ class DDIC {
55677
55679
  case "DF16_DEC": // 1 <= len <= 31
55678
55680
  case "DF34_DEC": // 1 <= len <= 31
55679
55681
  case "CURR": // 1 <= len <= 31
55680
- case "QUAN": // 1 <= len <= 31
55682
+ case "QUAN": { // 1 <= len <= 31
55681
55683
  if (input.length === undefined) {
55682
55684
  return new Types.UnknownType(input.text + " unknown length, " + input.infoText, input.infoText);
55683
55685
  }
55684
- else if (input.decimals === undefined) {
55685
- return new Types.PackedType(parseInt(input.length, 10), 0, extra);
55686
- }
55687
- return new Types.PackedType(parseInt(input.length, 10), parseInt(input.decimals, 10), extra);
55686
+ const packedLength = Math.ceil((parseInt(input.length, 10) + 1) / 2);
55687
+ const decimals = input.decimals === undefined ? 0 : parseInt(input.decimals, 10);
55688
+ return new Types.PackedType(packedLength, decimals, extra);
55689
+ }
55688
55690
  case "ACCP":
55689
55691
  return new Types.CharacterType(6, extra); // YYYYMM
55690
55692
  case "LANG":
@@ -69431,7 +69433,7 @@ class Registry {
69431
69433
  }
69432
69434
  static abaplintVersion() {
69433
69435
  // magic, see build script "version.js"
69434
- return "2.120.13";
69436
+ return "2.120.14";
69435
69437
  }
69436
69438
  getDDICReferences() {
69437
69439
  return this.ddicReferences;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/cli",
3
- "version": "2.120.13",
3
+ "version": "2.120.14",
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.13",
42
+ "@abaplint/core": "^2.120.14",
43
43
  "@types/chai": "^4.3.20",
44
44
  "@types/minimist": "^1.2.5",
45
45
  "@types/mocha": "^10.0.10",