@abaplint/transpiler 2.4.16 → 2.4.18
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.
|
@@ -20,6 +20,14 @@ class ComponentCompareTranspiler {
|
|
|
20
20
|
else if (concat.endsWith("IS INITIAL")) {
|
|
21
21
|
return new chunk_1.Chunk(`(I) => {return abap.compare.initial(I.${component});}`);
|
|
22
22
|
}
|
|
23
|
+
if (concat.startsWith(component.toUpperCase() + " IN ")) {
|
|
24
|
+
const source = traversal.traverse(node.findDirectExpression(core_1.Expressions.Source)).getCode();
|
|
25
|
+
return new chunk_1.Chunk(`(I) => {return ${pre}abap.compare.in(I.${component}, ${source});}`);
|
|
26
|
+
}
|
|
27
|
+
else if (concat.startsWith(component.toUpperCase() + " NOT IN ")) {
|
|
28
|
+
const source = traversal.traverse(node.findDirectExpression(core_1.Expressions.Source)).getCode();
|
|
29
|
+
return new chunk_1.Chunk(`(I) => {return !abap.compare.in(I.${component}, ${source});}`);
|
|
30
|
+
}
|
|
23
31
|
if ((concat.startsWith("NOT") && concat.endsWith("IS BOUND"))
|
|
24
32
|
|| concat.endsWith("IS NOT BOUND")) {
|
|
25
33
|
return new chunk_1.Chunk(`(I) => {return abap.compare.initial(I.${component});}`);
|
package/build/src/traversal.js
CHANGED
|
@@ -336,7 +336,8 @@ class Traversal {
|
|
|
336
336
|
continue;
|
|
337
337
|
}
|
|
338
338
|
const n = Traversal.escapeNamespace(name.toLowerCase()) + "$" + a.getName().toLowerCase();
|
|
339
|
-
|
|
339
|
+
// note: interface inheritenace and super inheritance might be strange,
|
|
340
|
+
ret += "if (this." + n + " === undefined) this." + n + " = " + new transpile_types_1.TranspileTypes().toType(a.getType()) + ";\n";
|
|
340
341
|
}
|
|
341
342
|
for (const i of (intf === null || intf === void 0 ? void 0 : intf.getImplementing()) || []) {
|
|
342
343
|
ret += this.dataFromInterfaces(i.name, scope);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abaplint/transpiler",
|
|
3
|
-
"version": "2.4.
|
|
3
|
+
"version": "2.4.18",
|
|
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.95.
|
|
31
|
+
"@abaplint/core": "^2.95.16",
|
|
32
32
|
"source-map": "^0.7.4"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|