@abaplint/transpiler 2.3.49 → 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.
- package/build/src/statements/loop.js +14 -1
- package/package.json +1 -1
|
@@ -51,7 +51,20 @@ class LoopTranspiler {
|
|
|
51
51
|
}
|
|
52
52
|
const keyNode = node.findExpressionAfterToken("KEY");
|
|
53
53
|
if (keyNode) {
|
|
54
|
-
|
|
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
|
+
}
|
|
55
68
|
}
|
|
56
69
|
const whereNode = node.findFirstExpression(abaplint.Expressions.ComponentCond);
|
|
57
70
|
if (whereNode) {
|