@abaplint/transpiler 2.1.49 → 2.1.50

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.
@@ -7,23 +7,20 @@ const chunk_1 = require("../chunk");
7
7
  class StringTemplateSourceTranspiler {
8
8
  transpile(node, traversal) {
9
9
  let ret = "";
10
- let pre = "";
11
- let post = "";
12
- let get = true;
13
- const next = node.findDirectExpression(core_1.Expressions.StringTemplateFormatting);
14
- if (next) {
15
- const options = this.build(next, traversal);
10
+ const pre = "abap.templateFormatting(";
11
+ let post = ")";
12
+ const formatting = node.findDirectExpression(core_1.Expressions.StringTemplateFormatting);
13
+ if (formatting) {
14
+ const options = this.build(formatting, traversal);
16
15
  if (options) {
17
- pre = "abap.templateFormatting(";
18
16
  post = "," + options + ")";
19
- get = false;
20
17
  }
21
18
  }
22
19
  const c = node.findDirectExpression(core_1.Expressions.Source);
23
20
  if (c === undefined) {
24
21
  throw new Error("StringTemplateSourceTranspiler, Source not found");
25
22
  }
26
- ret += pre + new _1.SourceTranspiler(get).transpile(c, traversal).getCode() + post;
23
+ ret += pre + new _1.SourceTranspiler().transpile(c, traversal).getCode() + post;
27
24
  return new chunk_1.Chunk(ret);
28
25
  }
29
26
  build(node, traversal) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/transpiler",
3
- "version": "2.1.49",
3
+ "version": "2.1.50",
4
4
  "description": "Transpiler",
5
5
  "main": "build/src/index.js",
6
6
  "typings": "build/src/index.d.ts",