@abaplint/transpiler-cli 2.0.48 → 2.0.49

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
@@ -13898,7 +13898,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
13898
13898
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
13899
13899
 
13900
13900
  "use strict";
13901
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.DeleteInternalTranspiler = 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 DeleteInternalTranspiler {\r\n transpile(node, traversal) {\r\n const target = traversal.traverse(node.findFirstExpression(abaplint.Expressions.Target)).getCode();\r\n const extra = [];\r\n const where = node.findFirstExpression(abaplint.Expressions.ComponentCond);\r\n if (where) {\r\n // todo, replacing \"await\" is a hack\r\n extra.push(\"where: \" + traversal.traverse(where).getCode().replace(\"await \", \"\"));\r\n }\r\n // todo, this is not completely correct, fields might have the name ADJACENT\r\n // comparisons should be on table key unless other is specified, but we're unaware\r\n if (node.findDirectTokenByText(\"ADJACENT\")) {\r\n extra.push(\"adjacent: true\");\r\n if (node.findDirectTokenByText(\"COMPARING\") && !node.concatTokens().toUpperCase().includes(\"COMPARING ALL FIELDS\")) {\r\n const comparing = node.findAllExpressions(abaplint.Expressions.FieldSub);\r\n if (comparing) {\r\n const compareFields = comparing.map(i => \"'\" + i.getFirstToken().getStr() + \"'\").join(\",\");\r\n extra.push(\"comparing: [\" + compareFields + \"]\");\r\n }\r\n }\r\n }\r\n const index = node.findExpressionAfterToken(\"INDEX\");\r\n if (index) {\r\n extra.push(\"index: \" + traversal.traverse(index).getCode());\r\n }\r\n const from = node.findExpressionAfterToken(\"FROM\");\r\n if (from && node.findDirectTokenByText(\"ADJACENT\") === undefined) {\r\n extra.push(\"from: \" + traversal.traverse(from).getCode());\r\n }\r\n const to = node.findExpressionAfterToken(\"TO\");\r\n if (to) {\r\n extra.push(\"to: \" + traversal.traverse(to).getCode());\r\n }\r\n let concat = \"\";\r\n if (extra.length > 0) {\r\n concat = \",{\" + extra.join(\",\") + \"}\";\r\n }\r\n return new chunk_1.Chunk(\"abap.statements.deleteInternal(\" + target + concat + \");\");\r\n }\r\n}\r\nexports.DeleteInternalTranspiler = DeleteInternalTranspiler;\r\n//# sourceMappingURL=delete_internal.js.map\n\n//# sourceURL=webpack://@abaplint/transpiler-cli/./node_modules/@abaplint/transpiler/build/src/statements/delete_internal.js?");
13901
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.DeleteInternalTranspiler = 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 DeleteInternalTranspiler {\r\n transpile(node, traversal) {\r\n const target = traversal.traverse(node.findFirstExpression(abaplint.Expressions.Target)).getCode();\r\n const concat = node.concatTokens().toUpperCase();\r\n const extra = [];\r\n const where = node.findFirstExpression(abaplint.Expressions.ComponentCond);\r\n if (where) {\r\n // todo, replacing \"await\" is a hack\r\n extra.push(\"where: \" + traversal.traverse(where).getCode().replace(\"await \", \"\"));\r\n }\r\n // todo, this is not completely correct, fields might have the name ADJACENT\r\n // comparisons should be on table key unless other is specified, but we're unaware\r\n if (node.findDirectTokenByText(\"ADJACENT\")) {\r\n extra.push(\"adjacent: true\");\r\n if (node.findDirectTokenByText(\"COMPARING\") && !node.concatTokens().toUpperCase().includes(\"COMPARING ALL FIELDS\")) {\r\n const comparing = node.findAllExpressions(abaplint.Expressions.FieldSub);\r\n if (comparing) {\r\n const compareFields = comparing.map(i => \"'\" + i.getFirstToken().getStr() + \"'\").join(\",\");\r\n extra.push(\"comparing: [\" + compareFields + \"]\");\r\n }\r\n }\r\n }\r\n const index = node.findExpressionAfterToken(\"INDEX\");\r\n if (index) {\r\n extra.push(\"index: \" + traversal.traverse(index).getCode());\r\n }\r\n const from = node.findExpressionAfterToken(\"FROM\");\r\n if (from && node.findDirectTokenByText(\"ADJACENT\") === undefined) {\r\n if (concat.startsWith(\"DELETE TABLE \") === true) {\r\n extra.push(\"fromValue: \" + traversal.traverse(from).getCode());\r\n }\r\n else {\r\n extra.push(\"from: \" + traversal.traverse(from).getCode());\r\n }\r\n }\r\n const to = node.findExpressionAfterToken(\"TO\");\r\n if (to) {\r\n extra.push(\"to: \" + traversal.traverse(to).getCode());\r\n }\r\n let blah = \"\";\r\n if (extra.length > 0) {\r\n blah = \",{\" + extra.join(\",\") + \"}\";\r\n }\r\n return new chunk_1.Chunk(\"abap.statements.deleteInternal(\" + target + blah + \");\");\r\n }\r\n}\r\nexports.DeleteInternalTranspiler = DeleteInternalTranspiler;\r\n//# sourceMappingURL=delete_internal.js.map\n\n//# sourceURL=webpack://@abaplint/transpiler-cli/./node_modules/@abaplint/transpiler/build/src/statements/delete_internal.js?");
13902
13902
 
13903
13903
  /***/ }),
13904
13904
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/transpiler-cli",
3
- "version": "2.0.48",
3
+ "version": "2.0.49",
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.0.48",
28
+ "@abaplint/transpiler": "^2.0.49",
29
29
  "@types/glob": "^7.2.0",
30
30
  "glob": "=7.2.0",
31
31
  "@types/progress": "^2.0.5",