@abaplint/transpiler-cli 1.8.28 → 1.8.29

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 +1 -1
  2. package/package.json +2 -2
package/build/bundle.js CHANGED
@@ -14239,7 +14239,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
14239
14239
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
14240
14240
 
14241
14241
  "use strict";
14242
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.ReplaceTranspiler = void 0;\r\nconst abaplint = __webpack_require__(/*! @abaplint/core */ \"./node_modules/@abaplint/core/build/src/index.js\");\r\nconst expressions_1 = __webpack_require__(/*! ../expressions */ \"./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 ReplaceTranspiler {\r\n transpile(node, traversal) {\r\n const sources = node.findDirectExpressions(abaplint.Expressions.Source);\r\n const target = traversal.traverse(node.findDirectExpression(abaplint.Expressions.Target)).getCode();\r\n const concat = node.concatTokens().toUpperCase();\r\n const all = concat.startsWith(\"REPLACE ALL\");\r\n const extra = [];\r\n const w = node.findExpressionAfterToken(\"WITH\");\r\n if (w) {\r\n extra.push(\"with: \" + new expressions_1.SourceTranspiler().transpile(w, traversal).getCode());\r\n }\r\n const o = node.findExpressionAfterToken(\"OF\");\r\n if (o && o.get() instanceof abaplint.Expressions.Source) {\r\n extra.push(\"of: \" + new expressions_1.SourceTranspiler().transpile(o, traversal).getCode());\r\n }\r\n const r = node.findDirectExpression(abaplint.Expressions.FindType);\r\n const type = r === null || r === void 0 ? void 0 : r.concatTokens().toUpperCase();\r\n if (type === \"REGEX\") {\r\n extra.push(\"regex: \" + new expressions_1.SourceTranspiler().transpile(sources[0], traversal).getCode());\r\n }\r\n return new chunk_1.Chunk()\r\n .append(\"abap.statements.replace({target:\", node, traversal)\r\n .appendString(target + \", all:\" + all + \", \" + extra.join(\",\"))\r\n .append(\"});\", node.getLastToken(), traversal);\r\n }\r\n}\r\nexports.ReplaceTranspiler = ReplaceTranspiler;\r\n//# sourceMappingURL=replace.js.map\n\n//# sourceURL=webpack://@abaplint/transpiler-cli/./node_modules/@abaplint/transpiler/build/src/statements/replace.js?");
14242
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.ReplaceTranspiler = void 0;\r\nconst abaplint = __webpack_require__(/*! @abaplint/core */ \"./node_modules/@abaplint/core/build/src/index.js\");\r\nconst expressions_1 = __webpack_require__(/*! ../expressions */ \"./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 ReplaceTranspiler {\r\n transpile(node, traversal) {\r\n const sources = node.findDirectExpressions(abaplint.Expressions.Source);\r\n const target = traversal.traverse(node.findDirectExpression(abaplint.Expressions.Target)).getCode();\r\n const concat = node.concatTokens().toUpperCase();\r\n const all = concat.startsWith(\"REPLACE ALL\");\r\n const extra = [];\r\n const w = node.findExpressionAfterToken(\"WITH\");\r\n if (w) {\r\n extra.push(\"with: \" + new expressions_1.SourceTranspiler().transpile(w, traversal).getCode());\r\n }\r\n const o = node.findExpressionAfterToken(\"OF\");\r\n if (o && o.get() instanceof abaplint.Expressions.Source) {\r\n extra.push(\"of: \" + new expressions_1.SourceTranspiler().transpile(o, traversal).getCode());\r\n }\r\n const r = node.findDirectExpression(abaplint.Expressions.FindType);\r\n const type = r === null || r === void 0 ? void 0 : r.concatTokens().toUpperCase();\r\n if (type === \"REGEX\") {\r\n extra.push(\"regex: \" + new expressions_1.SourceTranspiler().transpile(sources[0], traversal).getCode());\r\n }\r\n if (o === undefined && o === undefined) {\r\n extra.push(\"of: \" + new expressions_1.SourceTranspiler().transpile(sources[0], traversal).getCode());\r\n }\r\n return new chunk_1.Chunk()\r\n .append(\"abap.statements.replace({target:\", node, traversal)\r\n .appendString(target + \", all:\" + all + \", \" + extra.join(\",\"))\r\n .append(\"});\", node.getLastToken(), traversal);\r\n }\r\n}\r\nexports.ReplaceTranspiler = ReplaceTranspiler;\r\n//# sourceMappingURL=replace.js.map\n\n//# sourceURL=webpack://@abaplint/transpiler-cli/./node_modules/@abaplint/transpiler/build/src/statements/replace.js?");
14243
14243
 
14244
14244
  /***/ }),
14245
14245
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/transpiler-cli",
3
- "version": "1.8.28",
3
+ "version": "1.8.29",
4
4
  "description": "Transpiler - Command Line Interface",
5
5
  "bin": {
6
6
  "abap_transpile": "./abap_transpile"
@@ -24,7 +24,7 @@
24
24
  "author": "abaplint",
25
25
  "license": "MIT",
26
26
  "devDependencies": {
27
- "@abaplint/transpiler": "^1.8.28",
27
+ "@abaplint/transpiler": "^1.8.29",
28
28
  "@types/glob": "^7.2.0",
29
29
  "glob": "^7.2.0",
30
30
  "@types/progress": "^2.0.5",