@abaplint/transpiler 1.8.29 → 1.8.32
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.
|
@@ -28,12 +28,17 @@ class StringTemplateSourceTranspiler {
|
|
|
28
28
|
}
|
|
29
29
|
build(node, traversal) {
|
|
30
30
|
let option = "";
|
|
31
|
+
let count = 0;
|
|
31
32
|
for (const c of node.getChildren()) {
|
|
33
|
+
count++;
|
|
32
34
|
if (c instanceof core_1.Nodes.TokenNode) {
|
|
33
35
|
if (c.getFirstToken().getStr() === "=") {
|
|
34
36
|
option += ":";
|
|
35
37
|
}
|
|
36
38
|
else {
|
|
39
|
+
if (count > 3 && (count - 1) % 3 === 0) {
|
|
40
|
+
option += ",";
|
|
41
|
+
}
|
|
37
42
|
option += `"` + c.concatTokens().toLowerCase() + `"`;
|
|
38
43
|
}
|
|
39
44
|
}
|
|
@@ -5,9 +5,9 @@ const abaplint = require("@abaplint/core");
|
|
|
5
5
|
const chunk_1 = require("../chunk");
|
|
6
6
|
class AppendTranspiler {
|
|
7
7
|
transpile(node, traversal) {
|
|
8
|
-
const concat = node.concatTokens();
|
|
8
|
+
const concat = node.concatTokens().toUpperCase();
|
|
9
9
|
const target = traversal.traverse(node.findDirectExpression(abaplint.Expressions.Target));
|
|
10
|
-
if (concat.
|
|
10
|
+
if (concat.includes("INITIAL LINE")) {
|
|
11
11
|
const assigning = node.findExpressionAfterToken("ASSIGNING");
|
|
12
12
|
const into = node.findExpressionAfterToken("INTO");
|
|
13
13
|
if (assigning) {
|
|
@@ -29,7 +29,7 @@ class DataTranspiler {
|
|
|
29
29
|
int = val.findFirstExpression(abaplint.Expressions.ConstantString);
|
|
30
30
|
}
|
|
31
31
|
if (int) {
|
|
32
|
-
const escaped = new constant_1.ConstantTranspiler().escape(int.
|
|
32
|
+
const escaped = new constant_1.ConstantTranspiler().escape(int.concatTokens());
|
|
33
33
|
value = "\n" + found.getName().toLowerCase() + ".set(" + escaped + ");";
|
|
34
34
|
}
|
|
35
35
|
else if (val.getChildren()[1].get() instanceof abaplint.Expressions.SimpleFieldChain) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abaplint/transpiler",
|
|
3
|
-
"version": "1.8.
|
|
3
|
+
"version": "1.8.32",
|
|
4
4
|
"description": "Transpiler",
|
|
5
5
|
"main": "build/src/index.js",
|
|
6
6
|
"typings": "build/src/index.d.ts",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"author": "abaplint",
|
|
28
28
|
"license": "MIT",
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@abaplint/core": "^2.
|
|
30
|
+
"@abaplint/core": "^2.86.4",
|
|
31
31
|
"source-map": "^0.7.3"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|