@abaplint/transpiler 2.3.48 → 2.3.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.
@@ -49,6 +49,23 @@ class LoopTranspiler {
49
49
  const to = new expressions_1.SourceTranspiler().transpile(toNode, traversal).getCode();
50
50
  extra.push("to: " + to);
51
51
  }
52
+ const keyNode = node.findExpressionAfterToken("KEY");
53
+ if (keyNode) {
54
+ if (keyNode.get() instanceof abaplint.Expressions.Dynamic) {
55
+ const children = keyNode.getChildren();
56
+ if (children[1] instanceof abaplint.Nodes.ExpressionNode
57
+ && children[1].get() instanceof abaplint.Expressions.FieldChain) {
58
+ const t = new expressions_1.FieldChainTranspiler(true).transpile(children[1], traversal);
59
+ extra.push(`usingKey: ${t.getCode()}`);
60
+ }
61
+ else {
62
+ extra.push(`usingKey: ${keyNode.concatTokens()}`);
63
+ }
64
+ }
65
+ else {
66
+ extra.push(`usingKey: "${keyNode.concatTokens()}"`);
67
+ }
68
+ }
52
69
  const whereNode = node.findFirstExpression(abaplint.Expressions.ComponentCond);
53
70
  if (whereNode) {
54
71
  const where = traversal.traverse(whereNode).getCode();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/transpiler",
3
- "version": "2.3.48",
3
+ "version": "2.3.50",
4
4
  "description": "Transpiler",
5
5
  "main": "build/src/index.js",
6
6
  "typings": "build/src/index.d.ts",
@@ -28,7 +28,7 @@
28
28
  "author": "abaplint",
29
29
  "license": "MIT",
30
30
  "dependencies": {
31
- "@abaplint/core": "^2.93.86",
31
+ "@abaplint/core": "^2.93.87",
32
32
  "source-map": "^0.7.4"
33
33
  },
34
34
  "devDependencies": {