@abaplint/transpiler-cli 1.7.26 → 1.7.27

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 +28 -6
  2. package/package.json +3 -3
package/build/bundle.js CHANGED
@@ -13029,7 +13029,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
13029
13029
  /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
13030
13030
 
13031
13031
  "use strict";
13032
- eval("\r\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}));\r\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\r\n};\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n__exportStar(__webpack_require__(/*! ./arith_operator */ \"./node_modules/@abaplint/transpiler/build/src/expressions/arith_operator.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./attribute_chain */ \"./node_modules/@abaplint/transpiler/build/src/expressions/attribute_chain.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./attribute_name */ \"./node_modules/@abaplint/transpiler/build/src/expressions/attribute_name.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./call_transformation_options */ \"./node_modules/@abaplint/transpiler/build/src/expressions/call_transformation_options.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./call_transformation_parameters */ \"./node_modules/@abaplint/transpiler/build/src/expressions/call_transformation_parameters.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./compare_operator */ \"./node_modules/@abaplint/transpiler/build/src/expressions/compare_operator.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./compare */ \"./node_modules/@abaplint/transpiler/build/src/expressions/compare.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./component_chain_simple */ \"./node_modules/@abaplint/transpiler/build/src/expressions/component_chain_simple.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./component_chain */ \"./node_modules/@abaplint/transpiler/build/src/expressions/component_chain.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./component_compare */ \"./node_modules/@abaplint/transpiler/build/src/expressions/component_compare.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./component_cond */ \"./node_modules/@abaplint/transpiler/build/src/expressions/component_cond.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./cond_sub */ \"./node_modules/@abaplint/transpiler/build/src/expressions/cond_sub.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./cond */ \"./node_modules/@abaplint/transpiler/build/src/expressions/cond.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./constant */ \"./node_modules/@abaplint/transpiler/build/src/expressions/constant.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./database_table */ \"./node_modules/@abaplint/transpiler/build/src/expressions/database_table.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./field_chain */ \"./node_modules/@abaplint/transpiler/build/src/expressions/field_chain.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./field_length */ \"./node_modules/@abaplint/transpiler/build/src/expressions/field_length.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./field_offset */ \"./node_modules/@abaplint/transpiler/build/src/expressions/field_offset.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./field_symbol */ \"./node_modules/@abaplint/transpiler/build/src/expressions/field_symbol.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./function_exporting */ \"./node_modules/@abaplint/transpiler/build/src/expressions/function_exporting.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./function_parameters */ \"./node_modules/@abaplint/transpiler/build/src/expressions/function_parameters.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./method_call_chain */ \"./node_modules/@abaplint/transpiler/build/src/expressions/method_call_chain.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./method_call */ \"./node_modules/@abaplint/transpiler/build/src/expressions/method_call.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./method_source */ \"./node_modules/@abaplint/transpiler/build/src/expressions/method_source.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./parameter_list_s */ \"./node_modules/@abaplint/transpiler/build/src/expressions/parameter_list_s.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./parameter_list_t */ \"./node_modules/@abaplint/transpiler/build/src/expressions/parameter_list_t.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./parameter_name */ \"./node_modules/@abaplint/transpiler/build/src/expressions/parameter_name.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./parameter_s */ \"./node_modules/@abaplint/transpiler/build/src/expressions/parameter_s.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./parameter_t */ \"./node_modules/@abaplint/transpiler/build/src/expressions/parameter_t.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./simple_source1 */ \"./node_modules/@abaplint/transpiler/build/src/expressions/simple_source1.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./simple_source2 */ \"./node_modules/@abaplint/transpiler/build/src/expressions/simple_source2.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./simple_source3 */ \"./node_modules/@abaplint/transpiler/build/src/expressions/simple_source3.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./simple_source4 */ \"./node_modules/@abaplint/transpiler/build/src/expressions/simple_source4.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./source_field_symbol */ \"./node_modules/@abaplint/transpiler/build/src/expressions/source_field_symbol.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./source */ \"./node_modules/@abaplint/transpiler/build/src/expressions/source.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./sql_source */ \"./node_modules/@abaplint/transpiler/build/src/expressions/sql_source.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./string_template_source */ \"./node_modules/@abaplint/transpiler/build/src/expressions/string_template_source.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./string_template */ \"./node_modules/@abaplint/transpiler/build/src/expressions/string_template.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./target */ \"./node_modules/@abaplint/transpiler/build/src/expressions/target.js\"), exports);\r\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack://@abaplint/transpiler-cli/./node_modules/@abaplint/transpiler/build/src/expressions/index.js?");
13032
+ eval("\r\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}));\r\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\r\n};\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n__exportStar(__webpack_require__(/*! ./arith_operator */ \"./node_modules/@abaplint/transpiler/build/src/expressions/arith_operator.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./attribute_chain */ \"./node_modules/@abaplint/transpiler/build/src/expressions/attribute_chain.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./attribute_name */ \"./node_modules/@abaplint/transpiler/build/src/expressions/attribute_name.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./call_transformation_options */ \"./node_modules/@abaplint/transpiler/build/src/expressions/call_transformation_options.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./call_transformation_parameters */ \"./node_modules/@abaplint/transpiler/build/src/expressions/call_transformation_parameters.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./compare_operator */ \"./node_modules/@abaplint/transpiler/build/src/expressions/compare_operator.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./compare */ \"./node_modules/@abaplint/transpiler/build/src/expressions/compare.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./component_chain_simple */ \"./node_modules/@abaplint/transpiler/build/src/expressions/component_chain_simple.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./component_chain */ \"./node_modules/@abaplint/transpiler/build/src/expressions/component_chain.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./component_compare */ \"./node_modules/@abaplint/transpiler/build/src/expressions/component_compare.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./component_cond */ \"./node_modules/@abaplint/transpiler/build/src/expressions/component_cond.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./cond_sub */ \"./node_modules/@abaplint/transpiler/build/src/expressions/cond_sub.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./cond */ \"./node_modules/@abaplint/transpiler/build/src/expressions/cond.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./constant */ \"./node_modules/@abaplint/transpiler/build/src/expressions/constant.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./database_table */ \"./node_modules/@abaplint/transpiler/build/src/expressions/database_table.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./field_chain */ \"./node_modules/@abaplint/transpiler/build/src/expressions/field_chain.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./field_length */ \"./node_modules/@abaplint/transpiler/build/src/expressions/field_length.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./field_offset */ \"./node_modules/@abaplint/transpiler/build/src/expressions/field_offset.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./field_symbol */ \"./node_modules/@abaplint/transpiler/build/src/expressions/field_symbol.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./function_exporting */ \"./node_modules/@abaplint/transpiler/build/src/expressions/function_exporting.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./function_parameters */ \"./node_modules/@abaplint/transpiler/build/src/expressions/function_parameters.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./method_call_body */ \"./node_modules/@abaplint/transpiler/build/src/expressions/method_call_body.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./method_call_chain */ \"./node_modules/@abaplint/transpiler/build/src/expressions/method_call_chain.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./method_call_param */ \"./node_modules/@abaplint/transpiler/build/src/expressions/method_call_param.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./method_call */ \"./node_modules/@abaplint/transpiler/build/src/expressions/method_call.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./method_parameters */ \"./node_modules/@abaplint/transpiler/build/src/expressions/method_parameters.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./method_source */ \"./node_modules/@abaplint/transpiler/build/src/expressions/method_source.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./parameter_list_s */ \"./node_modules/@abaplint/transpiler/build/src/expressions/parameter_list_s.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./parameter_list_t */ \"./node_modules/@abaplint/transpiler/build/src/expressions/parameter_list_t.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./parameter_name */ \"./node_modules/@abaplint/transpiler/build/src/expressions/parameter_name.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./parameter_s */ \"./node_modules/@abaplint/transpiler/build/src/expressions/parameter_s.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./parameter_t */ \"./node_modules/@abaplint/transpiler/build/src/expressions/parameter_t.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./simple_source1 */ \"./node_modules/@abaplint/transpiler/build/src/expressions/simple_source1.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./simple_source2 */ \"./node_modules/@abaplint/transpiler/build/src/expressions/simple_source2.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./simple_source3 */ \"./node_modules/@abaplint/transpiler/build/src/expressions/simple_source3.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./simple_source4 */ \"./node_modules/@abaplint/transpiler/build/src/expressions/simple_source4.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./source_field_symbol */ \"./node_modules/@abaplint/transpiler/build/src/expressions/source_field_symbol.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./source */ \"./node_modules/@abaplint/transpiler/build/src/expressions/source.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./sql_source */ \"./node_modules/@abaplint/transpiler/build/src/expressions/sql_source.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./string_template_source */ \"./node_modules/@abaplint/transpiler/build/src/expressions/string_template_source.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./string_template */ \"./node_modules/@abaplint/transpiler/build/src/expressions/string_template.js\"), exports);\r\n__exportStar(__webpack_require__(/*! ./target */ \"./node_modules/@abaplint/transpiler/build/src/expressions/target.js\"), exports);\r\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack://@abaplint/transpiler-cli/./node_modules/@abaplint/transpiler/build/src/expressions/index.js?");
13033
13033
 
13034
13034
  /***/ }),
13035
13035
 
@@ -13040,7 +13040,18 @@ eval("\r\nvar __createBinding = (this && this.__createBinding) || (Object.create
13040
13040
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
13041
13041
 
13042
13042
  "use strict";
13043
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.MethodCallTranspiler = void 0;\r\nconst core_1 = __webpack_require__(/*! @abaplint/core */ \"./node_modules/@abaplint/core/build/src/index.js\");\r\nconst method_call_param_1 = __webpack_require__(/*! ./method_call_param */ \"./node_modules/@abaplint/transpiler/build/src/expressions/method_call_param.js\");\r\nconst chunk_1 = __webpack_require__(/*! ../chunk */ \"./node_modules/@abaplint/transpiler/build/src/chunk.js\");\r\nclass MethodCallTranspiler {\r\n transpile(node, traversal) {\r\n var _a;\r\n const nameToken = (_a = node.findDirectExpression(core_1.Expressions.MethodName)) === null || _a === void 0 ? void 0 : _a.getFirstToken();\r\n if (nameToken === undefined) {\r\n throw new Error(\"MethodCallTranspiler, name not found\");\r\n }\r\n let name = nameToken.getStr().toLowerCase();\r\n if (traversal.isBuiltinMethod(nameToken)) {\r\n name = \"abap.builtin.\" + name + \"(\";\r\n }\r\n else {\r\n name = name + \"(\";\r\n }\r\n const m = traversal.findMethodReference(nameToken, traversal.findCurrentScopeByToken(nameToken));\r\n if ((m === null || m === void 0 ? void 0 : m.name) && traversal.isBuiltinMethod(nameToken) === false) {\r\n name = m.name.toLowerCase() + \"(\";\r\n }\r\n const step = node.findDirectExpression(core_1.Expressions.MethodCallParam);\r\n if (step === undefined) {\r\n throw new Error(\"MethodCallTranspiler, unexpected node\");\r\n }\r\n const ret = new chunk_1.Chunk();\r\n ret.append(name.replace(\"~\", \"$\"), nameToken, traversal);\r\n ret.appendChunk(new method_call_param_1.MethodCallParam(m === null || m === void 0 ? void 0 : m.def).transpile(step, traversal));\r\n ret.appendString(\")\");\r\n return ret;\r\n }\r\n}\r\nexports.MethodCallTranspiler = MethodCallTranspiler;\r\n//# sourceMappingURL=method_call.js.map\n\n//# sourceURL=webpack://@abaplint/transpiler-cli/./node_modules/@abaplint/transpiler/build/src/expressions/method_call.js?");
13043
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.MethodCallTranspiler = void 0;\r\nconst core_1 = __webpack_require__(/*! @abaplint/core */ \"./node_modules/@abaplint/core/build/src/index.js\");\r\nconst method_call_param_1 = __webpack_require__(/*! ./method_call_param */ \"./node_modules/@abaplint/transpiler/build/src/expressions/method_call_param.js\");\r\nconst chunk_1 = __webpack_require__(/*! ../chunk */ \"./node_modules/@abaplint/transpiler/build/src/chunk.js\");\r\nclass MethodCallTranspiler {\r\n transpile(node, traversal) {\r\n var _a;\r\n const nameToken = (_a = node.findDirectExpression(core_1.Expressions.MethodName)) === null || _a === void 0 ? void 0 : _a.getFirstToken();\r\n if (nameToken === undefined) {\r\n throw new Error(\"MethodCallTranspiler, name not found\");\r\n }\r\n let name = nameToken.getStr().toLowerCase();\r\n if (traversal.isBuiltinMethod(nameToken)) {\r\n name = \"abap.builtin.\" + name + \"(\";\r\n }\r\n else {\r\n name = name + \"(\";\r\n }\r\n const m = traversal.findMethodReference(nameToken, traversal.findCurrentScopeByToken(nameToken));\r\n if ((m === null || m === void 0 ? void 0 : m.name) && traversal.isBuiltinMethod(nameToken) === false) {\r\n name = m.name.toLowerCase() + \"(\";\r\n }\r\n const step = node.findDirectExpression(core_1.Expressions.MethodCallParam);\r\n if (step === undefined) {\r\n throw new Error(\"MethodCallTranspiler, unexpected node\");\r\n }\r\n const ret = new chunk_1.Chunk();\r\n ret.append(name.replace(\"~\", \"$\"), nameToken, traversal);\r\n ret.appendChunk(new method_call_param_1.MethodCallParamTranspiler(m === null || m === void 0 ? void 0 : m.def).transpile(step, traversal));\r\n ret.appendString(\")\");\r\n return ret;\r\n }\r\n}\r\nexports.MethodCallTranspiler = MethodCallTranspiler;\r\n//# sourceMappingURL=method_call.js.map\n\n//# sourceURL=webpack://@abaplint/transpiler-cli/./node_modules/@abaplint/transpiler/build/src/expressions/method_call.js?");
13044
+
13045
+ /***/ }),
13046
+
13047
+ /***/ "./node_modules/@abaplint/transpiler/build/src/expressions/method_call_body.js":
13048
+ /*!*************************************************************************************!*\
13049
+ !*** ./node_modules/@abaplint/transpiler/build/src/expressions/method_call_body.js ***!
13050
+ \*************************************************************************************/
13051
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
13052
+
13053
+ "use strict";
13054
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.MethodCallBodyTranspiler = void 0;\r\nconst chunk_1 = __webpack_require__(/*! ../chunk */ \"./node_modules/@abaplint/transpiler/build/src/chunk.js\");\r\nclass MethodCallBodyTranspiler {\r\n transpile(node, traversal) {\r\n const ret = new chunk_1.Chunk();\r\n for (const c of node.getChildren()) {\r\n ret.appendChunk(traversal.traverse(c));\r\n }\r\n return ret;\r\n }\r\n}\r\nexports.MethodCallBodyTranspiler = MethodCallBodyTranspiler;\r\n//# sourceMappingURL=method_call_body.js.map\n\n//# sourceURL=webpack://@abaplint/transpiler-cli/./node_modules/@abaplint/transpiler/build/src/expressions/method_call_body.js?");
13044
13055
 
13045
13056
  /***/ }),
13046
13057
 
@@ -13062,7 +13073,18 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
13062
13073
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
13063
13074
 
13064
13075
  "use strict";
13065
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.MethodCallParam = void 0;\r\nconst core_1 = __webpack_require__(/*! @abaplint/core */ \"./node_modules/@abaplint/core/build/src/index.js\");\r\nconst chunk_1 = __webpack_require__(/*! ../chunk */ \"./node_modules/@abaplint/transpiler/build/src/chunk.js\");\r\nclass MethodCallParam {\r\n constructor(m) {\r\n this.m = m;\r\n }\r\n transpile(node, traversal) {\r\n var _a, _b;\r\n let name = \"\";\r\n if (!(node.get() instanceof core_1.Expressions.MethodCallParam)) {\r\n throw new Error(\"MethodCallParam, unexpected node, \" + (node === null || node === void 0 ? void 0 : node.get().constructor.name));\r\n }\r\n const source = node.findDirectExpression(core_1.Expressions.Source);\r\n if (source) {\r\n const def = (_b = (_a = this.m) === null || _a === void 0 ? void 0 : _a.getParameters().getDefaultImporting()) === null || _b === void 0 ? void 0 : _b.toLowerCase();\r\n if (this.m === undefined || def === undefined) {\r\n return traversal.traverse(source);\r\n }\r\n else {\r\n return new chunk_1.Chunk()\r\n .appendString(\"{\" + def + \": \")\r\n .appendChunk(traversal.traverse(source))\r\n .appendString(\"}\");\r\n }\r\n }\r\n const parameters = node.findDirectExpression(core_1.Expressions.ParameterListS);\r\n if (parameters) {\r\n return traversal.traverse(parameters);\r\n }\r\n else {\r\n const params = node.findDirectExpression(core_1.Expressions.MethodParameters);\r\n if (params) {\r\n const s = params.findDirectExpression(core_1.Expressions.ParameterListS);\r\n if (s) {\r\n name += traversal.traverse(s).getCode();\r\n }\r\n for (const t of params.findDirectExpressions(core_1.Expressions.ParameterListT)) {\r\n name += traversal.traverse(t).getCode();\r\n }\r\n }\r\n }\r\n name = name.replace(/}{/g, \", \");\r\n return new chunk_1.Chunk(name);\r\n }\r\n}\r\nexports.MethodCallParam = MethodCallParam;\r\n//# sourceMappingURL=method_call_param.js.map\n\n//# sourceURL=webpack://@abaplint/transpiler-cli/./node_modules/@abaplint/transpiler/build/src/expressions/method_call_param.js?");
13076
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.MethodCallParamTranspiler = void 0;\r\nconst core_1 = __webpack_require__(/*! @abaplint/core */ \"./node_modules/@abaplint/core/build/src/index.js\");\r\nconst chunk_1 = __webpack_require__(/*! ../chunk */ \"./node_modules/@abaplint/transpiler/build/src/chunk.js\");\r\nclass MethodCallParamTranspiler {\r\n constructor(m) {\r\n this.m = m;\r\n }\r\n transpile(node, traversal) {\r\n var _a, _b;\r\n let name = \"\";\r\n if (!(node.get() instanceof core_1.Expressions.MethodCallParam)) {\r\n throw new Error(\"MethodCallParam, unexpected node, \" + (node === null || node === void 0 ? void 0 : node.get().constructor.name));\r\n }\r\n const source = node.findDirectExpression(core_1.Expressions.Source);\r\n if (source) {\r\n const def = (_b = (_a = this.m) === null || _a === void 0 ? void 0 : _a.getParameters().getDefaultImporting()) === null || _b === void 0 ? void 0 : _b.toLowerCase();\r\n if (this.m === undefined || def === undefined) {\r\n return traversal.traverse(source);\r\n }\r\n else {\r\n return new chunk_1.Chunk()\r\n .appendString(\"{\" + def + \": \")\r\n .appendChunk(traversal.traverse(source))\r\n .appendString(\"}\");\r\n }\r\n }\r\n const parameters = node.findDirectExpression(core_1.Expressions.ParameterListS);\r\n if (parameters) {\r\n return traversal.traverse(parameters);\r\n }\r\n else {\r\n const params = node.findDirectExpression(core_1.Expressions.MethodParameters);\r\n if (params) {\r\n const s = params.findDirectExpression(core_1.Expressions.ParameterListS);\r\n if (s) {\r\n name += traversal.traverse(s).getCode();\r\n }\r\n for (const t of params.findDirectExpressions(core_1.Expressions.ParameterListT)) {\r\n name += traversal.traverse(t).getCode();\r\n }\r\n }\r\n }\r\n name = name.replace(/}{/g, \", \");\r\n return new chunk_1.Chunk(name);\r\n }\r\n}\r\nexports.MethodCallParamTranspiler = MethodCallParamTranspiler;\r\n//# sourceMappingURL=method_call_param.js.map\n\n//# sourceURL=webpack://@abaplint/transpiler-cli/./node_modules/@abaplint/transpiler/build/src/expressions/method_call_param.js?");
13077
+
13078
+ /***/ }),
13079
+
13080
+ /***/ "./node_modules/@abaplint/transpiler/build/src/expressions/method_parameters.js":
13081
+ /*!**************************************************************************************!*\
13082
+ !*** ./node_modules/@abaplint/transpiler/build/src/expressions/method_parameters.js ***!
13083
+ \**************************************************************************************/
13084
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
13085
+
13086
+ "use strict";
13087
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.MethodParametersTranspiler = void 0;\r\nconst core_1 = __webpack_require__(/*! @abaplint/core */ \"./node_modules/@abaplint/core/build/src/index.js\");\r\nconst chunk_1 = __webpack_require__(/*! ../chunk */ \"./node_modules/@abaplint/transpiler/build/src/chunk.js\");\r\nclass MethodParametersTranspiler {\r\n transpile(node, traversal) {\r\n const ret = new chunk_1.Chunk(\"{\");\r\n for (const s of node.findAllExpressions(core_1.Expressions.ParameterS)) {\r\n if (ret.getCode() !== \"{\") {\r\n ret.appendString(\",\");\r\n }\r\n ret.appendChunk(traversal.traverse(s));\r\n }\r\n const receiving = node.findExpressionAfterToken(\"RECEIVING\");\r\n for (const t of node.findAllExpressions(core_1.Expressions.ParameterT)) {\r\n if (t === receiving) {\r\n continue;\r\n }\r\n if (ret.getCode() !== \"{\") {\r\n ret.appendString(\",\");\r\n }\r\n ret.appendChunk(traversal.traverse(t));\r\n }\r\n ret.appendString(\"}\");\r\n if (ret.getCode() === \"{}\") {\r\n return new chunk_1.Chunk();\r\n }\r\n else {\r\n return ret;\r\n }\r\n }\r\n}\r\nexports.MethodParametersTranspiler = MethodParametersTranspiler;\r\n//# sourceMappingURL=method_parameters.js.map\n\n//# sourceURL=webpack://@abaplint/transpiler-cli/./node_modules/@abaplint/transpiler/build/src/expressions/method_parameters.js?");
13066
13088
 
13067
13089
  /***/ }),
13068
13090
 
@@ -13073,7 +13095,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
13073
13095
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
13074
13096
 
13075
13097
  "use strict";
13076
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.MethodSourceTranspiler = void 0;\r\nconst core_1 = __webpack_require__(/*! @abaplint/core */ \"./node_modules/@abaplint/core/build/src/index.js\");\r\nconst chunk_1 = __webpack_require__(/*! ../chunk */ \"./node_modules/@abaplint/transpiler/build/src/chunk.js\");\r\nclass MethodSourceTranspiler {\r\n transpile(node, traversal) {\r\n const ret = new chunk_1.Chunk();\r\n const children = node.getChildren();\r\n for (let i = 0; i < children.length; i++) {\r\n const child = children[i];\r\n const nextChild = children[i + 1];\r\n if (child.get() instanceof core_1.Expressions.ClassName) {\r\n ret.appendString(traversal.lookupClassOrInterface(child.concatTokens(), child.getFirstToken()));\r\n }\r\n else if (child.get() instanceof core_1.Expressions.Dynamic && (nextChild === null || nextChild === void 0 ? void 0 : nextChild.concatTokens()) === \"=>\") {\r\n const second = child.getChildren()[1];\r\n if (second.get() instanceof core_1.Expressions.FieldChain) {\r\n ret.appendChunk(traversal.traverse(second));\r\n }\r\n else if (second.get() instanceof core_1.Expressions.Constant) {\r\n const lookup = traversal.lookupClassOrInterface(second.getFirstToken().getStr(), child.getFirstToken(), true);\r\n const lookupException = traversal.lookupClassOrInterface(\"'CX_SY_DYN_CALL_ILLEGAL_CLASS'\", child.getFirstToken(), true);\r\n // eslint-disable-next-line max-len\r\n ret.appendString(`if (${lookup} === undefined && ${lookupException} === undefined) { throw \"CX_SY_DYN_CALL_ILLEGAL_CLASS not found\"; }\\n`);\r\n ret.appendString(`if (${lookup} === undefined) { throw new ${lookupException}(); }\\n`);\r\n ret.appendString(lookup);\r\n }\r\n else {\r\n ret.appendString(\"MethodSourceTranspiler-Unexpected\");\r\n }\r\n }\r\n else if (child.get() instanceof core_1.Expressions.Dynamic) {\r\n const second = child.getChildren()[1];\r\n if (second.get() instanceof core_1.Expressions.FieldChain) {\r\n ret.appendChunk(traversal.traverse(second));\r\n }\r\n else if (second.get() instanceof core_1.Expressions.Constant) {\r\n ret.appendString(second.getFirstToken().getStr().replace(/\\'/g, \"\").toLowerCase().replace(\"~\", \"$\"));\r\n }\r\n else {\r\n ret.appendString(\"MethodSourceTranspiler-Unexpected\");\r\n }\r\n }\r\n else if (child.get() instanceof core_1.Expressions.MethodName) {\r\n const methodName = child.concatTokens().toLowerCase().replace(\"~\", \"$\");\r\n ret.append(methodName, child.getFirstToken().getStart(), traversal);\r\n }\r\n else if (child.concatTokens() === \"=>\") {\r\n ret.append(\".\", child.getFirstToken().getStart(), traversal);\r\n }\r\n else if (child.concatTokens() === \"->\") {\r\n if (ret.getCode() === \"super\") {\r\n ret.append(\".\", child, traversal);\r\n }\r\n else {\r\n ret.append(\".get().\", child, traversal);\r\n }\r\n }\r\n else if (child.get() instanceof core_1.Expressions.FieldChain) {\r\n ret.appendChunk(traversal.traverse(child));\r\n }\r\n else {\r\n ret.appendString(\"MethodSourceTranspiler-\" + child.get().constructor.name + \"-todo\");\r\n }\r\n }\r\n return ret;\r\n }\r\n}\r\nexports.MethodSourceTranspiler = MethodSourceTranspiler;\r\n//# sourceMappingURL=method_source.js.map\n\n//# sourceURL=webpack://@abaplint/transpiler-cli/./node_modules/@abaplint/transpiler/build/src/expressions/method_source.js?");
13098
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.MethodSourceTranspiler = void 0;\r\nconst core_1 = __webpack_require__(/*! @abaplint/core */ \"./node_modules/@abaplint/core/build/src/index.js\");\r\nconst chunk_1 = __webpack_require__(/*! ../chunk */ \"./node_modules/@abaplint/transpiler/build/src/chunk.js\");\r\nclass MethodSourceTranspiler {\r\n constructor(prepend) {\r\n this.prepend = prepend || \"\";\r\n }\r\n transpile(node, traversal) {\r\n const ret = new chunk_1.Chunk();\r\n const children = node.getChildren();\r\n for (let i = 0; i < children.length; i++) {\r\n const child = children[i];\r\n const nextChild = children[i + 1];\r\n if (child.get() instanceof core_1.Expressions.ClassName) {\r\n ret.appendString(traversal.lookupClassOrInterface(child.concatTokens(), child.getFirstToken()));\r\n }\r\n else if (child.get() instanceof core_1.Expressions.Dynamic && (nextChild === null || nextChild === void 0 ? void 0 : nextChild.concatTokens()) === \"=>\") {\r\n const second = child.getChildren()[1];\r\n if (second.get() instanceof core_1.Expressions.FieldChain) {\r\n ret.appendChunk(traversal.traverse(second));\r\n }\r\n else if (second.get() instanceof core_1.Expressions.Constant) {\r\n const lookup = traversal.lookupClassOrInterface(second.getFirstToken().getStr(), child.getFirstToken(), true);\r\n const lookupException = traversal.lookupClassOrInterface(\"'CX_SY_DYN_CALL_ILLEGAL_CLASS'\", child.getFirstToken(), true);\r\n // eslint-disable-next-line max-len\r\n ret.appendString(`if (${lookup} === undefined && ${lookupException} === undefined) { throw \"CX_SY_DYN_CALL_ILLEGAL_CLASS not found\"; }\\n`);\r\n ret.appendString(`if (${lookup} === undefined) { throw new ${lookupException}(); }\\n`);\r\n if (i === 0) {\r\n ret.appendString(this.prepend);\r\n }\r\n ret.appendString(lookup);\r\n }\r\n else {\r\n ret.appendString(\"MethodSourceTranspiler-Unexpected\");\r\n }\r\n }\r\n else if (child.get() instanceof core_1.Expressions.Dynamic) {\r\n const second = child.getChildren()[1];\r\n if (second.get() instanceof core_1.Expressions.FieldChain) {\r\n ret.appendChunk(traversal.traverse(second));\r\n }\r\n else if (second.get() instanceof core_1.Expressions.Constant) {\r\n ret.appendString(second.getFirstToken().getStr().replace(/\\'/g, \"\").toLowerCase().replace(\"~\", \"$\"));\r\n }\r\n else {\r\n ret.appendString(\"MethodSourceTranspiler-Unexpected\");\r\n }\r\n }\r\n else if (child.get() instanceof core_1.Expressions.MethodName) {\r\n const methodName = child.concatTokens().toLowerCase().replace(\"~\", \"$\");\r\n ret.append(methodName, child.getFirstToken().getStart(), traversal);\r\n }\r\n else if (child.concatTokens() === \"=>\") {\r\n ret.append(\".\", child.getFirstToken().getStart(), traversal);\r\n }\r\n else if (child.concatTokens() === \"->\") {\r\n if (ret.getCode() === \"super\") {\r\n ret.append(\".\", child, traversal);\r\n }\r\n else {\r\n ret.append(\".get().\", child, traversal);\r\n }\r\n }\r\n else if (child.get() instanceof core_1.Expressions.FieldChain) {\r\n if (i === 0) {\r\n ret.appendString(this.prepend);\r\n }\r\n ret.appendChunk(traversal.traverse(child));\r\n }\r\n else {\r\n ret.appendString(\"MethodSourceTranspiler-\" + child.get().constructor.name + \"-todo\");\r\n }\r\n }\r\n return ret;\r\n }\r\n}\r\nexports.MethodSourceTranspiler = MethodSourceTranspiler;\r\n//# sourceMappingURL=method_source.js.map\n\n//# sourceURL=webpack://@abaplint/transpiler-cli/./node_modules/@abaplint/transpiler/build/src/expressions/method_source.js?");
13077
13099
 
13078
13100
  /***/ }),
13079
13101
 
@@ -13403,7 +13425,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
13403
13425
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
13404
13426
 
13405
13427
  "use strict";
13406
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.CallTranspiler = void 0;\r\nconst abaplint = __webpack_require__(/*! @abaplint/core */ \"./node_modules/@abaplint/core/build/src/index.js\");\r\nconst chunk_1 = __webpack_require__(/*! ../chunk */ \"./node_modules/@abaplint/transpiler/build/src/chunk.js\");\r\nclass CallTranspiler {\r\n transpile(node, traversal) {\r\n if (node.concatTokens().toLowerCase().includes(\"super->constructor\")) {\r\n // todo, https://github.com/abaplint/transpiler/issues/133\r\n return new chunk_1.Chunk(\"\");\r\n }\r\n const chain = node.findDirectExpression(abaplint.Expressions.MethodCallChain);\r\n if (chain) {\r\n return new chunk_1.Chunk()\r\n .appendChunk(traversal.traverse(chain))\r\n .append(\";\", node.getLastToken(), traversal);\r\n }\r\n const methodSource = node.findDirectExpression(abaplint.Expressions.MethodSource);\r\n if (methodSource) {\r\n let body = \"\";\r\n const methodCallBody = node.findDirectExpression(abaplint.Expressions.MethodCallBody);\r\n if (methodCallBody && 1 === 1 + 2) {}\r\n return new chunk_1.Chunk().appendChunk(traversal.traverse(methodSource)).appendString(\"(\" + body + \");\");\r\n }\r\n throw new Error(\"CallTranspiler, todo\");\r\n }\r\n}\r\nexports.CallTranspiler = CallTranspiler;\r\n//# sourceMappingURL=call.js.map\n\n//# sourceURL=webpack://@abaplint/transpiler-cli/./node_modules/@abaplint/transpiler/build/src/statements/call.js?");
13428
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.CallTranspiler = void 0;\r\nconst abaplint = __webpack_require__(/*! @abaplint/core */ \"./node_modules/@abaplint/core/build/src/index.js\");\r\nconst chunk_1 = __webpack_require__(/*! ../chunk */ \"./node_modules/@abaplint/transpiler/build/src/chunk.js\");\r\nconst expressions_1 = __webpack_require__(/*! ../expressions */ \"./node_modules/@abaplint/transpiler/build/src/expressions/index.js\");\r\nclass CallTranspiler {\r\n transpile(node, traversal) {\r\n var _a;\r\n if (node.concatTokens().toLowerCase().includes(\"super->constructor\")) {\r\n // todo, https://github.com/abaplint/transpiler/issues/133\r\n return new chunk_1.Chunk(\"\");\r\n }\r\n const chain = node.findDirectExpression(abaplint.Expressions.MethodCallChain);\r\n if (chain) {\r\n return new chunk_1.Chunk()\r\n .appendChunk(traversal.traverse(chain))\r\n .append(\";\", node.getLastToken(), traversal);\r\n }\r\n const methodSource = node.findDirectExpression(abaplint.Expressions.MethodSource);\r\n if (methodSource) {\r\n let body = \"\";\r\n const methodCallBody = node.findDirectExpression(abaplint.Expressions.MethodCallBody);\r\n if (methodCallBody) {\r\n body = traversal.traverse(methodCallBody).getCode();\r\n }\r\n let pre = \"\";\r\n let post = \"\";\r\n const receiving = (_a = node.findFirstExpression(abaplint.Expressions.MethodParameters)) === null || _a === void 0 ? void 0 : _a.findExpressionAfterToken(\"RECEIVING\");\r\n if (receiving) {\r\n const target = traversal.traverse(receiving.findDirectExpression(abaplint.Expressions.Target));\r\n pre = target.getCode() + \".set(\";\r\n post = \")\";\r\n }\r\n const ms = new expressions_1.MethodSourceTranspiler(pre).transpile(methodSource, traversal);\r\n return new chunk_1.Chunk().appendChunk(ms).appendString(\"(\" + body + \")\" + post + \";\");\r\n }\r\n throw new Error(\"CallTranspiler, todo\");\r\n }\r\n}\r\nexports.CallTranspiler = CallTranspiler;\r\n//# sourceMappingURL=call.js.map\n\n//# sourceURL=webpack://@abaplint/transpiler-cli/./node_modules/@abaplint/transpiler/build/src/statements/call.js?");
13407
13429
 
13408
13430
  /***/ }),
13409
13431
 
@@ -13414,7 +13436,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
13414
13436
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
13415
13437
 
13416
13438
  "use strict";
13417
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.CallFunctionTranspiler = void 0;\r\nconst abaplint = __webpack_require__(/*! @abaplint/core */ \"./node_modules/@abaplint/core/build/src/index.js\");\r\nconst chunk_1 = __webpack_require__(/*! ../chunk */ \"./node_modules/@abaplint/transpiler/build/src/chunk.js\");\r\nclass CallFunctionTranspiler {\r\n transpile(node, traversal) {\r\n var _a;\r\n const fmname = (_a = node.findDirectExpression(abaplint.Expressions.FunctionName)) === null || _a === void 0 ? void 0 : _a.concatTokens();\r\n if (fmname === undefined) {\r\n throw \"CallFunctionTranspilerNameNotFound\";\r\n }\r\n let param = \"\";\r\n const fmp = node.findDirectExpression(abaplint.Expressions.FunctionParameters);\r\n if (fmp) {\r\n param = traversal.traverse(fmp).getCode();\r\n }\r\n const ret = `abap.FunctionModules[${fmname}](${param});`;\r\n return new chunk_1.Chunk(ret);\r\n }\r\n}\r\nexports.CallFunctionTranspiler = CallFunctionTranspiler;\r\n//# sourceMappingURL=call_function.js.map\n\n//# sourceURL=webpack://@abaplint/transpiler-cli/./node_modules/@abaplint/transpiler/build/src/statements/call_function.js?");
13439
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.CallFunctionTranspiler = void 0;\r\nconst abaplint = __webpack_require__(/*! @abaplint/core */ \"./node_modules/@abaplint/core/build/src/index.js\");\r\nconst chunk_1 = __webpack_require__(/*! ../chunk */ \"./node_modules/@abaplint/transpiler/build/src/chunk.js\");\r\nclass CallFunctionTranspiler {\r\n transpile(node, traversal) {\r\n var _a, _b;\r\n const fmname = (_a = node.findDirectExpression(abaplint.Expressions.FunctionName)) === null || _a === void 0 ? void 0 : _a.concatTokens();\r\n if (fmname === undefined) {\r\n throw \"CallFunctionTranspilerNameNotFound\";\r\n }\r\n let param = \"\";\r\n const fmp = node.findDirectExpression(abaplint.Expressions.FunctionParameters);\r\n if (fmp) {\r\n param = traversal.traverse(fmp).getCode();\r\n }\r\n const ret = new chunk_1.Chunk();\r\n const dest = (_b = node.findDirectExpression(abaplint.Expressions.Destination)) === null || _b === void 0 ? void 0 : _b.findDirectExpression(abaplint.Expressions.Source);\r\n if (dest) {\r\n param = param.replace(\"{\", \",\").replace(/}$/, \"\");\r\n ret.appendString(`abap.statements.callFunction({name:${fmname},destination:${dest.concatTokens()}${param}});`);\r\n }\r\n else {\r\n ret.appendString(`abap.FunctionModules[${fmname}](${param});`);\r\n }\r\n return ret;\r\n }\r\n}\r\nexports.CallFunctionTranspiler = CallFunctionTranspiler;\r\n//# sourceMappingURL=call_function.js.map\n\n//# sourceURL=webpack://@abaplint/transpiler-cli/./node_modules/@abaplint/transpiler/build/src/statements/call_function.js?");
13418
13440
 
13419
13441
  /***/ }),
13420
13442
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/transpiler-cli",
3
- "version": "1.7.26",
3
+ "version": "1.7.27",
4
4
  "description": "Transpiler - Command Line Interface",
5
5
  "bin": {
6
6
  "abap_transpile": "./abap_transpile"
@@ -23,13 +23,13 @@
23
23
  "author": "abaplint",
24
24
  "license": "MIT",
25
25
  "devDependencies": {
26
- "@abaplint/transpiler": "^1.7.26",
26
+ "@abaplint/transpiler": "^1.7.27",
27
27
  "@types/glob": "^7.2.0",
28
28
  "glob": "^7.2.0",
29
29
  "@types/progress": "^2.0.5",
30
30
  "@abaplint/core": "^2.84.3",
31
31
  "progress": "^2.0.3",
32
- "webpack": "^5.66.0",
32
+ "webpack": "^5.67.0",
33
33
  "webpack-cli": "^4.9.1",
34
34
  "typescript": "^4.5.5"
35
35
  }