@abaplint/transpiler 2.4.13 → 2.4.14
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.
|
@@ -22,6 +22,10 @@ class ReadTableTranspiler {
|
|
|
22
22
|
const s = new expressions_1.SourceTranspiler().transpile(from, traversal).getCode();
|
|
23
23
|
extra.push("from: " + s);
|
|
24
24
|
}
|
|
25
|
+
const binary = node.findTokenSequencePosition("BINARY", "SEARCH");
|
|
26
|
+
if (binary) {
|
|
27
|
+
extra.push("binarySearch: true");
|
|
28
|
+
}
|
|
25
29
|
const rt = node.findDirectExpression(abaplint.Expressions.ReadTableTarget);
|
|
26
30
|
const target = rt === null || rt === void 0 ? void 0 : rt.findDirectExpression(abaplint.Expressions.Target);
|
|
27
31
|
const fs = rt === null || rt === void 0 ? void 0 : rt.findDirectExpression(abaplint.Expressions.FSTarget);
|
|
@@ -41,6 +45,7 @@ class ReadTableTranspiler {
|
|
|
41
45
|
const compare = node.findDirectExpression(abaplint.Expressions.ComponentCompareSimple);
|
|
42
46
|
if (compare) {
|
|
43
47
|
const conds = [];
|
|
48
|
+
const blah = [];
|
|
44
49
|
const count = compare.getChildren().length / 3;
|
|
45
50
|
for (let i = 0; i < count; i++) {
|
|
46
51
|
const left = compare.getChildren()[i * 3];
|
|
@@ -63,12 +68,15 @@ class ReadTableTranspiler {
|
|
|
63
68
|
const id = unique_identifier_1.UniqueIdentifier.get();
|
|
64
69
|
prefix += "const " + id + " = " + s + ";\n";
|
|
65
70
|
conds.push("abap.compare.eq(i." + field + ", " + id + ")");
|
|
71
|
+
blah.push(`{key: (i) => {return i.${field}}, value: ${id}}`);
|
|
66
72
|
}
|
|
67
73
|
else {
|
|
68
74
|
conds.push("abap.compare.eq(i." + field + ", " + s + ")");
|
|
75
|
+
blah.push(`{key: (i) => {return i.${field}}, value: ${s}}`);
|
|
69
76
|
}
|
|
70
77
|
}
|
|
71
78
|
extra.push("withKey: (i) => {return " + conds.join(" && ") + ";}");
|
|
79
|
+
extra.push(`withKeyValue: [${blah.join(",")}]`);
|
|
72
80
|
}
|
|
73
81
|
let concat = "";
|
|
74
82
|
if (extra.length > 0) {
|