@abaplint/transpiler 2.1.46 → 2.1.47
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.
|
@@ -39,15 +39,18 @@ class ReadTableTranspiler {
|
|
|
39
39
|
}
|
|
40
40
|
const compare = node.findDirectExpression(abaplint.Expressions.ComponentCompareSimple);
|
|
41
41
|
if (compare) {
|
|
42
|
-
const components = compare.findDirectExpressions(abaplint.Expressions.ComponentChainSimple);
|
|
43
|
-
const sources = compare.findDirectExpressions(abaplint.Expressions.Source);
|
|
44
|
-
if (components.length !== sources.length) {
|
|
45
|
-
throw new Error("READ TABLE, transpiler unexpected lengths");
|
|
46
|
-
}
|
|
47
42
|
const conds = [];
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
const
|
|
43
|
+
const count = compare.getChildren().length / 3;
|
|
44
|
+
for (let i = 0; i < count; i++) {
|
|
45
|
+
const left = compare.getChildren()[i * 3];
|
|
46
|
+
const source = compare.getChildren()[(i * 3) + 2];
|
|
47
|
+
const s = traversal.traverse(source).getCode();
|
|
48
|
+
let field = left.concatTokens().toLowerCase().replace("-", ".get().");
|
|
49
|
+
if (left.get() instanceof abaplint.Expressions.Dynamic
|
|
50
|
+
&& left instanceof abaplint.Nodes.ExpressionNode) {
|
|
51
|
+
const concat = left.concatTokens().toLowerCase();
|
|
52
|
+
field = concat.substring(2, concat.length - 2);
|
|
53
|
+
}
|
|
51
54
|
if (s.includes("await")) {
|
|
52
55
|
const id = unique_identifier_1.UniqueIdentifier.get();
|
|
53
56
|
prefix += "const " + id + " = " + s + ";\n";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abaplint/transpiler",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.47",
|
|
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.
|
|
31
|
+
"@abaplint/core": "^2.93.8",
|
|
32
32
|
"source-map": "^0.7.4"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|