@abaplint/transpiler 2.11.80 → 2.11.82

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.
@@ -19,7 +19,8 @@ class MethodCallTranspiler {
19
19
  // todo: this is not correct, the method name might be shadowed
20
20
  name = "abap.builtin." + name + "(";
21
21
  if (name === "abap.builtin.line_exists(" || name === "abap.builtin.line_index(") {
22
- name += "() => {";
22
+ name = `await ` + name;
23
+ name += "async () => {";
23
24
  post = "}";
24
25
  }
25
26
  }
@@ -10,7 +10,8 @@ class MethodCallChainTranspiler {
10
10
  for (const c of node.getChildren()) {
11
11
  if (c instanceof core_1.Nodes.ExpressionNode && c.get() instanceof core_1.Expressions.MethodCall) {
12
12
  const sub = traversal.traverse(c);
13
- if (sub.getCode().startsWith("abap.builtin.")) {
13
+ if (sub.getCode().startsWith("abap.builtin.")
14
+ || sub.getCode().startsWith("await abap.builtin.")) {
14
15
  ret.appendChunk(sub);
15
16
  }
16
17
  else {
@@ -45,10 +45,10 @@ class TableExpressionTranspiler {
45
45
  throw new Error("TableExpressionTranspiler: todo, other, " + c.concatTokens());
46
46
  }
47
47
  }
48
- extra.push("withKey: (i) => {return " + withKey.join(" && ") + ";}");
48
+ extra.push("withKey: async (i) => {return " + withKey.join(" && ") + ";}");
49
49
  extra.push("usesTableLine: " + usesTableLine);
50
50
  }
51
- ret.appendString(`abap.operators.tableExpression(${source.getCode()}, {${extra.join(", ")} })`);
51
+ ret.appendString(`(await abap.operators.tableExpression(${source.getCode()}, {${extra.join(", ")} }))`);
52
52
  return ret;
53
53
  }
54
54
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/transpiler",
3
- "version": "2.11.80",
3
+ "version": "2.11.82",
4
4
  "description": "Transpiler",
5
5
  "main": "build/src/index.js",
6
6
  "typings": "build/src/index.d.ts",