@abaplint/transpiler 2.5.49 → 2.5.51

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.
@@ -102,7 +102,11 @@ class SQLCondTranspiler {
102
102
  ret += "'\" + " + name + ".get() + \"'";
103
103
  }
104
104
  else {
105
- ret += source.concatTokens();
105
+ let concat = source.concatTokens();
106
+ if (concat.includes("~") && concat.split("~")[0].includes("/")) {
107
+ concat = "'" + concat.replace("~", "'~");
108
+ }
109
+ ret += concat;
106
110
  }
107
111
  }
108
112
  else {
@@ -2,9 +2,19 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SQLSourceTranspiler = void 0;
4
4
  const abaplint = require("@abaplint/core");
5
+ const chunk_1 = require("../chunk");
5
6
  class SQLSourceTranspiler {
6
7
  transpile(node, traversal) {
7
8
  let s = node.findDirectExpression(abaplint.Expressions.Source);
9
+ if ((s === null || s === void 0 ? void 0 : s.getChildren().length) === 1 && s.getChildren()[0].get() instanceof abaplint.Expressions.SQLAliasField) {
10
+ const chunk = new chunk_1.Chunk();
11
+ let concat = s.concatTokens();
12
+ if (concat.includes("~") && concat.split("~")[0].includes("/")) {
13
+ concat = "'" + concat.replace("~", "'~");
14
+ }
15
+ chunk.appendString(concat);
16
+ return chunk;
17
+ }
8
18
  if (s === undefined) {
9
19
  s = node.findDirectExpression(abaplint.Expressions.SimpleSource3);
10
20
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/transpiler",
3
- "version": "2.5.49",
3
+ "version": "2.5.51",
4
4
  "description": "Transpiler",
5
5
  "main": "build/src/index.js",
6
6
  "typings": "build/src/index.d.ts",