@abaplint/transpiler 2.11.74 → 2.11.75
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.
|
@@ -69,7 +69,7 @@ class SQLCondTranspiler {
|
|
|
69
69
|
}
|
|
70
70
|
else {
|
|
71
71
|
const cond = [];
|
|
72
|
-
for (const s of sqlin.findDirectExpressions(abaplint.Expressions.SQLSource)) {
|
|
72
|
+
for (const s of sqlin.findDirectExpressions(abaplint.Expressions.SQLSource).concat(sqlin.findDirectExpressions(abaplint.Expressions.SQLSourceNoSpace))) {
|
|
73
73
|
const field = new sql_field_name_1.SQLFieldNameTranspiler().transpile(fieldName, traversal).getCode();
|
|
74
74
|
const sourc = this.sqlSource(s, traversal, filename, table);
|
|
75
75
|
cond.push(field + " = " + sourc);
|
|
@@ -4,17 +4,25 @@ exports.SQLFieldTranspiler = void 0;
|
|
|
4
4
|
const abaplint = require("@abaplint/core");
|
|
5
5
|
const chunk_1 = require("../chunk");
|
|
6
6
|
const sql_field_name_1 = require("./sql_field_name");
|
|
7
|
+
const field_chain_1 = require("./field_chain");
|
|
7
8
|
class SQLFieldTranspiler {
|
|
8
9
|
transpile(node, traversal) {
|
|
9
10
|
const chunk = new chunk_1.Chunk();
|
|
10
11
|
for (const c of node.getChildren()) {
|
|
11
12
|
if (c instanceof abaplint.Nodes.TokenNode) {
|
|
13
|
+
const concat = c.concatTokens();
|
|
14
|
+
if (concat === "@") {
|
|
15
|
+
continue;
|
|
16
|
+
}
|
|
12
17
|
// keywords
|
|
13
18
|
chunk.appendString(c.concatTokens() + " ");
|
|
14
19
|
}
|
|
15
20
|
else if (c.get() instanceof abaplint.Expressions.SQLFieldName) {
|
|
16
21
|
chunk.appendChunk(new sql_field_name_1.SQLFieldNameTranspiler().transpile(c, traversal));
|
|
17
22
|
}
|
|
23
|
+
else if (c.get() instanceof abaplint.Expressions.SimpleFieldChain2) {
|
|
24
|
+
chunk.appendString(`'" + ` + new field_chain_1.FieldChainTranspiler().transpile(c, traversal).getCode() + `.get() + "' `);
|
|
25
|
+
}
|
|
18
26
|
else {
|
|
19
27
|
chunk.appendString(c.concatTokens() + " ");
|
|
20
28
|
}
|
|
@@ -17,6 +17,10 @@ class SQLFieldListTranspiler {
|
|
|
17
17
|
const code = new sql_field_name_1.SQLFieldNameTranspiler().transpile(f, traversal).getCode();
|
|
18
18
|
fields.push(code);
|
|
19
19
|
}
|
|
20
|
+
else if (f instanceof abaplint.Nodes.ExpressionNode && f.get() instanceof abaplint.Expressions.SQLFieldList) {
|
|
21
|
+
// todo, I have no idea why its nested like this when there is just one field
|
|
22
|
+
return new SQLFieldListTranspiler().transpile(f, traversal);
|
|
23
|
+
}
|
|
20
24
|
else {
|
|
21
25
|
const concat = f.concatTokens();
|
|
22
26
|
if (concat !== ",") {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abaplint/transpiler",
|
|
3
|
-
"version": "2.11.
|
|
3
|
+
"version": "2.11.75",
|
|
4
4
|
"description": "Transpiler",
|
|
5
5
|
"main": "build/src/index.js",
|
|
6
6
|
"typings": "build/src/index.d.ts",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"author": "abaplint",
|
|
30
30
|
"license": "MIT",
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@abaplint/core": "^2.113.
|
|
32
|
+
"@abaplint/core": "^2.113.197",
|
|
33
33
|
"source-map": "^0.7.6"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|