@abaplint/transpiler-cli 2.11.67 → 2.11.69

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.
Files changed (2) hide show
  1. package/build/bundle.js +115 -4
  2. package/package.json +3 -3
package/build/bundle.js CHANGED
@@ -6818,7 +6818,7 @@ class Source extends combi_1.Expression {
6818
6818
  const cond = (0, combi_1.ver)(version_1.Version.v740sp02, (0, combi_1.seq)("COND", _1.TypeNameOrInfer, (0, combi_1.tok)(tokens_1.ParenLeftW), _1.CondBody, rparenNoSpace, (0, combi_1.optPrio)(after)), version_1.Version.OpenABAP);
6819
6819
  const reff = (0, combi_1.ver)(version_1.Version.v740sp02, (0, combi_1.seq)("REF", _1.TypeNameOrInfer, (0, combi_1.tok)(tokens_1.ParenLeftW), Source, (0, combi_1.optPrio)("OPTIONAL"), rparen), version_1.Version.OpenABAP);
6820
6820
  const exact = (0, combi_1.ver)(version_1.Version.v740sp02, (0, combi_1.seq)("EXACT", _1.TypeNameOrInfer, (0, combi_1.tok)(tokens_1.ParenLeftW), Source, rparen, (0, combi_1.optPrio)(after)));
6821
- const filter = (0, combi_1.ver)(version_1.Version.v740sp08, (0, combi_1.seq)("FILTER", _1.TypeNameOrInfer, (0, combi_1.tok)(tokens_1.ParenLeftW), _1.FilterBody, rparen));
6821
+ const filter = (0, combi_1.ver)(version_1.Version.v740sp08, (0, combi_1.seq)("FILTER", _1.TypeNameOrInfer, (0, combi_1.tok)(tokens_1.ParenLeftW), _1.FilterBody, rparen), version_1.Version.OpenABAP);
6822
6822
  const reduce = (0, combi_1.ver)(version_1.Version.v740sp08, (0, combi_1.seq)("REDUCE", _1.TypeNameOrInfer, (0, combi_1.tok)(tokens_1.ParenLeftW), _1.ReduceBody, rparen, (0, combi_1.optPrio)(after)));
6823
6823
  const prefix1 = (0, combi_1.altPrio)((0, combi_1.tok)(tokens_1.WDashW), (0, combi_1.tok)(tokens_1.WPlusW));
6824
6824
  const ret = (0, combi_1.seq)((0, combi_1.starPrio)(prefix1), (0, combi_1.altPrio)(filter, reff, corr, conv, value, cond, exact, swit, reduce, old));
@@ -53851,7 +53851,7 @@ class Registry {
53851
53851
  }
53852
53852
  static abaplintVersion() {
53853
53853
  // magic, see build script "version.sh"
53854
- return "2.113.193";
53854
+ return "2.113.194";
53855
53855
  }
53856
53856
  getDDICReferences() {
53857
53857
  return this.ddicReferences;
@@ -79625,6 +79625,56 @@ exports.FieldSymbolTranspiler = FieldSymbolTranspiler;
79625
79625
 
79626
79626
  /***/ }),
79627
79627
 
79628
+ /***/ "./node_modules/@abaplint/transpiler/build/src/expressions/filter_body.js":
79629
+ /*!********************************************************************************!*\
79630
+ !*** ./node_modules/@abaplint/transpiler/build/src/expressions/filter_body.js ***!
79631
+ \********************************************************************************/
79632
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
79633
+
79634
+ "use strict";
79635
+
79636
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
79637
+ exports.FilterBodyTranspiler = void 0;
79638
+ const core_1 = __webpack_require__(/*! @abaplint/core */ "./node_modules/@abaplint/core/build/src/index.js");
79639
+ const chunk_1 = __webpack_require__(/*! ../chunk */ "./node_modules/@abaplint/transpiler/build/src/chunk.js");
79640
+ const type_name_or_infer_1 = __webpack_require__(/*! ./type_name_or_infer */ "./node_modules/@abaplint/transpiler/build/src/expressions/type_name_or_infer.js");
79641
+ const transpile_types_1 = __webpack_require__(/*! ../transpile_types */ "./node_modules/@abaplint/transpiler/build/src/transpile_types.js");
79642
+ const unique_identifier_1 = __webpack_require__(/*! ../unique_identifier */ "./node_modules/@abaplint/transpiler/build/src/unique_identifier.js");
79643
+ class FilterBodyTranspiler {
79644
+ transpile(typ, body, traversal) {
79645
+ if (!(typ.get() instanceof core_1.Expressions.TypeNameOrInfer)) {
79646
+ throw new Error("FilterBodyTranspiler, Expected TypeNameOrInfer");
79647
+ }
79648
+ else if (body.findDirectTokenByText("EXCEPT")) {
79649
+ return new chunk_1.Chunk(`throw new Error("FilterBodyTranspiler EXCEPT in, not supported, transpiler");`);
79650
+ }
79651
+ const source = traversal.traverse(body.findDirectExpression(core_1.Expressions.Source)).getCode();
79652
+ const type = new type_name_or_infer_1.TypeNameOrInfer().findType(typ, traversal);
79653
+ const target = transpile_types_1.TranspileTypes.toType(type);
79654
+ const ret = new chunk_1.Chunk();
79655
+ ret.appendString("(await (async () => {\n");
79656
+ let loopWhere = "";
79657
+ const whereNode = body.findDirectExpression(core_1.Expressions.ComponentCond);
79658
+ if (whereNode) {
79659
+ const where = traversal.traverse(whereNode).getCode();
79660
+ loopWhere = `, {"where": async ` + where + `}`;
79661
+ }
79662
+ const id = unique_identifier_1.UniqueIdentifier.get();
79663
+ const loop = unique_identifier_1.UniqueIdentifier.get();
79664
+ ret.appendString(`const ${id} = ${target};\n`);
79665
+ ret.appendString(`for await (const ${loop} of abap.statements.loop(${source}${loopWhere})) {\n`);
79666
+ ret.appendString(`abap.statements.insertInternal({"table": ${id}, "data": ${loop}});\n`);
79667
+ ret.appendString(`}\n`);
79668
+ ret.appendString(`return ${id};\n`);
79669
+ ret.appendString("})())");
79670
+ return ret;
79671
+ }
79672
+ }
79673
+ exports.FilterBodyTranspiler = FilterBodyTranspiler;
79674
+ //# sourceMappingURL=filter_body.js.map
79675
+
79676
+ /***/ }),
79677
+
79628
79678
  /***/ "./node_modules/@abaplint/transpiler/build/src/expressions/function_exporting.js":
79629
79679
  /*!***************************************************************************************!*\
79630
79680
  !*** ./node_modules/@abaplint/transpiler/build/src/expressions/function_exporting.js ***!
@@ -80634,6 +80684,7 @@ const chunk_1 = __webpack_require__(/*! ../chunk */ "./node_modules/@abaplint/tr
80634
80684
  const transpile_types_1 = __webpack_require__(/*! ../transpile_types */ "./node_modules/@abaplint/transpiler/build/src/transpile_types.js");
80635
80685
  const value_body_1 = __webpack_require__(/*! ./value_body */ "./node_modules/@abaplint/transpiler/build/src/expressions/value_body.js");
80636
80686
  const corresponding_body_1 = __webpack_require__(/*! ./corresponding_body */ "./node_modules/@abaplint/transpiler/build/src/expressions/corresponding_body.js");
80687
+ const filter_body_1 = __webpack_require__(/*! ./filter_body */ "./node_modules/@abaplint/transpiler/build/src/expressions/filter_body.js");
80637
80688
  class SourceTranspiler {
80638
80689
  addGet;
80639
80690
  constructor(addGet = false) {
@@ -80725,6 +80776,9 @@ class SourceTranspiler {
80725
80776
  else if (c.get() instanceof core_1.Expressions.SwitchBody) {
80726
80777
  continue;
80727
80778
  }
80779
+ else if (c.get() instanceof core_1.Expressions.FilterBody) {
80780
+ continue;
80781
+ }
80728
80782
  else {
80729
80783
  ret.appendString("SourceUnknown$" + c.get().constructor.name);
80730
80784
  }
@@ -80791,6 +80845,17 @@ class SourceTranspiler {
80791
80845
  }
80792
80846
  ret.appendChunk(new _1.SwitchBodyTranspiler().transpile(typ, switchBody, traversal));
80793
80847
  }
80848
+ else if (c instanceof core_1.Nodes.TokenNode && c.getFirstToken().getStr().toUpperCase() === "FILTER") {
80849
+ const typ = node.findDirectExpression(core_1.Expressions.TypeNameOrInfer);
80850
+ if (typ === undefined) {
80851
+ throw new Error("TypeNameOrInfer not found in FilterBody");
80852
+ }
80853
+ const filterBody = node.findDirectExpression(core_1.Expressions.FilterBody);
80854
+ if (filterBody === undefined) {
80855
+ throw new Error("FilterBody not found");
80856
+ }
80857
+ ret.appendChunk(new filter_body_1.FilterBodyTranspiler().transpile(typ, filterBody, traversal));
80858
+ }
80794
80859
  else if (c instanceof core_1.Nodes.TokenNode && c.getFirstToken().getStr().toUpperCase() === "REF") {
80795
80860
  const infer = node.findDirectExpression(core_1.Expressions.TypeNameOrInfer);
80796
80861
  if (infer?.concatTokens() !== "#") {
@@ -86342,9 +86407,9 @@ __exportStar(__webpack_require__(/*! ./class_definition_load */ "./node_modules/
86342
86407
  __exportStar(__webpack_require__(/*! ./class_implementation */ "./node_modules/@abaplint/transpiler/build/src/statements/class_implementation.js"), exports);
86343
86408
  __exportStar(__webpack_require__(/*! ./class_local_friends */ "./node_modules/@abaplint/transpiler/build/src/statements/class_local_friends.js"), exports);
86344
86409
  __exportStar(__webpack_require__(/*! ./clear */ "./node_modules/@abaplint/transpiler/build/src/statements/clear.js"), exports);
86410
+ __exportStar(__webpack_require__(/*! ./static */ "./node_modules/@abaplint/transpiler/build/src/statements/static.js"), exports);
86345
86411
  __exportStar(__webpack_require__(/*! ./close_cursor */ "./node_modules/@abaplint/transpiler/build/src/statements/close_cursor.js"), exports);
86346
86412
  __exportStar(__webpack_require__(/*! ./close_dataset */ "./node_modules/@abaplint/transpiler/build/src/statements/close_dataset.js"), exports);
86347
- __exportStar(__webpack_require__(/*! ./transfer */ "./node_modules/@abaplint/transpiler/build/src/statements/transfer.js"), exports);
86348
86413
  __exportStar(__webpack_require__(/*! ./collect */ "./node_modules/@abaplint/transpiler/build/src/statements/collect.js"), exports);
86349
86414
  __exportStar(__webpack_require__(/*! ./commit */ "./node_modules/@abaplint/transpiler/build/src/statements/commit.js"), exports);
86350
86415
  __exportStar(__webpack_require__(/*! ./compute */ "./node_modules/@abaplint/transpiler/build/src/statements/compute.js"), exports);
@@ -86461,11 +86526,13 @@ __exportStar(__webpack_require__(/*! ./subtract */ "./node_modules/@abaplint/tra
86461
86526
  __exportStar(__webpack_require__(/*! ./syntax_check */ "./node_modules/@abaplint/transpiler/build/src/statements/syntax_check.js"), exports);
86462
86527
  __exportStar(__webpack_require__(/*! ./system_call */ "./node_modules/@abaplint/transpiler/build/src/statements/system_call.js"), exports);
86463
86528
  __exportStar(__webpack_require__(/*! ./tables */ "./node_modules/@abaplint/transpiler/build/src/statements/tables.js"), exports);
86529
+ __exportStar(__webpack_require__(/*! ./transfer */ "./node_modules/@abaplint/transpiler/build/src/statements/transfer.js"), exports);
86464
86530
  __exportStar(__webpack_require__(/*! ./translate */ "./node_modules/@abaplint/transpiler/build/src/statements/translate.js"), exports);
86465
86531
  __exportStar(__webpack_require__(/*! ./truncate_dataset */ "./node_modules/@abaplint/transpiler/build/src/statements/truncate_dataset.js"), exports);
86466
86532
  __exportStar(__webpack_require__(/*! ./try */ "./node_modules/@abaplint/transpiler/build/src/statements/try.js"), exports);
86467
86533
  __exportStar(__webpack_require__(/*! ./type_pools */ "./node_modules/@abaplint/transpiler/build/src/statements/type_pools.js"), exports);
86468
86534
  __exportStar(__webpack_require__(/*! ./type */ "./node_modules/@abaplint/transpiler/build/src/statements/type.js"), exports);
86535
+ __exportStar(__webpack_require__(/*! ./uline */ "./node_modules/@abaplint/transpiler/build/src/statements/uline.js"), exports);
86469
86536
  __exportStar(__webpack_require__(/*! ./unassign */ "./node_modules/@abaplint/transpiler/build/src/statements/unassign.js"), exports);
86470
86537
  __exportStar(__webpack_require__(/*! ./unpack */ "./node_modules/@abaplint/transpiler/build/src/statements/unpack.js"), exports);
86471
86538
  __exportStar(__webpack_require__(/*! ./update_database */ "./node_modules/@abaplint/transpiler/build/src/statements/update_database.js"), exports);
@@ -88969,6 +89036,27 @@ exports.StartOfSelectionTranspiler = StartOfSelectionTranspiler;
88969
89036
 
88970
89037
  /***/ }),
88971
89038
 
89039
+ /***/ "./node_modules/@abaplint/transpiler/build/src/statements/static.js":
89040
+ /*!**************************************************************************!*\
89041
+ !*** ./node_modules/@abaplint/transpiler/build/src/statements/static.js ***!
89042
+ \**************************************************************************/
89043
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
89044
+
89045
+ "use strict";
89046
+
89047
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
89048
+ exports.StaticTranspiler = void 0;
89049
+ const chunk_1 = __webpack_require__(/*! ../chunk */ "./node_modules/@abaplint/transpiler/build/src/chunk.js");
89050
+ class StaticTranspiler {
89051
+ transpile(_node, _traversal) {
89052
+ return new chunk_1.Chunk(`throw new Error("Statics, not supported, transpiler");`);
89053
+ }
89054
+ }
89055
+ exports.StaticTranspiler = StaticTranspiler;
89056
+ //# sourceMappingURL=static.js.map
89057
+
89058
+ /***/ }),
89059
+
88972
89060
  /***/ "./node_modules/@abaplint/transpiler/build/src/statements/submit.js":
88973
89061
  /*!**************************************************************************!*\
88974
89062
  !*** ./node_modules/@abaplint/transpiler/build/src/statements/submit.js ***!
@@ -89249,6 +89337,29 @@ exports.TypePoolsTranspiler = TypePoolsTranspiler;
89249
89337
 
89250
89338
  /***/ }),
89251
89339
 
89340
+ /***/ "./node_modules/@abaplint/transpiler/build/src/statements/uline.js":
89341
+ /*!*************************************************************************!*\
89342
+ !*** ./node_modules/@abaplint/transpiler/build/src/statements/uline.js ***!
89343
+ \*************************************************************************/
89344
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
89345
+
89346
+ "use strict";
89347
+
89348
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
89349
+ exports.UlineTranspiler = void 0;
89350
+ const chunk_1 = __webpack_require__(/*! ../chunk */ "./node_modules/@abaplint/transpiler/build/src/chunk.js");
89351
+ class UlineTranspiler {
89352
+ transpile(_node, _traversal) {
89353
+ const chunk = new chunk_1.Chunk();
89354
+ chunk.appendString(`abap.statements.write("--------------------------------------------------", {"newLine": true});`);
89355
+ return chunk;
89356
+ }
89357
+ }
89358
+ exports.UlineTranspiler = UlineTranspiler;
89359
+ //# sourceMappingURL=uline.js.map
89360
+
89361
+ /***/ }),
89362
+
89252
89363
  /***/ "./node_modules/@abaplint/transpiler/build/src/statements/unassign.js":
89253
89364
  /*!****************************************************************************!*\
89254
89365
  !*** ./node_modules/@abaplint/transpiler/build/src/statements/unassign.js ***!
@@ -92217,7 +92328,7 @@ exports.config = {
92217
92328
  "communication": true,
92218
92329
  "systemCall": true,
92219
92330
  "break": false,
92220
- "statics": true,
92331
+ "statics": false,
92221
92332
  "endselect": false,
92222
92333
  "defaultKey": false,
92223
92334
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/transpiler-cli",
3
- "version": "2.11.67",
3
+ "version": "2.11.69",
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.193",
31
- "@abaplint/transpiler": "^2.11.67",
30
+ "@abaplint/core": "^2.113.194",
31
+ "@abaplint/transpiler": "^2.11.69",
32
32
  "@types/glob": "^8.1.0",
33
33
  "@types/node": "^24.3.0",
34
34
  "@types/progress": "^2.0.7",