@abaplint/transpiler-cli 2.3.59 → 2.3.60

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
@@ -15097,7 +15097,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
15097
15097
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
15098
15098
 
15099
15099
  "use strict";
15100
- 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 length = node.findExpressionAfterToken(\"LENGTH\");\r\n if (length && length.get() instanceof abaplint.Expressions.Source) {\r\n extra.push(\"sectionLength: \" + new expressions_1.SourceTranspiler().transpile(length, traversal).getCode());\r\n }\r\n const offset = node.findExpressionAfterToken(\"OFFSET\");\r\n if (offset && offset.get() instanceof abaplint.Expressions.Source) {\r\n extra.push(\"sectionOffset: \" + new expressions_1.SourceTranspiler().transpile(offset, 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 if (concat.includes(\" IGNORING CASE\")) {\r\n extra.push(\"ignoringCase: true\");\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?");
15100
+ 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 length = node.findExpressionAfterToken(\"LENGTH\");\r\n if (length && length.get() instanceof abaplint.Expressions.Source) {\r\n extra.push(\"sectionLength: \" + new expressions_1.SourceTranspiler().transpile(length, traversal).getCode());\r\n }\r\n const offset = node.findExpressionAfterToken(\"OFFSET\");\r\n if (offset && offset.get() instanceof abaplint.Expressions.Source) {\r\n extra.push(\"sectionOffset: \" + new expressions_1.SourceTranspiler().transpile(offset, 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 && type !== \"REGEX\") {\r\n extra.push(\"of: \" + new expressions_1.SourceTranspiler().transpile(sources[0], traversal).getCode());\r\n }\r\n if (concat.includes(\" IGNORING CASE\")) {\r\n extra.push(\"ignoringCase: true\");\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?");
15101
15101
 
15102
15102
  /***/ }),
15103
15103
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/transpiler-cli",
3
- "version": "2.3.59",
3
+ "version": "2.3.60",
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.3.59",
28
+ "@abaplint/transpiler": "^2.3.60",
29
29
  "@types/glob": "^7.2.0",
30
30
  "glob": "=7.2.0",
31
31
  "@types/progress": "^2.0.5",