@abaplint/transpiler-cli 2.13.16 → 2.13.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/abap_transpile +1 -1
- package/build/bundle.js +31 -7
- package/package.json +3 -3
package/abap_transpile
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
1
|
+
#!/usr/bin/env node
|
|
2
2
|
require("./build/bundle");
|
package/build/bundle.js
CHANGED
|
@@ -6602,8 +6602,9 @@ class SelectLoop extends combi_1.Expression {
|
|
|
6602
6602
|
const into = (0, combi_1.altPrio)(sql_into_structure_1.SQLIntoStructure, _1.SQLIntoList);
|
|
6603
6603
|
const perm = (0, combi_1.per)(_1.SQLFrom, where, sql_up_to_1.SQLUpTo, sql_order_by_1.SQLOrderBy, sql_having_1.SQLHaving, _1.SQLClient, bypass, _1.SQLGroupBy, _1.SQLForAllEntries, _1.DatabaseConnection, (0, combi_1.alt)(tab, sql_into_structure_1.SQLIntoStructure, _1.SQLIntoList, packTab));
|
|
6604
6604
|
const strict = (0, combi_1.seq)(_1.SQLFrom, (0, combi_1.ver)(version_1.Version.v750, sql_fields_loop_1.SQLFieldsLoop), (0, combi_1.optPrio)(_1.SQLForAllEntries), (0, combi_1.optPrio)((0, combi_1.seq)(where, (0, combi_1.optPrio)(sql_order_by_1.SQLOrderBy), into, (0, combi_1.optPrio)(sql_up_to_1.SQLUpTo))));
|
|
6605
|
-
const
|
|
6606
|
-
const
|
|
6605
|
+
const aggrIntoBeforeFrom = (0, combi_1.seq)((0, combi_1.plusPrio)(_1.SQLAggregation), into, (0, combi_1.optPrio)(sql_up_to_1.SQLUpTo), _1.SQLFrom, (0, combi_1.optPrio)(_1.SQLClient), (0, combi_1.optPrio)(where), _1.SQLGroupBy);
|
|
6606
|
+
const aggrIntoAfterFrom = (0, combi_1.seq)((0, combi_1.plusPrio)(_1.SQLAggregation), _1.SQLFrom, (0, combi_1.optPrio)(_1.SQLClient), into, (0, combi_1.optPrio)(sql_up_to_1.SQLUpTo), (0, combi_1.optPrio)(where), _1.SQLGroupBy);
|
|
6607
|
+
const ret = (0, combi_1.seq)("SELECT", (0, combi_1.altPrio)((0, combi_1.seq)((0, combi_1.optPrio)("DISTINCT"), sql_field_list_loop_1.SQLFieldListLoop, perm), strict, aggrIntoBeforeFrom, aggrIntoAfterFrom), (0, combi_1.optPrio)(sql_hints_1.SQLHints));
|
|
6607
6608
|
return ret;
|
|
6608
6609
|
}
|
|
6609
6610
|
}
|
|
@@ -7090,7 +7091,7 @@ class SQLCase extends combi_1.Expression {
|
|
|
7090
7091
|
const val = (0, combi_1.altPrio)(sql_cond_1.SQLCond, constant_1.Constant, abap);
|
|
7091
7092
|
const when = (0, combi_1.seq)("WHEN", val, "THEN", sourc, (0, combi_1.starPrio)(sub));
|
|
7092
7093
|
const els = (0, combi_1.seq)("ELSE", sourc);
|
|
7093
|
-
return (0, combi_1.ver)(version_1.Version.v740sp05, (0, combi_1.seq)("CASE", (0, combi_1.opt)((0, combi_1.altPrio)(sql_field_name_1.SQLFieldName, abap)), (0, combi_1.plusPrio)(when), (0, combi_1.optPrio)(els), "END"));
|
|
7094
|
+
return (0, combi_1.ver)(version_1.Version.v740sp05, (0, combi_1.seq)("CASE", (0, combi_1.opt)((0, combi_1.altPrio)(sql_field_name_1.SQLFieldName, abap)), (0, combi_1.plusPrio)(when), (0, combi_1.optPrio)(els), "END"), version_1.Version.OpenABAP);
|
|
7094
7095
|
}
|
|
7095
7096
|
}
|
|
7096
7097
|
exports.SQLCase = SQLCase;
|
|
@@ -7308,9 +7309,12 @@ exports.SQLFieldList = void 0;
|
|
|
7308
7309
|
const combi_1 = __webpack_require__(/*! ../combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
|
|
7309
7310
|
const _1 = __webpack_require__(/*! . */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js");
|
|
7310
7311
|
const version_1 = __webpack_require__(/*! ../../../version */ "./node_modules/@abaplint/core/build/src/version.js");
|
|
7312
|
+
const tokens_1 = __webpack_require__(/*! ../../1_lexer/tokens */ "./node_modules/@abaplint/core/build/src/abap/1_lexer/tokens/index.js");
|
|
7311
7313
|
class SQLFieldList extends combi_1.Expression {
|
|
7312
7314
|
getRunnable() {
|
|
7313
|
-
const
|
|
7315
|
+
const as = (0, combi_1.seq)("AS", _1.SQLAsName);
|
|
7316
|
+
const commaParenField = (0, combi_1.seq)((0, combi_1.tok)(tokens_1.ParenLeftW), _1.SQLFieldName, (0, combi_1.altPrio)((0, combi_1.tok)(tokens_1.WParenRightW), (0, combi_1.tok)(tokens_1.WParenRight)), (0, combi_1.optPrio)(as));
|
|
7317
|
+
const nev = (0, combi_1.ver)(version_1.Version.v740sp05, (0, combi_1.starPrio)((0, combi_1.seq)(",", (0, combi_1.altPrio)(_1.SQLField, commaParenField))), version_1.Version.OpenABAP);
|
|
7314
7318
|
const old = (0, combi_1.starPrio)(_1.SQLField);
|
|
7315
7319
|
return (0, combi_1.altPrio)("*", _1.Dynamic, (0, combi_1.seq)(_1.SQLField, (0, combi_1.alt)(nev, old)));
|
|
7316
7320
|
}
|
|
@@ -7459,14 +7463,15 @@ class SQLFrom extends combi_1.Expression {
|
|
|
7459
7463
|
const joins = (0, combi_1.starPrio)((0, combi_1.seq)((0, combi_1.optPrio)((0, combi_1.tok)(tokens_1.WParenRightW)), _1.SQLJoin));
|
|
7460
7464
|
// No opening parens
|
|
7461
7465
|
const from0 = (0, combi_1.seq)("FROM", _1.SQLFromSource, joins);
|
|
7462
|
-
// 1 to
|
|
7466
|
+
// 1 to 7 opening parens, with up to that many closing parens at the end
|
|
7463
7467
|
const from1 = (0, combi_1.seq)("FROM", (0, combi_1.tok)(tokens_1.WParenLeftW), _1.SQLFromSource, joins, (0, combi_1.optPrio)((0, combi_1.tok)(tokens_1.WParenRightW)));
|
|
7464
7468
|
const from2 = (0, combi_1.seq)("FROM", (0, combi_1.tok)(tokens_1.WParenLeftW), (0, combi_1.tok)(tokens_1.WParenLeftW), _1.SQLFromSource, joins, (0, combi_1.optPrio)((0, combi_1.tok)(tokens_1.WParenRightW)), (0, combi_1.optPrio)((0, combi_1.tok)(tokens_1.WParenRightW)));
|
|
7465
7469
|
const from3 = (0, combi_1.seq)("FROM", (0, combi_1.tok)(tokens_1.WParenLeftW), (0, combi_1.tok)(tokens_1.WParenLeftW), (0, combi_1.tok)(tokens_1.WParenLeftW), _1.SQLFromSource, joins, (0, combi_1.optPrio)((0, combi_1.tok)(tokens_1.WParenRightW)), (0, combi_1.optPrio)((0, combi_1.tok)(tokens_1.WParenRightW)), (0, combi_1.optPrio)((0, combi_1.tok)(tokens_1.WParenRightW)));
|
|
7466
7470
|
const from4 = (0, combi_1.seq)("FROM", (0, combi_1.tok)(tokens_1.WParenLeftW), (0, combi_1.tok)(tokens_1.WParenLeftW), (0, combi_1.tok)(tokens_1.WParenLeftW), (0, combi_1.tok)(tokens_1.WParenLeftW), _1.SQLFromSource, joins, (0, combi_1.optPrio)((0, combi_1.tok)(tokens_1.WParenRightW)), (0, combi_1.optPrio)((0, combi_1.tok)(tokens_1.WParenRightW)), (0, combi_1.optPrio)((0, combi_1.tok)(tokens_1.WParenRightW)), (0, combi_1.optPrio)((0, combi_1.tok)(tokens_1.WParenRightW)));
|
|
7467
7471
|
const from5 = (0, combi_1.seq)("FROM", (0, combi_1.tok)(tokens_1.WParenLeftW), (0, combi_1.tok)(tokens_1.WParenLeftW), (0, combi_1.tok)(tokens_1.WParenLeftW), (0, combi_1.tok)(tokens_1.WParenLeftW), (0, combi_1.tok)(tokens_1.WParenLeftW), _1.SQLFromSource, joins, (0, combi_1.optPrio)((0, combi_1.tok)(tokens_1.WParenRightW)), (0, combi_1.optPrio)((0, combi_1.tok)(tokens_1.WParenRightW)), (0, combi_1.optPrio)((0, combi_1.tok)(tokens_1.WParenRightW)), (0, combi_1.optPrio)((0, combi_1.tok)(tokens_1.WParenRightW)), (0, combi_1.optPrio)((0, combi_1.tok)(tokens_1.WParenRightW)));
|
|
7468
7472
|
const from6 = (0, combi_1.seq)("FROM", (0, combi_1.tok)(tokens_1.WParenLeftW), (0, combi_1.tok)(tokens_1.WParenLeftW), (0, combi_1.tok)(tokens_1.WParenLeftW), (0, combi_1.tok)(tokens_1.WParenLeftW), (0, combi_1.tok)(tokens_1.WParenLeftW), (0, combi_1.tok)(tokens_1.WParenLeftW), _1.SQLFromSource, joins, (0, combi_1.optPrio)((0, combi_1.tok)(tokens_1.WParenRightW)), (0, combi_1.optPrio)((0, combi_1.tok)(tokens_1.WParenRightW)), (0, combi_1.optPrio)((0, combi_1.tok)(tokens_1.WParenRightW)), (0, combi_1.optPrio)((0, combi_1.tok)(tokens_1.WParenRightW)), (0, combi_1.optPrio)((0, combi_1.tok)(tokens_1.WParenRightW)), (0, combi_1.optPrio)((0, combi_1.tok)(tokens_1.WParenRightW)));
|
|
7469
|
-
const
|
|
7473
|
+
const from7 = (0, combi_1.seq)("FROM", (0, combi_1.tok)(tokens_1.WParenLeftW), (0, combi_1.tok)(tokens_1.WParenLeftW), (0, combi_1.tok)(tokens_1.WParenLeftW), (0, combi_1.tok)(tokens_1.WParenLeftW), (0, combi_1.tok)(tokens_1.WParenLeftW), (0, combi_1.tok)(tokens_1.WParenLeftW), (0, combi_1.tok)(tokens_1.WParenLeftW), _1.SQLFromSource, joins, (0, combi_1.optPrio)((0, combi_1.tok)(tokens_1.WParenRightW)), (0, combi_1.optPrio)((0, combi_1.tok)(tokens_1.WParenRightW)), (0, combi_1.optPrio)((0, combi_1.tok)(tokens_1.WParenRightW)), (0, combi_1.optPrio)((0, combi_1.tok)(tokens_1.WParenRightW)), (0, combi_1.optPrio)((0, combi_1.tok)(tokens_1.WParenRightW)), (0, combi_1.optPrio)((0, combi_1.tok)(tokens_1.WParenRightW)), (0, combi_1.optPrio)((0, combi_1.tok)(tokens_1.WParenRightW)));
|
|
7474
|
+
const source = (0, combi_1.altPrio)(from7, from6, from5, from4, from3, from2, from1, from0);
|
|
7470
7475
|
return source;
|
|
7471
7476
|
}
|
|
7472
7477
|
}
|
|
@@ -55149,7 +55154,7 @@ class Registry {
|
|
|
55149
55154
|
}
|
|
55150
55155
|
static abaplintVersion() {
|
|
55151
55156
|
// magic, see build script "version.sh"
|
|
55152
|
-
return "2.119.
|
|
55157
|
+
return "2.119.11";
|
|
55153
55158
|
}
|
|
55154
55159
|
getDDICReferences() {
|
|
55155
55160
|
return this.ddicReferences;
|
|
@@ -95510,6 +95515,25 @@ this.INTERNAL_ID = abap.internalIdCounter++;\n`;
|
|
|
95510
95515
|
static setValues(identifier, name) {
|
|
95511
95516
|
const val = identifier.getValue();
|
|
95512
95517
|
let ret = "";
|
|
95518
|
+
// abaplint can use this sentinel for enum-like class constants. Synthesize
|
|
95519
|
+
// deterministic member values so the enum fields have distinct runtime values.
|
|
95520
|
+
if (val === "novalueClassAttributeEnum") {
|
|
95521
|
+
const type = identifier.getType();
|
|
95522
|
+
if (type instanceof abaplint.BasicTypes.StructureType) {
|
|
95523
|
+
let index = 0;
|
|
95524
|
+
for (const component of type.getComponents()) {
|
|
95525
|
+
const fieldName = component.name.toLowerCase();
|
|
95526
|
+
ret += Traversal.prefixVariable(name)
|
|
95527
|
+
+ ".get()["
|
|
95528
|
+
+ JSON.stringify(fieldName)
|
|
95529
|
+
+ "].set("
|
|
95530
|
+
+ index
|
|
95531
|
+
+ ");\n";
|
|
95532
|
+
index++;
|
|
95533
|
+
}
|
|
95534
|
+
}
|
|
95535
|
+
return ret;
|
|
95536
|
+
}
|
|
95513
95537
|
const handle = (val, name) => {
|
|
95514
95538
|
if (typeof val === "string") {
|
|
95515
95539
|
const e = expressions_1.ConstantTranspiler.escape(val);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abaplint/transpiler-cli",
|
|
3
|
-
"version": "2.13.
|
|
3
|
+
"version": "2.13.17",
|
|
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.119.
|
|
31
|
-
"@abaplint/transpiler": "^2.13.
|
|
30
|
+
"@abaplint/core": "^2.119.11",
|
|
31
|
+
"@abaplint/transpiler": "^2.13.17",
|
|
32
32
|
"@types/glob": "^8.1.0",
|
|
33
33
|
"@types/node": "^24.12.2",
|
|
34
34
|
"@types/progress": "^2.0.7",
|