@abaplint/transpiler 2.7.76 → 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.
@@ -43,10 +43,13 @@ class CompareTranspiler {
43
43
  return new chunk_1.Chunk().appendString(pre + "INPUT && INPUT." + concat.replace(" IS NOT SUPPLIED", "").toLowerCase() + " === undefined");
44
44
  }
45
45
  if (concat.endsWith(" IS REQUESTED")) {
46
- return new chunk_1.Chunk().appendString(pre + "INPUT && INPUT." + concat.replace(" IS REQUESTED", "").toLowerCase());
46
+ const field = concat.replace(" IS REQUESTED", "").toLowerCase();
47
+ // yea, for function modules the naming is revereed, using "importing"
48
+ return new chunk_1.Chunk().appendString(pre + "INPUT && (INPUT." + field + " || INPUT.importing." + field + ")");
47
49
  }
48
50
  else if (concat.endsWith(" IS NOT REQUESTED")) {
49
- return new chunk_1.Chunk().appendString(pre + "INPUT && INPUT." + concat.replace(" IS NOT REQUESTED", "").toLowerCase() + " === undefined");
51
+ const field = concat.replace(" IS NOT REQUESTED", "").toLowerCase();
52
+ return new chunk_1.Chunk().appendString(pre + "INPUT && INPUT." + field + " === undefined && INPUT.importing." + field + " === undefined");
50
53
  }
51
54
  if (concat.startsWith("NOT ") || concat.includes(" IS NOT INSTANCE OF ")) {
52
55
  const cname = (_a = node.findDirectExpression(core_1.Expressions.ClassName)) === null || _a === void 0 ? void 0 : _a.concatTokens();
@@ -3,9 +3,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.MoveCorrespondingTranspiler = void 0;
4
4
  const abaplint = require("@abaplint/core");
5
5
  const chunk_1 = require("../chunk");
6
+ const expressions_1 = require("../expressions");
6
7
  class MoveCorrespondingTranspiler {
7
8
  transpile(node, traversal) {
8
- const target = traversal.traverse(node.findDirectExpression(abaplint.Expressions.Target));
9
+ const target = new expressions_1.TargetTranspiler().transpile(node.findDirectExpression(abaplint.Expressions.SimpleTarget), traversal);
9
10
  const source = traversal.traverse(node.findDirectExpression(abaplint.Expressions.Source));
10
11
  return new chunk_1.Chunk().append("abap.statements.moveCorresponding(", node, traversal)
11
12
  .join([source, target])
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/transpiler",
3
- "version": "2.7.76",
3
+ "version": "2.7.78",
4
4
  "description": "Transpiler",
5
5
  "main": "build/src/index.js",
6
6
  "typings": "build/src/index.d.ts",
@@ -29,7 +29,7 @@
29
29
  "author": "abaplint",
30
30
  "license": "MIT",
31
31
  "dependencies": {
32
- "@abaplint/core": "^2.102.25",
32
+ "@abaplint/core": "^2.102.27",
33
33
  "source-map": "^0.7.4"
34
34
  },
35
35
  "devDependencies": {