@abaplint/transpiler 2.2.15 → 2.2.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.
package/build/src/keywords.js
CHANGED
|
@@ -51,15 +51,21 @@ class Keywords {
|
|
|
51
51
|
];
|
|
52
52
|
// "with"
|
|
53
53
|
// "delete"
|
|
54
|
-
|
|
55
|
-
let ret = [];
|
|
54
|
+
const ret = [];
|
|
56
55
|
for (const c of node.getChildren()) {
|
|
57
56
|
if (c instanceof abaplint.Nodes.TokenNodeRegex) {
|
|
58
57
|
const token = c.getFirstToken();
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
58
|
+
const start = token.getStart();
|
|
59
|
+
if (start instanceof abaplint.VirtualPosition) {
|
|
60
|
+
continue;
|
|
61
|
+
}
|
|
62
|
+
for (const k of keywords) {
|
|
63
|
+
const lower = token.getStr().toLowerCase();
|
|
64
|
+
if (k === lower
|
|
65
|
+
|| "!" + k === lower
|
|
66
|
+
|| lower.endsWith("~" + k)) {
|
|
62
67
|
ret.push(token);
|
|
68
|
+
break;
|
|
63
69
|
}
|
|
64
70
|
}
|
|
65
71
|
}
|
|
@@ -67,7 +73,7 @@ class Keywords {
|
|
|
67
73
|
continue;
|
|
68
74
|
}
|
|
69
75
|
else {
|
|
70
|
-
ret
|
|
76
|
+
ret.push(...this.traverse(c, file));
|
|
71
77
|
}
|
|
72
78
|
}
|
|
73
79
|
return ret;
|
|
@@ -65,6 +65,9 @@ class MethodImplementationTranspiler {
|
|
|
65
65
|
else if (parameterDefault.getFirstToken().getStr().toLowerCase() === "space") {
|
|
66
66
|
val = "abap.builtin.space";
|
|
67
67
|
}
|
|
68
|
+
else if (parameterDefault.concatTokens().toLowerCase() === "sy-uname") {
|
|
69
|
+
val = "abap.builtin.sy.get().uname";
|
|
70
|
+
}
|
|
68
71
|
else {
|
|
69
72
|
// note: this can be difficult, the "def" might be from an interface, ie. a different scope than the method
|
|
70
73
|
val = new expressions_1.FieldChainTranspiler().transpile(parameterDefault, traversal, true, methodDef === null || methodDef === void 0 ? void 0 : methodDef.getFilename()).getCode();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abaplint/transpiler",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.17",
|
|
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.40",
|
|
32
32
|
"source-map": "^0.7.4"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|