@abaplint/transpiler-cli 2.13.19 → 2.13.21
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 +43 -3
- package/package.json +2 -2
package/build/bundle.js
CHANGED
|
@@ -83187,7 +83187,8 @@ class MethodSourceTranspiler {
|
|
|
83187
83187
|
const m = traversal.findMethodReference(nameToken, traversal.findCurrentScopeByToken(nameToken));
|
|
83188
83188
|
if (i === 0 && m) {
|
|
83189
83189
|
this.prepend += "this.";
|
|
83190
|
-
if (this.privatePrefix && m.def.getVisibility() === core_1.Visibility.Private
|
|
83190
|
+
if (this.privatePrefix && m.def.getVisibility() === core_1.Visibility.Private
|
|
83191
|
+
&& m.def.isStatic() === false) { // todo: this is probably wrong?
|
|
83191
83192
|
this.prepend += "#";
|
|
83192
83193
|
}
|
|
83193
83194
|
}
|
|
@@ -85120,6 +85121,12 @@ class TypeNameOrInfer {
|
|
|
85120
85121
|
const scope = traversal.findCurrentScopeByToken(node.getFirstToken());
|
|
85121
85122
|
const type = traversal.lookupInferred(node, scope);
|
|
85122
85123
|
if (type === undefined) {
|
|
85124
|
+
if (node.concatTokens() === "#") {
|
|
85125
|
+
const sqlType = traversal.getSQLInferredType();
|
|
85126
|
+
if (sqlType !== undefined) {
|
|
85127
|
+
return sqlType;
|
|
85128
|
+
}
|
|
85129
|
+
}
|
|
85123
85130
|
throw new Error("TypeNameOrInfer, type not found: " + node.concatTokens() + ", " + traversal.getCurrentObject().getName() + " line " + node.getFirstToken().getStart().getRow());
|
|
85124
85131
|
}
|
|
85125
85132
|
return type;
|
|
@@ -89474,6 +89481,27 @@ exports.FunctionPoolTranspiler = FunctionPoolTranspiler;
|
|
|
89474
89481
|
|
|
89475
89482
|
/***/ },
|
|
89476
89483
|
|
|
89484
|
+
/***/ "./node_modules/@abaplint/transpiler/build/src/statements/generate_subroutine.js"
|
|
89485
|
+
/*!***************************************************************************************!*\
|
|
89486
|
+
!*** ./node_modules/@abaplint/transpiler/build/src/statements/generate_subroutine.js ***!
|
|
89487
|
+
\***************************************************************************************/
|
|
89488
|
+
(__unused_webpack_module, exports, __webpack_require__) {
|
|
89489
|
+
|
|
89490
|
+
"use strict";
|
|
89491
|
+
|
|
89492
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
89493
|
+
exports.GenerateSubroutineTranspiler = void 0;
|
|
89494
|
+
const chunk_1 = __webpack_require__(/*! ../chunk */ "./node_modules/@abaplint/transpiler/build/src/chunk.js");
|
|
89495
|
+
class GenerateSubroutineTranspiler {
|
|
89496
|
+
transpile(_node, _traversal) {
|
|
89497
|
+
return new chunk_1.Chunk(`throw new Error("GenerateSubroutine, not supported, transpiler");`);
|
|
89498
|
+
}
|
|
89499
|
+
}
|
|
89500
|
+
exports.GenerateSubroutineTranspiler = GenerateSubroutineTranspiler;
|
|
89501
|
+
//# sourceMappingURL=generate_subroutine.js.map
|
|
89502
|
+
|
|
89503
|
+
/***/ },
|
|
89504
|
+
|
|
89477
89505
|
/***/ "./node_modules/@abaplint/transpiler/build/src/statements/get_bit.js"
|
|
89478
89506
|
/*!***************************************************************************!*\
|
|
89479
89507
|
!*** ./node_modules/@abaplint/transpiler/build/src/statements/get_bit.js ***!
|
|
@@ -89917,6 +89945,7 @@ __exportStar(__webpack_require__(/*! ./set_language */ "./node_modules/@abaplint
|
|
|
89917
89945
|
__exportStar(__webpack_require__(/*! ./set_locale */ "./node_modules/@abaplint/transpiler/build/src/statements/set_locale.js"), exports);
|
|
89918
89946
|
__exportStar(__webpack_require__(/*! ./set_parameter */ "./node_modules/@abaplint/transpiler/build/src/statements/set_parameter.js"), exports);
|
|
89919
89947
|
__exportStar(__webpack_require__(/*! ./set_pf_status */ "./node_modules/@abaplint/transpiler/build/src/statements/set_pf_status.js"), exports);
|
|
89948
|
+
__exportStar(__webpack_require__(/*! ./generate_subroutine */ "./node_modules/@abaplint/transpiler/build/src/statements/generate_subroutine.js"), exports);
|
|
89920
89949
|
__exportStar(__webpack_require__(/*! ./set_screen */ "./node_modules/@abaplint/transpiler/build/src/statements/set_screen.js"), exports);
|
|
89921
89950
|
__exportStar(__webpack_require__(/*! ./set_titlebar */ "./node_modules/@abaplint/transpiler/build/src/statements/set_titlebar.js"), exports);
|
|
89922
89951
|
__exportStar(__webpack_require__(/*! ./shift */ "./node_modules/@abaplint/transpiler/build/src/statements/shift.js"), exports);
|
|
@@ -90000,7 +90029,7 @@ class InsertDatabaseTranspiler {
|
|
|
90000
90029
|
}
|
|
90001
90030
|
const from = node.findExpressionAfterToken("FROM");
|
|
90002
90031
|
if (from && from.get() instanceof abaplint.Expressions.SQLSource) {
|
|
90003
|
-
const tvalues = traversal.
|
|
90032
|
+
const tvalues = traversal.traverseWithTableContext(dbtab.concatTokens(), from);
|
|
90004
90033
|
options.push(`"values": ` + tvalues.getCode());
|
|
90005
90034
|
}
|
|
90006
90035
|
const fromTable = node.findExpressionAfterToken("TABLE");
|
|
@@ -90744,7 +90773,7 @@ class ModifyDatabaseTranspiler {
|
|
|
90744
90773
|
}
|
|
90745
90774
|
const from = node.findExpressionAfterToken("FROM");
|
|
90746
90775
|
if (from && from.get() instanceof abaplint.Expressions.SQLSource) {
|
|
90747
|
-
const tvalues = traversal.
|
|
90776
|
+
const tvalues = traversal.traverseWithTableContext(dbtab.concatTokens(), from);
|
|
90748
90777
|
options.push(`"values": ` + tvalues.getCode());
|
|
90749
90778
|
}
|
|
90750
90779
|
return new chunk_1.Chunk(`await abap.statements.modifyDatabase(${table.getCode()}, {${options.join(", ")}});`);
|
|
@@ -94778,6 +94807,7 @@ class Traversal {
|
|
|
94778
94807
|
spaghetti;
|
|
94779
94808
|
file;
|
|
94780
94809
|
obj;
|
|
94810
|
+
sqlInferredType;
|
|
94781
94811
|
reg;
|
|
94782
94812
|
options;
|
|
94783
94813
|
constructor(spaghetti, file, obj, reg, options) {
|
|
@@ -94872,6 +94902,16 @@ class Traversal {
|
|
|
94872
94902
|
}
|
|
94873
94903
|
return undefined;
|
|
94874
94904
|
}
|
|
94905
|
+
getSQLInferredType() {
|
|
94906
|
+
return this.sqlInferredType;
|
|
94907
|
+
}
|
|
94908
|
+
traverseWithTableContext(tableName, expressionNode) {
|
|
94909
|
+
const tabl = this.reg.getObject("TABL", tableName);
|
|
94910
|
+
this.sqlInferredType = tabl?.parseType(this.reg);
|
|
94911
|
+
const result = this.traverse(expressionNode);
|
|
94912
|
+
this.sqlInferredType = undefined;
|
|
94913
|
+
return result;
|
|
94914
|
+
}
|
|
94875
94915
|
getInterfaceDefinition(token) {
|
|
94876
94916
|
let scope = this.findCurrentScopeByToken(token);
|
|
94877
94917
|
while (scope !== undefined) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abaplint/transpiler-cli",
|
|
3
|
-
"version": "2.13.
|
|
3
|
+
"version": "2.13.21",
|
|
4
4
|
"description": "Transpiler - Command Line Interface",
|
|
5
5
|
"funding": "https://github.com/sponsors/larshp",
|
|
6
6
|
"bin": {
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"license": "MIT",
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"@abaplint/core": "^2.119.12",
|
|
31
|
-
"@abaplint/transpiler": "^2.13.
|
|
31
|
+
"@abaplint/transpiler": "^2.13.21",
|
|
32
32
|
"@types/glob": "^8.1.0",
|
|
33
33
|
"@types/node": "^24.12.2",
|
|
34
34
|
"@types/progress": "^2.0.7",
|