@abaplint/transpiler-cli 2.1.48 → 2.1.51

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 +2 -2
  2. package/package.json +2 -2
package/build/bundle.js CHANGED
@@ -13689,7 +13689,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
13689
13689
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
13690
13690
 
13691
13691
  "use strict";
13692
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.StringTemplateSourceTranspiler = void 0;\r\nconst core_1 = __webpack_require__(/*! @abaplint/core */ \"./node_modules/@abaplint/core/build/src/index.js\");\r\nconst _1 = __webpack_require__(/*! . */ \"./node_modules/@abaplint/transpiler/build/src/expressions/index.js\");\r\nconst chunk_1 = __webpack_require__(/*! ../chunk */ \"./node_modules/@abaplint/transpiler/build/src/chunk.js\");\r\nclass StringTemplateSourceTranspiler {\r\n transpile(node, traversal) {\r\n let ret = \"\";\r\n let pre = \"\";\r\n let post = \"\";\r\n let get = true;\r\n const next = node.findDirectExpression(core_1.Expressions.StringTemplateFormatting);\r\n if (next) {\r\n const options = this.build(next, traversal);\r\n if (options) {\r\n pre = \"abap.templateFormatting(\";\r\n post = \",\" + options + \")\";\r\n get = false;\r\n }\r\n }\r\n const c = node.findDirectExpression(core_1.Expressions.Source);\r\n if (c === undefined) {\r\n throw new Error(\"StringTemplateSourceTranspiler, Source not found\");\r\n }\r\n ret += pre + new _1.SourceTranspiler(get).transpile(c, traversal).getCode() + post;\r\n return new chunk_1.Chunk(ret);\r\n }\r\n build(node, traversal) {\r\n let option = \"\";\r\n let count = 0;\r\n for (const c of node.getChildren()) {\r\n count++;\r\n if (c instanceof core_1.Nodes.TokenNode) {\r\n if (c.getFirstToken().getStr() === \"=\") {\r\n option += \":\";\r\n }\r\n else {\r\n if (count > 3 && (count - 1) % 3 === 0) {\r\n option += \",\";\r\n }\r\n option += `\"` + c.concatTokens().toLowerCase() + `\"`;\r\n }\r\n }\r\n else if (c.get() instanceof core_1.Expressions.Source) {\r\n option += new _1.SourceTranspiler(true).transpile(c, traversal).getCode();\r\n }\r\n }\r\n if (option !== \"\") {\r\n return \"{\" + option + \"}\";\r\n }\r\n return undefined;\r\n }\r\n}\r\nexports.StringTemplateSourceTranspiler = StringTemplateSourceTranspiler;\r\n//# sourceMappingURL=string_template_source.js.map\n\n//# sourceURL=webpack://@abaplint/transpiler-cli/./node_modules/@abaplint/transpiler/build/src/expressions/string_template_source.js?");
13692
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.StringTemplateSourceTranspiler = void 0;\r\nconst core_1 = __webpack_require__(/*! @abaplint/core */ \"./node_modules/@abaplint/core/build/src/index.js\");\r\nconst _1 = __webpack_require__(/*! . */ \"./node_modules/@abaplint/transpiler/build/src/expressions/index.js\");\r\nconst chunk_1 = __webpack_require__(/*! ../chunk */ \"./node_modules/@abaplint/transpiler/build/src/chunk.js\");\r\nclass StringTemplateSourceTranspiler {\r\n transpile(node, traversal) {\r\n let ret = \"\";\r\n const pre = \"abap.templateFormatting(\";\r\n let post = \")\";\r\n const formatting = node.findDirectExpression(core_1.Expressions.StringTemplateFormatting);\r\n if (formatting) {\r\n const options = this.build(formatting, traversal);\r\n if (options) {\r\n post = \",\" + options + \")\";\r\n }\r\n }\r\n const c = node.findDirectExpression(core_1.Expressions.Source);\r\n if (c === undefined) {\r\n throw new Error(\"StringTemplateSourceTranspiler, Source not found\");\r\n }\r\n ret += pre + new _1.SourceTranspiler().transpile(c, traversal).getCode() + post;\r\n return new chunk_1.Chunk(ret);\r\n }\r\n build(node, traversal) {\r\n let option = \"\";\r\n let count = 0;\r\n for (const c of node.getChildren()) {\r\n count++;\r\n if (c instanceof core_1.Nodes.TokenNode) {\r\n if (c.getFirstToken().getStr() === \"=\") {\r\n option += \":\";\r\n }\r\n else {\r\n if (count > 3 && (count - 1) % 3 === 0) {\r\n option += \",\";\r\n }\r\n option += `\"` + c.concatTokens().toLowerCase() + `\"`;\r\n }\r\n }\r\n else if (c.get() instanceof core_1.Expressions.Source) {\r\n option += new _1.SourceTranspiler(true).transpile(c, traversal).getCode();\r\n }\r\n }\r\n if (option !== \"\") {\r\n return \"{\" + option + \"}\";\r\n }\r\n return undefined;\r\n }\r\n}\r\nexports.StringTemplateSourceTranspiler = StringTemplateSourceTranspiler;\r\n//# sourceMappingURL=string_template_source.js.map\n\n//# sourceURL=webpack://@abaplint/transpiler-cli/./node_modules/@abaplint/transpiler/build/src/expressions/string_template_source.js?");
13693
13693
 
13694
13694
  /***/ }),
13695
13695
 
@@ -13997,7 +13997,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
13997
13997
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
13998
13998
 
13999
13999
  "use strict";
14000
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.ConcatenateTranspiler = 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 ConcatenateTranspiler {\r\n transpile(node, traversal) {\r\n var _a;\r\n const concat = node.concatTokens().toUpperCase();\r\n const slist = [];\r\n for (const s of node.findDirectExpressions(abaplint.Expressions.Source)) {\r\n slist.push(traversal.traverse(s));\r\n }\r\n let extra = \"\";\r\n if (node.findExpressionAfterToken(\"BY\")) {\r\n extra = `, separatedBy: ${(_a = slist.pop()) === null || _a === void 0 ? void 0 : _a.getCode()}`;\r\n }\r\n if (concat.startsWith(\"CONCATENATE LINES OF \")) {\r\n extra += \", lines: true\";\r\n }\r\n const target = traversal.traverse(node.findDirectExpression(abaplint.Expressions.Target));\r\n return new chunk_1.Chunk()\r\n .append(\"abap.statements.concatenate({source: [\", node, traversal)\r\n .join(slist)\r\n .appendString(\"], target: \")\r\n .appendChunk(target)\r\n .append(extra + \"});\", node.getLastToken(), traversal);\r\n }\r\n}\r\nexports.ConcatenateTranspiler = ConcatenateTranspiler;\r\n//# sourceMappingURL=concatenate.js.map\n\n//# sourceURL=webpack://@abaplint/transpiler-cli/./node_modules/@abaplint/transpiler/build/src/statements/concatenate.js?");
14000
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.ConcatenateTranspiler = 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 ConcatenateTranspiler {\r\n transpile(node, traversal) {\r\n var _a;\r\n const concat = node.concatTokens().toUpperCase();\r\n const slist = [];\r\n for (const s of node.findDirectExpressions(abaplint.Expressions.Source)) {\r\n slist.push(traversal.traverse(s));\r\n }\r\n let extra = \"\";\r\n if (node.findExpressionAfterToken(\"BY\")) {\r\n extra = `, separatedBy: ${(_a = slist.pop()) === null || _a === void 0 ? void 0 : _a.getCode()}`;\r\n }\r\n if (concat.startsWith(\"CONCATENATE LINES OF \")) {\r\n extra += \", lines: true\";\r\n }\r\n if (concat.includes(\" RESPECTING BLANKS\")) {\r\n extra += \", respectingBlanks: true\";\r\n }\r\n const target = traversal.traverse(node.findDirectExpression(abaplint.Expressions.Target));\r\n return new chunk_1.Chunk()\r\n .append(\"abap.statements.concatenate({source: [\", node, traversal)\r\n .join(slist)\r\n .appendString(\"], target: \")\r\n .appendChunk(target)\r\n .append(extra + \"});\", node.getLastToken(), traversal);\r\n }\r\n}\r\nexports.ConcatenateTranspiler = ConcatenateTranspiler;\r\n//# sourceMappingURL=concatenate.js.map\n\n//# sourceURL=webpack://@abaplint/transpiler-cli/./node_modules/@abaplint/transpiler/build/src/statements/concatenate.js?");
14001
14001
 
14002
14002
  /***/ }),
14003
14003
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/transpiler-cli",
3
- "version": "2.1.48",
3
+ "version": "2.1.51",
4
4
  "description": "Transpiler - Command Line Interface",
5
5
  "bin": {
6
6
  "abap_transpile": "./abap_transpile"
@@ -25,7 +25,7 @@
25
25
  "author": "abaplint",
26
26
  "license": "MIT",
27
27
  "devDependencies": {
28
- "@abaplint/transpiler": "^2.1.48",
28
+ "@abaplint/transpiler": "^2.1.51",
29
29
  "@types/glob": "^7.2.0",
30
30
  "glob": "=7.2.0",
31
31
  "@types/progress": "^2.0.5",