@abaplint/cli 2.113.171 → 2.113.173

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 +38 -13
  2. package/package.json +3 -3
package/build/cli.js CHANGED
@@ -4277,7 +4277,7 @@ class Cast extends combi_1.Expression {
4277
4277
  getRunnable() {
4278
4278
  const rparen = (0, combi_1.altPrio)((0, combi_1.tok)(tokens_1.WParenRightW), (0, combi_1.tok)(tokens_1.WParenRight));
4279
4279
  const cast = (0, combi_1.seq)("CAST", _1.TypeNameOrInfer, (0, combi_1.tok)(tokens_1.ParenLeftW), (0, combi_1.optPrio)(let_1.Let), _1.Source, rparen);
4280
- return (0, combi_1.ver)(version_1.Version.v740sp02, cast);
4280
+ return (0, combi_1.ver)(version_1.Version.v740sp02, cast, version_1.Version.OpenABAP);
4281
4281
  }
4282
4282
  }
4283
4283
  exports.Cast = Cast;
@@ -4853,16 +4853,14 @@ exports.ConvBody = ConvBody;
4853
4853
  Object.defineProperty(exports, "__esModule", ({ value: true }));
4854
4854
  exports.CorrespondingBody = void 0;
4855
4855
  const combi_1 = __webpack_require__(/*! ../combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
4856
- const tokens_1 = __webpack_require__(/*! ../../1_lexer/tokens */ "./node_modules/@abaplint/core/build/src/abap/1_lexer/tokens/index.js");
4857
4856
  const _1 = __webpack_require__(/*! . */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js");
4858
4857
  const version_1 = __webpack_require__(/*! ../../../version */ "./node_modules/@abaplint/core/build/src/version.js");
4859
4858
  const component_chain_1 = __webpack_require__(/*! ./component_chain */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/component_chain.js");
4860
4859
  class CorrespondingBody extends combi_1.Expression {
4861
4860
  getRunnable() {
4862
4861
  const mapping = (0, combi_1.seq)("MAPPING", (0, combi_1.plus)((0, combi_1.seq)(_1.ComponentName, "=", component_chain_1.ComponentChain)));
4863
- const baseParen = (0, combi_1.seq)("BASE", (0, combi_1.tok)(tokens_1.WParenLeftW), _1.Source, (0, combi_1.tok)(tokens_1.WParenRightW));
4864
4862
  const discarding = (0, combi_1.ver)(version_1.Version.v751, "DISCARDING DUPLICATES");
4865
- return (0, combi_1.seq)((0, combi_1.optPrio)("DEEP"), (0, combi_1.optPrio)(baseParen), _1.Source, (0, combi_1.optPrio)(discarding), (0, combi_1.optPrio)(mapping), (0, combi_1.optPrio)("CHANGING CONTROL"), (0, combi_1.optPrio)((0, combi_1.seq)("MAPPING FROM ENTITY", (0, combi_1.optPrio)("USING CONTROL"))), // todo, version something?
4863
+ return (0, combi_1.seq)((0, combi_1.optPrio)("DEEP"), (0, combi_1.optPrio)(_1.CorrespondingBodyBase), _1.Source, (0, combi_1.optPrio)(discarding), (0, combi_1.optPrio)(mapping), (0, combi_1.optPrio)("CHANGING CONTROL"), (0, combi_1.optPrio)((0, combi_1.seq)("MAPPING FROM ENTITY", (0, combi_1.optPrio)("USING CONTROL"))), // todo, version something?
4866
4864
  (0, combi_1.optPrio)((0, combi_1.seq)("EXCEPT", (0, combi_1.alt)((0, combi_1.plus)(_1.Field), "*"))));
4867
4865
  }
4868
4866
  }
@@ -4871,6 +4869,29 @@ exports.CorrespondingBody = CorrespondingBody;
4871
4869
 
4872
4870
  /***/ }),
4873
4871
 
4872
+ /***/ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/corresponding_body_base.js":
4873
+ /*!********************************************************************************************************!*\
4874
+ !*** ./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/corresponding_body_base.js ***!
4875
+ \********************************************************************************************************/
4876
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
4877
+
4878
+ "use strict";
4879
+
4880
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
4881
+ exports.CorrespondingBodyBase = void 0;
4882
+ const combi_1 = __webpack_require__(/*! ../combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
4883
+ const tokens_1 = __webpack_require__(/*! ../../1_lexer/tokens */ "./node_modules/@abaplint/core/build/src/abap/1_lexer/tokens/index.js");
4884
+ const _1 = __webpack_require__(/*! . */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js");
4885
+ class CorrespondingBodyBase extends combi_1.Expression {
4886
+ getRunnable() {
4887
+ return (0, combi_1.seq)("BASE", (0, combi_1.tok)(tokens_1.WParenLeftW), _1.Source, (0, combi_1.tok)(tokens_1.WParenRightW));
4888
+ }
4889
+ }
4890
+ exports.CorrespondingBodyBase = CorrespondingBodyBase;
4891
+ //# sourceMappingURL=corresponding_body_base.js.map
4892
+
4893
+ /***/ }),
4894
+
4874
4895
  /***/ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/data_definition.js":
4875
4896
  /*!************************************************************************************************!*\
4876
4897
  !*** ./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/data_definition.js ***!
@@ -5854,6 +5875,7 @@ __exportStar(__webpack_require__(/*! ./component_chain */ "./node_modules/@abapl
5854
5875
  __exportStar(__webpack_require__(/*! ./component_compare_simple */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/component_compare_simple.js"), exports);
5855
5876
  __exportStar(__webpack_require__(/*! ./value_base */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/value_base.js"), exports);
5856
5877
  __exportStar(__webpack_require__(/*! ./component_compare_single */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/component_compare_single.js"), exports);
5878
+ __exportStar(__webpack_require__(/*! ./corresponding_body_base */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/corresponding_body_base.js"), exports);
5857
5879
  __exportStar(__webpack_require__(/*! ./component_compare */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/component_compare.js"), exports);
5858
5880
  __exportStar(__webpack_require__(/*! ./component_cond_sub */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/component_cond_sub.js"), exports);
5859
5881
  __exportStar(__webpack_require__(/*! ./component_cond */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/component_cond.js"), exports);
@@ -7893,7 +7915,7 @@ class Source extends combi_1.Expression {
7893
7915
  const bool = (0, combi_1.seq)((0, combi_1.altPrio)((0, combi_1.ver)(version_1.Version.v702, (0, combi_1.regex)(/^BOOLC$/i), version_1.Version.OpenABAP), (0, combi_1.ver)(version_1.Version.v740sp08, (0, combi_1.regex)(/^XSDBOOL$/i), version_1.Version.OpenABAP)), (0, combi_1.tok)(tokens_1.ParenLeftW), _1.Cond, ")");
7894
7916
  const prefix = (0, combi_1.altPrio)((0, combi_1.tok)(tokens_1.WPlus), "BIT-NOT");
7895
7917
  const old = (0, combi_1.seq)((0, combi_1.optPrio)(prefix), (0, combi_1.altPrio)(_1.Constant, _1.StringTemplate, text_element_1.TextElement, bool, method, (0, combi_1.seq)(_1.FieldChain, deref), paren), (0, combi_1.optPrio)(after));
7896
- const corr = (0, combi_1.ver)(version_1.Version.v740sp05, (0, combi_1.seq)("CORRESPONDING", _1.TypeNameOrInfer, (0, combi_1.tok)(tokens_1.ParenLeftW), _1.CorrespondingBody, rparen, (0, combi_1.optPrio)(after)));
7918
+ const corr = (0, combi_1.ver)(version_1.Version.v740sp05, (0, combi_1.seq)("CORRESPONDING", _1.TypeNameOrInfer, (0, combi_1.tok)(tokens_1.ParenLeftW), _1.CorrespondingBody, rparen, (0, combi_1.optPrio)(after)), version_1.Version.OpenABAP);
7897
7919
  const conv = (0, combi_1.ver)(version_1.Version.v740sp02, (0, combi_1.seq)("CONV", _1.TypeNameOrInfer, lparenNoSpace, _1.ConvBody, rparenNoSpace, (0, combi_1.optPrio)(after)), version_1.Version.OpenABAP);
7898
7920
  const swit = (0, combi_1.ver)(version_1.Version.v740sp02, (0, combi_1.seq)("SWITCH", _1.TypeNameOrInfer, (0, combi_1.tok)(tokens_1.ParenLeftW), _1.SwitchBody, rparenNoSpace, (0, combi_1.optPrio)(after)));
7899
7921
  const value = (0, combi_1.ver)(version_1.Version.v740sp02, (0, combi_1.seq)("VALUE", _1.TypeNameOrInfer, (0, combi_1.tok)(tokens_1.ParenLeftW), _1.ValueBody, rparenNoSpace, (0, combi_1.optPrio)(after)), version_1.Version.OpenABAP);
@@ -27493,9 +27515,11 @@ class NewObject {
27493
27515
  if (ret === undefined) {
27494
27516
  const objDefinition = input.scope.findObjectDefinition(typeName);
27495
27517
  if (objDefinition) {
27518
+ const objref = new basic_1.ObjectReferenceType(objDefinition);
27519
+ const tid = new _typed_identifier_1.TypedIdentifier(typeToken, input.filename, objref);
27520
+ input.scope.addReference(typeToken, tid, _reference_1.ReferenceType.InferredType, input.filename);
27496
27521
  input.scope.addReference(typeToken, objDefinition, _reference_1.ReferenceType.ObjectOrientedReference, input.filename);
27497
27522
  input.scope.addReference(typeToken, objDefinition, _reference_1.ReferenceType.ConstructorReference, input.filename, { ooName: objDefinition.getName() });
27498
- const objref = new basic_1.ObjectReferenceType(objDefinition);
27499
27523
  const clas = input.scope.findClassDefinition(objref.getIdentifierName());
27500
27524
  if ((clas === null || clas === void 0 ? void 0 : clas.isAbstract()) === true) {
27501
27525
  const message = clas.getName() + " is abstract, cannot be instantiated";
@@ -28346,12 +28370,12 @@ class Source {
28346
28370
  const basic = new basic_types_1.BasicTypes(input);
28347
28371
  const typeExpression = node.findDirectExpression(Expressions.TypeNameOrInfer);
28348
28372
  const typeToken = typeExpression === null || typeExpression === void 0 ? void 0 : typeExpression.getFirstToken();
28349
- const typeName = typeToken === null || typeToken === void 0 ? void 0 : typeToken.getStr();
28373
+ // const typeName = typeToken?.getStr();
28350
28374
  /*
28351
28375
  console.dir(inferredType);
28352
28376
  console.dir(typeToken);
28353
28377
  */
28354
- if (typeName === "#" && inferredType && typeToken) {
28378
+ if (inferredType && typeToken) {
28355
28379
  const found = basic.lookupQualifiedName(inferredType.getQualifiedName());
28356
28380
  if (found) {
28357
28381
  const tid = new _typed_identifier_1.TypedIdentifier(typeToken, input.filename, inferredType);
@@ -54822,7 +54846,7 @@ class Registry {
54822
54846
  }
54823
54847
  static abaplintVersion() {
54824
54848
  // magic, see build script "version.sh"
54825
- return "2.113.171";
54849
+ return "2.113.173";
54826
54850
  }
54827
54851
  getDDICReferences() {
54828
54852
  return this.ddicReferences;
@@ -61222,7 +61246,7 @@ ${indentation}${uniqueName2}->if_t100_message~t100key = ${uniqueName1}.\n`;
61222
61246
  return issue_1.Issue.atToken(lowFile, high.getFirstToken(), "Downport, call function parameter", this.getMetadata().key, this.conf.severity, fix);
61223
61247
  }
61224
61248
  downportCorrespondingSimple(high, lowFile) {
61225
- var _a, _b;
61249
+ var _a;
61226
61250
  if (!(high.get() instanceof Statements.Move)
61227
61251
  || high.getChildren().length !== 4
61228
61252
  || high.getChildren()[2].getFirstToken().getStr().toUpperCase() !== "CORRESPONDING") {
@@ -61240,9 +61264,10 @@ ${indentation}${uniqueName2}->if_t100_message~t100key = ${uniqueName1}.\n`;
61240
61264
  const fix = edit_helper_1.EditHelper.replaceRange(lowFile, start, end, code);
61241
61265
  return issue_1.Issue.atToken(lowFile, high.getFirstToken(), "Downport, simple CORRESPONDING move", this.getMetadata().key, this.conf.severity, fix);
61242
61266
  }
61243
- else if ((sourceRef === null || sourceRef === void 0 ? void 0 : sourceRef.getChildren().length) === 5 && ((_b = sourceRef.getFirstChild()) === null || _b === void 0 ? void 0 : _b.concatTokens().toUpperCase()) === "BASE") {
61244
- let code = `${target.concatTokens()} = ${sourceRef.getChildren()[2].concatTokens()}.\n`;
61245
- code += `MOVE-CORRESPONDING ${sourceRef.getChildren()[4].concatTokens()} TO ${target.concatTokens()}`;
61267
+ else if ((sourceRef === null || sourceRef === void 0 ? void 0 : sourceRef.getChildren().length) === 2 && sourceRef.findDirectExpression(Expressions.CorrespondingBodyBase) !== undefined) {
61268
+ const base = sourceRef.findDirectExpression(Expressions.CorrespondingBodyBase);
61269
+ let code = `${target.concatTokens()} = ${base.getChildren()[2].concatTokens()}.\n`;
61270
+ code += `MOVE-CORRESPONDING ${sourceRef.getChildren()[1].concatTokens()} TO ${target.concatTokens()}`;
61246
61271
  const start = high.getFirstToken().getStart();
61247
61272
  const end = high.getLastToken().getStart();
61248
61273
  const fix = edit_helper_1.EditHelper.replaceRange(lowFile, start, end, code);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/cli",
3
- "version": "2.113.171",
3
+ "version": "2.113.173",
4
4
  "description": "abaplint - Command Line Interface",
5
5
  "funding": "https://github.com/sponsors/larshp",
6
6
  "bin": {
@@ -38,7 +38,7 @@
38
38
  },
39
39
  "homepage": "https://abaplint.org",
40
40
  "devDependencies": {
41
- "@abaplint/core": "^2.113.171",
41
+ "@abaplint/core": "^2.113.173",
42
42
  "@types/chai": "^4.3.20",
43
43
  "@types/minimist": "^1.2.5",
44
44
  "@types/mocha": "^10.0.10",
@@ -55,7 +55,7 @@
55
55
  "mocha": "^11.7.1",
56
56
  "progress": "^2.0.3",
57
57
  "typescript": "^5.9.2",
58
- "webpack": "^5.101.0",
58
+ "webpack": "^5.101.1",
59
59
  "webpack-cli": "^6.0.1",
60
60
  "xml-js": "^1.6.11"
61
61
  }