@abaplint/transpiler-cli 2.11.25 → 2.11.26
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 +18 -13
- package/package.json +3 -3
package/build/bundle.js
CHANGED
|
@@ -26389,9 +26389,11 @@ class NewObject {
|
|
|
26389
26389
|
if (ret === undefined) {
|
|
26390
26390
|
const objDefinition = input.scope.findObjectDefinition(typeName);
|
|
26391
26391
|
if (objDefinition) {
|
|
26392
|
+
const objref = new basic_1.ObjectReferenceType(objDefinition);
|
|
26393
|
+
const tid = new _typed_identifier_1.TypedIdentifier(typeToken, input.filename, objref);
|
|
26394
|
+
input.scope.addReference(typeToken, tid, _reference_1.ReferenceType.InferredType, input.filename);
|
|
26392
26395
|
input.scope.addReference(typeToken, objDefinition, _reference_1.ReferenceType.ObjectOrientedReference, input.filename);
|
|
26393
26396
|
input.scope.addReference(typeToken, objDefinition, _reference_1.ReferenceType.ConstructorReference, input.filename, { ooName: objDefinition.getName() });
|
|
26394
|
-
const objref = new basic_1.ObjectReferenceType(objDefinition);
|
|
26395
26397
|
const clas = input.scope.findClassDefinition(objref.getIdentifierName());
|
|
26396
26398
|
if ((clas === null || clas === void 0 ? void 0 : clas.isAbstract()) === true) {
|
|
26397
26399
|
const message = clas.getName() + " is abstract, cannot be instantiated";
|
|
@@ -27242,12 +27244,12 @@ class Source {
|
|
|
27242
27244
|
const basic = new basic_types_1.BasicTypes(input);
|
|
27243
27245
|
const typeExpression = node.findDirectExpression(Expressions.TypeNameOrInfer);
|
|
27244
27246
|
const typeToken = typeExpression === null || typeExpression === void 0 ? void 0 : typeExpression.getFirstToken();
|
|
27245
|
-
const typeName = typeToken
|
|
27247
|
+
// const typeName = typeToken?.getStr();
|
|
27246
27248
|
/*
|
|
27247
27249
|
console.dir(inferredType);
|
|
27248
27250
|
console.dir(typeToken);
|
|
27249
27251
|
*/
|
|
27250
|
-
if (
|
|
27252
|
+
if (inferredType && typeToken) {
|
|
27251
27253
|
const found = basic.lookupQualifiedName(inferredType.getQualifiedName());
|
|
27252
27254
|
if (found) {
|
|
27253
27255
|
const tid = new _typed_identifier_1.TypedIdentifier(typeToken, input.filename, inferredType);
|
|
@@ -53718,7 +53720,7 @@ class Registry {
|
|
|
53718
53720
|
}
|
|
53719
53721
|
static abaplintVersion() {
|
|
53720
53722
|
// magic, see build script "version.sh"
|
|
53721
|
-
return "2.113.
|
|
53723
|
+
return "2.113.172";
|
|
53722
53724
|
}
|
|
53723
53725
|
getDDICReferences() {
|
|
53724
53726
|
return this.ddicReferences;
|
|
@@ -81265,14 +81267,15 @@ const chunk_1 = __webpack_require__(/*! ../chunk */ "./node_modules/@abaplint/tr
|
|
|
81265
81267
|
const transpile_types_1 = __webpack_require__(/*! ../transpile_types */ "./node_modules/@abaplint/transpiler/build/src/transpile_types.js");
|
|
81266
81268
|
class TypeNameOrInfer {
|
|
81267
81269
|
findType(node, traversal) {
|
|
81268
|
-
let type;
|
|
81270
|
+
// let type: AbstractType | undefined;
|
|
81269
81271
|
const scope = traversal.findCurrentScopeByToken(node.getFirstToken());
|
|
81270
|
-
if (node.concatTokens() === "#") {
|
|
81271
|
-
|
|
81272
|
-
|
|
81273
|
-
|
|
81274
|
-
|
|
81275
|
-
|
|
81272
|
+
// if (node.concatTokens() === "#") {
|
|
81273
|
+
const type = traversal.lookupInferred(node, scope);
|
|
81274
|
+
/*
|
|
81275
|
+
} else {
|
|
81276
|
+
type = traversal.lookupType(node.getFirstChild() as Nodes.ExpressionNode, scope);
|
|
81277
|
+
}
|
|
81278
|
+
*/
|
|
81276
81279
|
if (type === undefined) {
|
|
81277
81280
|
throw new Error("TypeNameOrInfer, type not found: " + node.concatTokens());
|
|
81278
81281
|
}
|
|
@@ -90725,6 +90728,7 @@ this.INTERNAL_ID = abap.internalIdCounter++;\n`;
|
|
|
90725
90728
|
}
|
|
90726
90729
|
return ret;
|
|
90727
90730
|
}
|
|
90731
|
+
// todo: delete this method?
|
|
90728
90732
|
lookupType(node, scope) {
|
|
90729
90733
|
if (scope === undefined) {
|
|
90730
90734
|
return undefined;
|
|
@@ -90794,9 +90798,10 @@ this.INTERNAL_ID = abap.internalIdCounter++;\n`;
|
|
|
90794
90798
|
lookupInferred(node, scope) {
|
|
90795
90799
|
if (scope === undefined) {
|
|
90796
90800
|
return undefined;
|
|
90797
|
-
|
|
90798
|
-
|
|
90801
|
+
/*
|
|
90802
|
+
} else if (node.concatTokens() !== "#") {
|
|
90799
90803
|
throw new Error("lookupInferred, unexpected, " + node.get());
|
|
90804
|
+
*/
|
|
90800
90805
|
}
|
|
90801
90806
|
return this.findInferredTypeReference(node.getFirstToken());
|
|
90802
90807
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abaplint/transpiler-cli",
|
|
3
|
-
"version": "2.11.
|
|
3
|
+
"version": "2.11.26",
|
|
4
4
|
"description": "Transpiler - Command Line Interface",
|
|
5
5
|
"funding": "https://github.com/sponsors/larshp",
|
|
6
6
|
"bin": {
|
|
@@ -27,8 +27,8 @@
|
|
|
27
27
|
"author": "abaplint",
|
|
28
28
|
"license": "MIT",
|
|
29
29
|
"devDependencies": {
|
|
30
|
-
"@abaplint/core": "^2.113.
|
|
31
|
-
"@abaplint/transpiler": "^2.11.
|
|
30
|
+
"@abaplint/core": "^2.113.172",
|
|
31
|
+
"@abaplint/transpiler": "^2.11.26",
|
|
32
32
|
"@types/glob": "^8.1.0",
|
|
33
33
|
"@types/node": "^24.2.1",
|
|
34
34
|
"@types/progress": "^2.0.7",
|