@abaplint/cli 2.120.13 → 2.120.15

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