@abaplint/transpiler 1.8.14 → 1.8.17
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.
|
@@ -46,7 +46,10 @@ class MethodSourceTranspiler {
|
|
|
46
46
|
call += ".get().toLowerCase()]";
|
|
47
47
|
}
|
|
48
48
|
else if (second.get() instanceof core_1.Expressions.Constant) {
|
|
49
|
-
if (call
|
|
49
|
+
if (call === "") {
|
|
50
|
+
call = "this.";
|
|
51
|
+
}
|
|
52
|
+
else if (call.endsWith(".") === false) {
|
|
50
53
|
call += ".";
|
|
51
54
|
}
|
|
52
55
|
call += second.getFirstToken().getStr().replace(/\'/g, "").toLowerCase().replace("~", "$");
|
|
@@ -81,7 +81,7 @@ class MethodImplementationTranspiler {
|
|
|
81
81
|
}
|
|
82
82
|
const method = this.findMethod(methodName, classDef, traversal);
|
|
83
83
|
let staticMethod = "";
|
|
84
|
-
methodName = methodName.replace("~", "$");
|
|
84
|
+
methodName = methodName.replace("~", "$").toLowerCase();
|
|
85
85
|
if (method && method.isStatic()) {
|
|
86
86
|
// in ABAP static methods can be called with instance arrows, "->"
|
|
87
87
|
const className = (_b = (_a = scope.getParent()) === null || _a === void 0 ? void 0 : _a.getIdentifier().sname) === null || _b === void 0 ? void 0 : _b.toLowerCase();
|
package/build/src/traversal.js
CHANGED
|
@@ -273,11 +273,11 @@ class Traversal {
|
|
|
273
273
|
}
|
|
274
274
|
// handle aliases after initialization of carrier variables
|
|
275
275
|
for (const a of def.getAliases().getAll()) {
|
|
276
|
-
ret += "this." + a.getName() + " = this." + a.getComponent().replace("~", "$") + ";\n";
|
|
276
|
+
ret += "this." + a.getName().toLowerCase() + " = this." + a.getComponent().replace("~", "$").toLowerCase() + ";\n";
|
|
277
277
|
}
|
|
278
278
|
// constants can be accessed both statically and via reference
|
|
279
279
|
for (const c of def.getAttributes().getConstants()) {
|
|
280
|
-
ret += "this." + c.getName() + " = " + def.getName() + "." + c.getName() + ";\n";
|
|
280
|
+
ret += "this." + c.getName().toLowerCase() + " = " + def.getName().toLowerCase() + "." + c.getName().toLowerCase() + ";\n";
|
|
281
281
|
}
|
|
282
282
|
return ret;
|
|
283
283
|
}
|