@abaplint/transpiler-cli 2.11.68 → 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 +90 -3
  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,6 +86407,7 @@ __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
86413
  __exportStar(__webpack_require__(/*! ./collect */ "./node_modules/@abaplint/transpiler/build/src/statements/collect.js"), exports);
@@ -88970,6 +89036,27 @@ exports.StartOfSelectionTranspiler = StartOfSelectionTranspiler;
88970
89036
 
88971
89037
  /***/ }),
88972
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
+
88973
89060
  /***/ "./node_modules/@abaplint/transpiler/build/src/statements/submit.js":
88974
89061
  /*!**************************************************************************!*\
88975
89062
  !*** ./node_modules/@abaplint/transpiler/build/src/statements/submit.js ***!
@@ -92241,7 +92328,7 @@ exports.config = {
92241
92328
  "communication": true,
92242
92329
  "systemCall": true,
92243
92330
  "break": false,
92244
- "statics": true,
92331
+ "statics": false,
92245
92332
  "endselect": false,
92246
92333
  "defaultKey": false,
92247
92334
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/transpiler-cli",
3
- "version": "2.11.68",
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.68",
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",