@abaplint/transpiler-cli 2.1.49 → 2.1.50
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/build/bundle.js +1 -1
- 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
|
|
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
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abaplint/transpiler-cli",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.50",
|
|
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.
|
|
28
|
+
"@abaplint/transpiler": "^2.1.50",
|
|
29
29
|
"@types/glob": "^7.2.0",
|
|
30
30
|
"glob": "=7.2.0",
|
|
31
31
|
"@types/progress": "^2.0.5",
|