@abaplint/transpiler-cli 2.11.73 → 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.
- package/build/bundle.js +18 -5
- package/package.json +3 -3
package/build/bundle.js
CHANGED
|
@@ -7235,7 +7235,7 @@ const sql_function_1 = __webpack_require__(/*! ./sql_function */ "./node_modules
|
|
|
7235
7235
|
const sql_path_1 = __webpack_require__(/*! ./sql_path */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_path.js");
|
|
7236
7236
|
class SQLField extends combi_1.Expression {
|
|
7237
7237
|
getRunnable() {
|
|
7238
|
-
const abap = (0, combi_1.ver)(version_1.Version.v740sp05, (0, combi_1.seq)((0, combi_1.tok)(tokens_1.WAt), _1.SimpleFieldChain2));
|
|
7238
|
+
const abap = (0, combi_1.ver)(version_1.Version.v740sp05, (0, combi_1.seq)((0, combi_1.tok)(tokens_1.WAt), _1.SimpleFieldChain2), version_1.Version.OpenABAP);
|
|
7239
7239
|
const as = (0, combi_1.seq)("AS", _1.SQLAsName);
|
|
7240
7240
|
const field = (0, combi_1.altPrio)(_1.SQLAggregation, _1.SQLCase, sql_function_1.SQLFunction, sql_path_1.SQLPath, _1.SQLFieldName, abap, _1.Constant);
|
|
7241
7241
|
const sub = (0, combi_1.plusPrio)((0, combi_1.seq)((0, combi_1.altPrio)("+", "-", "*", "/", "&&"), (0, combi_1.optPrio)((0, combi_1.tok)(tokens_1.WParenLeftW)), field, (0, combi_1.optPrio)((0, combi_1.tok)(tokens_1.WParenRightW))));
|
|
@@ -7651,9 +7651,10 @@ class SQLIn extends combi_1.Expression {
|
|
|
7651
7651
|
getRunnable() {
|
|
7652
7652
|
const val = new _1.SQLSource();
|
|
7653
7653
|
const short = new _1.SQLSourceNoSpace();
|
|
7654
|
-
const listOld = (0, combi_1.seq)((0, combi_1.tok)(tokens_1.WParenLeft), (0, combi_1.alt)((0, combi_1.ver)(version_1.Version.v740sp05, short), val), (0, combi_1.starPrio)((0, combi_1.seq)(",", val)), (0, combi_1.altPrio)((0, combi_1.tok)(tokens_1.ParenRight), (0, combi_1.tok)(tokens_1.ParenRightW), (0, combi_1.tok)(tokens_1.WParenRightW)));
|
|
7654
|
+
const listOld = (0, combi_1.seq)((0, combi_1.tok)(tokens_1.WParenLeft), (0, combi_1.alt)((0, combi_1.ver)(version_1.Version.v740sp05, short, version_1.Version.OpenABAP), val), (0, combi_1.starPrio)((0, combi_1.seq)(",", val)), (0, combi_1.altPrio)((0, combi_1.tok)(tokens_1.ParenRight), (0, combi_1.tok)(tokens_1.ParenRightW), (0, combi_1.tok)(tokens_1.WParenRightW)));
|
|
7655
7655
|
const listNew = (0, combi_1.seq)((0, combi_1.tok)(tokens_1.WParenLeftW), val, (0, combi_1.starPrio)((0, combi_1.seq)(",", (0, combi_1.altPrio)(short, val))), (0, combi_1.altPrio)((0, combi_1.tok)(tokens_1.WParenRight), (0, combi_1.tok)(tokens_1.WParenRightW)));
|
|
7656
|
-
|
|
7656
|
+
// version is a guess, https://github.com/abaplint/abaplint/issues/2530
|
|
7657
|
+
const list = (0, combi_1.alt)(listOld, (0, combi_1.ver)(version_1.Version.v740sp02, listNew, version_1.Version.OpenABAP));
|
|
7657
7658
|
const subSelect = (0, combi_1.seq)("(", _1.Select, ")");
|
|
7658
7659
|
const inn = (0, combi_1.seq)("IN", (0, combi_1.altPrio)(_1.SQLSource, list, subSelect));
|
|
7659
7660
|
return inn;
|
|
@@ -53885,7 +53886,7 @@ class Registry {
|
|
|
53885
53886
|
}
|
|
53886
53887
|
static abaplintVersion() {
|
|
53887
53888
|
// magic, see build script "version.sh"
|
|
53888
|
-
return "2.113.
|
|
53889
|
+
return "2.113.197";
|
|
53889
53890
|
}
|
|
53890
53891
|
getDDICReferences() {
|
|
53891
53892
|
return this.ddicReferences;
|
|
@@ -81119,7 +81120,7 @@ class SQLCondTranspiler {
|
|
|
81119
81120
|
}
|
|
81120
81121
|
else {
|
|
81121
81122
|
const cond = [];
|
|
81122
|
-
for (const s of sqlin.findDirectExpressions(abaplint.Expressions.SQLSource)) {
|
|
81123
|
+
for (const s of sqlin.findDirectExpressions(abaplint.Expressions.SQLSource).concat(sqlin.findDirectExpressions(abaplint.Expressions.SQLSourceNoSpace))) {
|
|
81123
81124
|
const field = new sql_field_name_1.SQLFieldNameTranspiler().transpile(fieldName, traversal).getCode();
|
|
81124
81125
|
const sourc = this.sqlSource(s, traversal, filename, table);
|
|
81125
81126
|
cond.push(field + " = " + sourc);
|
|
@@ -81242,17 +81243,25 @@ exports.SQLFieldTranspiler = void 0;
|
|
|
81242
81243
|
const abaplint = __webpack_require__(/*! @abaplint/core */ "./node_modules/@abaplint/core/build/src/index.js");
|
|
81243
81244
|
const chunk_1 = __webpack_require__(/*! ../chunk */ "./node_modules/@abaplint/transpiler/build/src/chunk.js");
|
|
81244
81245
|
const sql_field_name_1 = __webpack_require__(/*! ./sql_field_name */ "./node_modules/@abaplint/transpiler/build/src/expressions/sql_field_name.js");
|
|
81246
|
+
const field_chain_1 = __webpack_require__(/*! ./field_chain */ "./node_modules/@abaplint/transpiler/build/src/expressions/field_chain.js");
|
|
81245
81247
|
class SQLFieldTranspiler {
|
|
81246
81248
|
transpile(node, traversal) {
|
|
81247
81249
|
const chunk = new chunk_1.Chunk();
|
|
81248
81250
|
for (const c of node.getChildren()) {
|
|
81249
81251
|
if (c instanceof abaplint.Nodes.TokenNode) {
|
|
81252
|
+
const concat = c.concatTokens();
|
|
81253
|
+
if (concat === "@") {
|
|
81254
|
+
continue;
|
|
81255
|
+
}
|
|
81250
81256
|
// keywords
|
|
81251
81257
|
chunk.appendString(c.concatTokens() + " ");
|
|
81252
81258
|
}
|
|
81253
81259
|
else if (c.get() instanceof abaplint.Expressions.SQLFieldName) {
|
|
81254
81260
|
chunk.appendChunk(new sql_field_name_1.SQLFieldNameTranspiler().transpile(c, traversal));
|
|
81255
81261
|
}
|
|
81262
|
+
else if (c.get() instanceof abaplint.Expressions.SimpleFieldChain2) {
|
|
81263
|
+
chunk.appendString(`'" + ` + new field_chain_1.FieldChainTranspiler().transpile(c, traversal).getCode() + `.get() + "' `);
|
|
81264
|
+
}
|
|
81256
81265
|
else {
|
|
81257
81266
|
chunk.appendString(c.concatTokens() + " ");
|
|
81258
81267
|
}
|
|
@@ -81331,6 +81340,10 @@ class SQLFieldListTranspiler {
|
|
|
81331
81340
|
const code = new sql_field_name_1.SQLFieldNameTranspiler().transpile(f, traversal).getCode();
|
|
81332
81341
|
fields.push(code);
|
|
81333
81342
|
}
|
|
81343
|
+
else if (f instanceof abaplint.Nodes.ExpressionNode && f.get() instanceof abaplint.Expressions.SQLFieldList) {
|
|
81344
|
+
// todo, I have no idea why its nested like this when there is just one field
|
|
81345
|
+
return new SQLFieldListTranspiler().transpile(f, traversal);
|
|
81346
|
+
}
|
|
81334
81347
|
else {
|
|
81335
81348
|
const concat = f.concatTokens();
|
|
81336
81349
|
if (concat !== ",") {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abaplint/transpiler-cli",
|
|
3
|
-
"version": "2.11.
|
|
3
|
+
"version": "2.11.75",
|
|
4
4
|
"description": "Transpiler - Command Line Interface",
|
|
5
5
|
"funding": "https://github.com/sponsors/larshp",
|
|
6
6
|
"bin": {
|
|
@@ -27,8 +27,8 @@
|
|
|
27
27
|
"author": "abaplint",
|
|
28
28
|
"license": "MIT",
|
|
29
29
|
"devDependencies": {
|
|
30
|
-
"@abaplint/core": "^2.113.
|
|
31
|
-
"@abaplint/transpiler": "^2.11.
|
|
30
|
+
"@abaplint/core": "^2.113.197",
|
|
31
|
+
"@abaplint/transpiler": "^2.11.75",
|
|
32
32
|
"@types/glob": "^8.1.0",
|
|
33
33
|
"@types/node": "^24.3.1",
|
|
34
34
|
"@types/progress": "^2.0.7",
|