@abaplint/transpiler-cli 2.7.77 → 2.7.78

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/bundle.js +22 -10
  2. package/package.json +4 -4
package/build/bundle.js CHANGED
@@ -6360,7 +6360,7 @@ exports.SQLCompareOperator = void 0;
6360
6360
  const combi_1 = __webpack_require__(/*! ../combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
6361
6361
  class SQLCompareOperator extends combi_1.Expression {
6362
6362
  getRunnable() {
6363
- const operator = (0, combi_1.altPrio)("=", "<>", "<", ">", "<=", ">=", "EQ", "NE", "GE", "GT", "LT", "LE", "><", "=>");
6363
+ const operator = (0, combi_1.altPrio)("=", "<>", "<", ">", "<=", ">=", "EQ", "NE", "GE", "GT", "LT", "LE", "><", "=>", "=<");
6364
6364
  return operator;
6365
6365
  }
6366
6366
  }
@@ -13058,7 +13058,9 @@ class MoveCorresponding {
13058
13058
  getMatcher() {
13059
13059
  const keeping = (0, combi_1.ver)(version_1.Version.v740sp05, "KEEPING TARGET LINES");
13060
13060
  const expanding = (0, combi_1.ver)(version_1.Version.v740sp05, "EXPANDING NESTED TABLES");
13061
- const move = (0, combi_1.seq)("MOVE-CORRESPONDING", (0, combi_1.optPrio)("EXACT"), expressions_1.Source, "TO", expressions_1.Target, (0, combi_1.optPrio)(expanding), (0, combi_1.optPrio)(keeping));
13061
+ const move = (0, combi_1.seq)("MOVE-CORRESPONDING", (0, combi_1.optPrio)("EXACT"), expressions_1.Source, "TO",
13062
+ // inline defintions not possible in this position,
13063
+ expressions_1.SimpleTarget, (0, combi_1.optPrio)(expanding), (0, combi_1.optPrio)(keeping));
13062
13064
  return move;
13063
13065
  }
13064
13066
  }
@@ -23223,6 +23225,9 @@ class InlineData {
23223
23225
  var _a;
23224
23226
  const token = (_a = node.findFirstExpression(Expressions.TargetField)) === null || _a === void 0 ? void 0 : _a.getFirstToken();
23225
23227
  if (token && type) {
23228
+ if (type instanceof basic_1.CSequenceType) {
23229
+ type = basic_1.StringType.get();
23230
+ }
23226
23231
  const identifier = new _typed_identifier_1.TypedIdentifier(token, filename, type, ["inline" /* IdentifierMeta.InlineDefinition */]);
23227
23232
  scope.addIdentifier(identifier);
23228
23233
  scope.addReference(token, identifier, _reference_1.ReferenceType.DataWriteReference, filename);
@@ -27336,7 +27341,7 @@ class Data {
27336
27341
  const id = new data_definition_1.DataDefinition().runSyntax(dd, scope, filename);
27337
27342
  if ((id === null || id === void 0 ? void 0 : id.getType().isGeneric()) === true
27338
27343
  && (id === null || id === void 0 ? void 0 : id.getType().containsVoid()) === false) {
27339
- throw new Error("DATA definition cannot be generic, " + name);
27344
+ throw new Error("DATA definition cannot be generic, " + (name === null || name === void 0 ? void 0 : name.concatTokens()));
27340
27345
  }
27341
27346
  return id;
27342
27347
  }
@@ -28959,7 +28964,7 @@ const basic_1 = __webpack_require__(/*! ../../types/basic */ "./node_modules/@ab
28959
28964
  class MoveCorresponding {
28960
28965
  runSyntax(node, scope, filename) {
28961
28966
  const s = node.findDirectExpression(Expressions.Source);
28962
- const t = node.findDirectExpression(Expressions.Target);
28967
+ const t = node.findDirectExpression(Expressions.SimpleTarget);
28963
28968
  if (s === undefined || t === undefined) {
28964
28969
  throw new Error("MoveCorresponding, source or target not found");
28965
28970
  }
@@ -47786,7 +47791,7 @@ class Registry {
47786
47791
  }
47787
47792
  static abaplintVersion() {
47788
47793
  // magic, see build script "version.sh"
47789
- return "2.102.25";
47794
+ return "2.102.27";
47790
47795
  }
47791
47796
  getDDICReferences() {
47792
47797
  return this.ddicReferences;
@@ -52685,7 +52690,7 @@ Make sure to test the downported code, it might not always be completely correct
52685
52690
  }
52686
52691
  }
52687
52692
  }
52688
- if (ret.length === 0 && lowFile.getRaw().includes(" xsdbool( ")) {
52693
+ if (ret.length === 0 && lowFile.getRaw().includes(" xsdbool(")) {
52689
52694
  for (let i = 0; i < lowStatements.length; i++) {
52690
52695
  const high = highStatements[i];
52691
52696
  const issue = this.replaceXsdBool(high, lowFile, highSyntax);
@@ -52869,7 +52874,7 @@ Make sure to test the downported code, it might not always be completely correct
52869
52874
  if (found) {
52870
52875
  return found;
52871
52876
  }
52872
- found = this.outlineDataSimple(high, lowFile);
52877
+ found = this.outlineDataSimple(high, lowFile, highSyntax);
52873
52878
  if (found) {
52874
52879
  return found;
52875
52880
  }
@@ -53413,8 +53418,7 @@ ${indentation}CATCH ${className} INTO ${targetName}.`;
53413
53418
  const fix = edit_helper_1.EditHelper.merge(fix2, fix1);
53414
53419
  return issue_1.Issue.atToken(lowFile, node.getFirstToken(), "Outline DATA", this.getMetadata().key, this.conf.severity, fix);
53415
53420
  }
53416
- outlineDataSimple(node, lowFile) {
53417
- // outlines "DATA(ls_msg) = temp1.", note that this does not need to look at types
53421
+ outlineDataSimple(node, lowFile, highSyntax) {
53418
53422
  var _a, _b, _c;
53419
53423
  if (!(node.get() instanceof Statements.Move)) {
53420
53424
  return undefined;
@@ -53453,6 +53457,13 @@ ${indentation}CATCH ${className} INTO ${targetName}.`;
53453
53457
  }
53454
53458
  }
53455
53459
  else {
53460
+ const spag = highSyntax.spaghetti.lookupPosition(source.getFirstToken().getStart(), lowFile.getFilename());
53461
+ if (spag) {
53462
+ const found = spag.findVariable(source.concatTokens());
53463
+ if (found && found.getType().isGeneric() === true) {
53464
+ return undefined;
53465
+ }
53466
+ }
53456
53467
  type = source.concatTokens();
53457
53468
  }
53458
53469
  const targetName = (_c = target.findFirstExpression(Expressions.TargetField)) === null || _c === void 0 ? void 0 : _c.concatTokens();
@@ -77298,9 +77309,10 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
77298
77309
  exports.MoveCorrespondingTranspiler = void 0;
77299
77310
  const abaplint = __webpack_require__(/*! @abaplint/core */ "./node_modules/@abaplint/core/build/src/index.js");
77300
77311
  const chunk_1 = __webpack_require__(/*! ../chunk */ "./node_modules/@abaplint/transpiler/build/src/chunk.js");
77312
+ const expressions_1 = __webpack_require__(/*! ../expressions */ "./node_modules/@abaplint/transpiler/build/src/expressions/index.js");
77301
77313
  class MoveCorrespondingTranspiler {
77302
77314
  transpile(node, traversal) {
77303
- const target = traversal.traverse(node.findDirectExpression(abaplint.Expressions.Target));
77315
+ const target = new expressions_1.TargetTranspiler().transpile(node.findDirectExpression(abaplint.Expressions.SimpleTarget), traversal);
77304
77316
  const source = traversal.traverse(node.findDirectExpression(abaplint.Expressions.Source));
77305
77317
  return new chunk_1.Chunk().append("abap.statements.moveCorresponding(", node, traversal)
77306
77318
  .join([source, target])
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/transpiler-cli",
3
- "version": "2.7.77",
3
+ "version": "2.7.78",
4
4
  "description": "Transpiler - Command Line Interface",
5
5
  "funding": "https://github.com/sponsors/larshp",
6
6
  "bin": {
@@ -26,12 +26,12 @@
26
26
  "author": "abaplint",
27
27
  "license": "MIT",
28
28
  "devDependencies": {
29
- "@abaplint/transpiler": "^2.7.77",
29
+ "@abaplint/transpiler": "^2.7.78",
30
30
  "@types/glob": "^7.2.0",
31
31
  "glob": "=7.2.0",
32
32
  "@types/progress": "^2.0.5",
33
- "@types/node": "^20.5.1",
34
- "@abaplint/core": "^2.102.25",
33
+ "@types/node": "^20.5.3",
34
+ "@abaplint/core": "^2.102.27",
35
35
  "progress": "^2.0.3",
36
36
  "webpack": "^5.88.2",
37
37
  "webpack-cli": "^5.1.4",