@abaplint/cli 2.120.15 → 2.120.17

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 +52 -29
  2. package/package.json +2 -2
package/build/cli.js CHANGED
@@ -4766,7 +4766,7 @@ class FieldChain extends combi_1.Expression {
4766
4766
  getRunnable() {
4767
4767
  const attr = (0, combi_1.seq)((0, combi_1.tok)(tokens_1.InstanceArrow), _1.AttributeName);
4768
4768
  const comp = (0, combi_1.seq)((0, combi_1.tok)(tokens_1.Dash), (0, combi_1.optPrio)(_1.ComponentName));
4769
- const chain = (0, combi_1.star)((0, combi_1.altPrio)(_1.Dereference, (0, _dynamic_access_1.dynAttr)(), attr, (0, _dynamic_access_1.dynComp)((0, combi_1.optPrio)(_1.FieldOffset), (0, combi_1.optPrio)(_1.FieldLength)), comp, _1.TableExpression));
4769
+ const chain = (0, combi_1.star)((0, combi_1.altPrio)(_1.Dereference, (0, _dynamic_access_1.dynAttr)(), attr, (0, _dynamic_access_1.dynComp)((0, combi_1.optPrio)(_1.FieldOffset), (0, combi_1.optPrio)(_1.FieldLength)), comp, (0, combi_1.tok)(tokens_1.AssociationName), _1.TableExpression));
4770
4770
  const clas = (0, combi_1.seq)(_1.ClassName, (0, combi_1.tok)(tokens_1.StaticArrow), _1.AttributeName);
4771
4771
  const start = (0, combi_1.altPrio)(clas, _1.SourceField, _1.SourceFieldSymbol);
4772
4772
  const after = (0, combi_1.altPrio)((0, combi_1.tok)(tokens_1.DashW), (0, combi_1.seq)((0, combi_1.optPrio)(_1.TableBody), (0, combi_1.optPrio)(_1.FieldOffset), (0, combi_1.optPrio)(_1.FieldLength)));
@@ -10486,7 +10486,7 @@ class TableExpression extends combi_1.Expression {
10486
10486
  const fields = (0, combi_1.plus)((0, combi_1.seq)((0, combi_1.altPrio)(_1.ComponentChainSimple, _1.Dynamic), "=", _1.Source));
10487
10487
  const key = (0, combi_1.seq)("KEY", _1.SimpleName);
10488
10488
  const index = (0, combi_1.seq)("INDEX", _1.Source);
10489
- const ret = (0, combi_1.seq)((0, combi_1.tok)(tokens_1.BracketLeftW), (0, combi_1.alt)(_1.Source, (0, combi_1.seq)((0, combi_1.optPrio)(key), (0, combi_1.opt)("COMPONENTS"), (0, combi_1.altPrio)(fields, index))), (0, combi_1.altPrio)((0, combi_1.tok)(tokens_1.WBracketRight), (0, combi_1.tok)(tokens_1.WBracketRightW)));
10489
+ const ret = (0, combi_1.seq)((0, combi_1.tok)(tokens_1.BracketLeftW), (0, combi_1.alt)((0, combi_1.seq)(_1.Source, fields), _1.Source, (0, combi_1.seq)((0, combi_1.optPrio)(key), (0, combi_1.opt)("COMPONENTS"), (0, combi_1.altPrio)(fields, index))), (0, combi_1.altPrio)((0, combi_1.tok)(tokens_1.WBracketRight), (0, combi_1.tok)(tokens_1.WBracketRightW)));
10490
10490
  return (0, combi_1.ver)(version_1.Release.v740sp02, ret, { also: combi_1.AlsoIn.OpenABAP });
10491
10491
  }
10492
10492
  }
@@ -25402,7 +25402,7 @@ BuiltIn.methods = {
25402
25402
  counter: BuiltIn.counter++,
25403
25403
  mandatory: {
25404
25404
  "val": basic_1.CLikeType.get(),
25405
- "format": basic_1.CLikeType.get(),
25405
+ "format": basic_1.SimpleType.get(),
25406
25406
  },
25407
25407
  return: basic_1.StringType.get(),
25408
25408
  release: version_1.Release.v702,
@@ -25594,17 +25594,17 @@ BuiltIn.methods = {
25594
25594
  "NMAX": {
25595
25595
  counter: BuiltIn.counter++,
25596
25596
  mandatory: {
25597
- "val1": basic_1.CLikeType.get(),
25598
- "val2": basic_1.CLikeType.get(),
25597
+ "val1": basic_1.SimpleType.get(),
25598
+ "val2": basic_1.SimpleType.get(),
25599
25599
  },
25600
25600
  optional: {
25601
- "val3": basic_1.CLikeType.get(),
25602
- "val4": basic_1.CLikeType.get(),
25603
- "val5": basic_1.CLikeType.get(),
25604
- "val6": basic_1.CLikeType.get(),
25605
- "val7": basic_1.CLikeType.get(),
25606
- "val8": basic_1.CLikeType.get(),
25607
- "val9": basic_1.CLikeType.get(),
25601
+ "val3": basic_1.SimpleType.get(),
25602
+ "val4": basic_1.SimpleType.get(),
25603
+ "val5": basic_1.SimpleType.get(),
25604
+ "val6": basic_1.SimpleType.get(),
25605
+ "val7": basic_1.SimpleType.get(),
25606
+ "val8": basic_1.SimpleType.get(),
25607
+ "val9": basic_1.SimpleType.get(),
25608
25608
  },
25609
25609
  return: basic_1.IntegerType.get(),
25610
25610
  release: version_1.Release.v702,
@@ -25612,17 +25612,17 @@ BuiltIn.methods = {
25612
25612
  "NMIN": {
25613
25613
  counter: BuiltIn.counter++,
25614
25614
  mandatory: {
25615
- "val1": basic_1.CLikeType.get(),
25616
- "val2": basic_1.CLikeType.get(),
25615
+ "val1": basic_1.SimpleType.get(),
25616
+ "val2": basic_1.SimpleType.get(),
25617
25617
  },
25618
25618
  optional: {
25619
- "val3": basic_1.CLikeType.get(),
25620
- "val4": basic_1.CLikeType.get(),
25621
- "val5": basic_1.CLikeType.get(),
25622
- "val6": basic_1.CLikeType.get(),
25623
- "val7": basic_1.CLikeType.get(),
25624
- "val8": basic_1.CLikeType.get(),
25625
- "val9": basic_1.CLikeType.get(),
25619
+ "val3": basic_1.SimpleType.get(),
25620
+ "val4": basic_1.SimpleType.get(),
25621
+ "val5": basic_1.SimpleType.get(),
25622
+ "val6": basic_1.SimpleType.get(),
25623
+ "val7": basic_1.SimpleType.get(),
25624
+ "val8": basic_1.SimpleType.get(),
25625
+ "val9": basic_1.SimpleType.get(),
25626
25626
  },
25627
25627
  return: basic_1.IntegerType.get(),
25628
25628
  release: version_1.Release.v702,
@@ -25638,7 +25638,7 @@ BuiltIn.methods = {
25638
25638
  counter: BuiltIn.counter++,
25639
25639
  mandatory: {
25640
25640
  "val": basic_1.CLikeType.get(),
25641
- "occ": basic_1.CLikeType.get(),
25641
+ "occ": basic_1.SimpleType.get(),
25642
25642
  },
25643
25643
  return: basic_1.StringType.get(),
25644
25644
  release: version_1.Release.v702,
@@ -27365,6 +27365,7 @@ class TypeUtils {
27365
27365
  || type instanceof basic_1.NumericType
27366
27366
  || type instanceof basic_1.DateType
27367
27367
  || type instanceof basic_1.TimeType
27368
+ || type instanceof cgeneric_type_1.CGenericType
27368
27369
  || type instanceof basic_1.CLikeType
27369
27370
  || type instanceof basic_1.AnyType
27370
27371
  || type instanceof basic_1.UnknownType
@@ -27622,6 +27623,9 @@ class TypeUtils {
27622
27623
  if (calculated) {
27623
27624
  return this.isAssignable(source, target);
27624
27625
  }
27626
+ if (target instanceof basic_1.CLikeType) {
27627
+ return this.isCharLikeStrict(source);
27628
+ }
27625
27629
  if (target instanceof basic_1.PGenericType) {
27626
27630
  return source instanceof basic_1.PackedType
27627
27631
  || source instanceof basic_1.PGenericType
@@ -41537,9 +41541,13 @@ class InsertInternal {
41537
41541
  && node.findDirectTokenByText("LINES") === undefined) {
41538
41542
  targetType = targetType.getRowType();
41539
41543
  }
41540
- let source = node.findDirectExpression(Expressions.SimpleSource4);
41541
- if (source === undefined) {
41542
- source = node.findDirectExpression(Expressions.Source);
41544
+ const initial = node.findDirectTokenByText("INITIAL") !== undefined;
41545
+ let source;
41546
+ if (initial === false) {
41547
+ source = node.findDirectExpression(Expressions.SimpleSource4);
41548
+ if (source === undefined) {
41549
+ source = node.findDirectExpression(Expressions.Source);
41550
+ }
41543
41551
  }
41544
41552
  const sourceType = source ? source_1.Source.runSyntax(source, input, targetType) : targetType;
41545
41553
  if (targetType === undefined
@@ -41561,7 +41569,7 @@ class InsertInternal {
41561
41569
  fstarget_1.FSTarget.runSyntax(afterAssigning, input, sourceType);
41562
41570
  }
41563
41571
  }
41564
- if (node.findDirectTokenByText("INITIAL") === undefined) {
41572
+ if (initial === false) {
41565
41573
  let error = false;
41566
41574
  if (sourceType instanceof basic_1.IntegerType && targetType instanceof basic_1.Integer8Type) {
41567
41575
  error = true;
@@ -46714,6 +46722,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
46714
46722
  exports.ClassData = void 0;
46715
46723
  const Expressions = __importStar(__webpack_require__(/*! ../../2_statements/expressions */ "../core/build/src/abap/2_statements/expressions/index.js"));
46716
46724
  const Statements = __importStar(__webpack_require__(/*! ../../2_statements/statements */ "../core/build/src/abap/2_statements/statements/index.js"));
46725
+ const Structures = __importStar(__webpack_require__(/*! ../../3_structures/structures */ "../core/build/src/abap/3_structures/structures/index.js"));
46717
46726
  const nodes_1 = __webpack_require__(/*! ../../nodes */ "../core/build/src/abap/nodes/index.js");
46718
46727
  const _typed_identifier_1 = __webpack_require__(/*! ../../types/_typed_identifier */ "../core/build/src/abap/types/_typed_identifier.js");
46719
46728
  const Basic = __importStar(__webpack_require__(/*! ../../types/basic */ "../core/build/src/abap/types/basic/index.js"));
@@ -46732,7 +46741,14 @@ class ClassData {
46732
46741
  values[found.getName()] = found.getValue();
46733
46742
  }
46734
46743
  }
46735
- // todo, nested structures and INCLUDES
46744
+ else if (c instanceof nodes_1.StructureNode && ctyp instanceof Structures.ClassData) {
46745
+ const found = new ClassData().runSyntax(c, input);
46746
+ if (found) {
46747
+ components.push({ name: found.getName(), type: found.getType() });
46748
+ values[found.getName()] = found.getValue();
46749
+ }
46750
+ }
46751
+ // todo, INCLUDES
46736
46752
  }
46737
46753
  return new _typed_identifier_1.TypedIdentifier(name, input.filename, new Basic.StructureType(components), ["static" /* IdentifierMeta.Static */], values);
46738
46754
  }
@@ -50571,6 +50587,12 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
50571
50587
  exports.SimpleType = void 0;
50572
50588
  const _abstract_type_1 = __webpack_require__(/*! ./_abstract_type */ "../core/build/src/abap/types/basic/_abstract_type.js");
50573
50589
  class SimpleType extends _abstract_type_1.AbstractType {
50590
+ static get() {
50591
+ return this.singleton;
50592
+ }
50593
+ constructor() {
50594
+ super();
50595
+ }
50574
50596
  toText() {
50575
50597
  return "```simple```";
50576
50598
  }
@@ -50588,6 +50610,7 @@ class SimpleType extends _abstract_type_1.AbstractType {
50588
50610
  }
50589
50611
  }
50590
50612
  exports.SimpleType = SimpleType;
50613
+ SimpleType.singleton = new SimpleType();
50591
50614
  //# sourceMappingURL=simple_type.js.map
50592
50615
 
50593
50616
  /***/ },
@@ -55417,7 +55440,7 @@ class DDIC {
55417
55440
  case "ANY":
55418
55441
  return Types.AnyType.get({ qualifiedName: qualifiedName });
55419
55442
  case "SIMPLE":
55420
- return new Types.SimpleType({ qualifiedName: qualifiedName });
55443
+ return Types.SimpleType.get();
55421
55444
  case "%_C_POINTER":
55422
55445
  return new Types.HexType(8, qualifiedName);
55423
55446
  case "TABLE":
@@ -69437,7 +69460,7 @@ class Registry {
69437
69460
  }
69438
69461
  static abaplintVersion() {
69439
69462
  // magic, see build script "version.js"
69440
- return "2.120.15";
69463
+ return "2.120.17";
69441
69464
  }
69442
69465
  getDDICReferences() {
69443
69466
  return this.ddicReferences;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/cli",
3
- "version": "2.120.15",
3
+ "version": "2.120.17",
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.15",
42
+ "@abaplint/core": "^2.120.17",
43
43
  "@types/chai": "^4.3.20",
44
44
  "@types/minimist": "^1.2.5",
45
45
  "@types/mocha": "^10.0.10",