@abaplint/transpiler 2.7.73 → 2.7.74

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.
@@ -12,32 +12,23 @@ class DatabaseTableTranspiler {
12
12
  const concat = node.concatTokens();
13
13
  let val = "";
14
14
  if (this.prefix === true) {
15
- val = `" + abap.dbo.schemaPrefix + "\\"" + abap.dbo.tablePrefix + "`;
16
- }
17
- else {
18
- val = "\"";
15
+ val = `abap.buildDbTableName(`;
19
16
  }
20
17
  const dyn = node.findDirectExpression(abaplint.Expressions.Dynamic);
21
18
  if (dyn) {
22
19
  if (concat.startsWith("('")) {
23
- val += concat.substring(2, concat.length - 2).toLowerCase();
20
+ val += `"` + concat.substring(2, concat.length - 2).toLowerCase() + `"`;
24
21
  }
25
22
  else {
26
23
  const foo = traversal.traverse(dyn.findDirectExpression(abaplint.Expressions.FieldChain));
27
- if (this.prefix === false) {
28
- return foo;
29
- }
30
- val += "\" + " + foo.getCode() + ".get().trimEnd().toLowerCase() + \"";
24
+ val += foo.getCode() + ".get().trimEnd().toLowerCase()";
31
25
  }
32
26
  }
33
27
  else {
34
- val += concat.toLowerCase();
28
+ val += `"` + concat.toLowerCase() + `"`;
35
29
  }
36
30
  if (this.prefix === true) {
37
- val += "\\\"";
38
- }
39
- else {
40
- val += "\"";
31
+ val += `)`;
41
32
  }
42
33
  return chunk.appendString(val);
43
34
  }
@@ -14,7 +14,7 @@ class SQLFromSourceTranspiler {
14
14
  chunk.appendString(concat + " ");
15
15
  }
16
16
  else if (c.get() instanceof abaplint.Expressions.DatabaseTable) {
17
- chunk.appendChunk(new database_table_1.DatabaseTableTranspiler().transpile(c, traversal));
17
+ chunk.appendString(`" + ` + new database_table_1.DatabaseTableTranspiler().transpile(c, traversal).getCode() + ` + "`);
18
18
  chunk.appendString(" ");
19
19
  }
20
20
  else {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/transpiler",
3
- "version": "2.7.73",
3
+ "version": "2.7.74",
4
4
  "description": "Transpiler",
5
5
  "main": "build/src/index.js",
6
6
  "typings": "build/src/index.d.ts",