@abaplint/transpiler 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.
|
@@ -5,14 +5,15 @@ const chunk_1 = require("../chunk");
|
|
|
5
5
|
const transpile_types_1 = require("../transpile_types");
|
|
6
6
|
class TypeNameOrInfer {
|
|
7
7
|
findType(node, traversal) {
|
|
8
|
-
let type;
|
|
8
|
+
// let type: AbstractType | undefined;
|
|
9
9
|
const scope = traversal.findCurrentScopeByToken(node.getFirstToken());
|
|
10
|
-
if (node.concatTokens() === "#") {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
10
|
+
// if (node.concatTokens() === "#") {
|
|
11
|
+
const type = traversal.lookupInferred(node, scope);
|
|
12
|
+
/*
|
|
13
|
+
} else {
|
|
14
|
+
type = traversal.lookupType(node.getFirstChild() as Nodes.ExpressionNode, scope);
|
|
15
|
+
}
|
|
16
|
+
*/
|
|
16
17
|
if (type === undefined) {
|
|
17
18
|
throw new Error("TypeNameOrInfer, type not found: " + node.concatTokens());
|
|
18
19
|
}
|
package/build/src/traversal.js
CHANGED
|
@@ -604,6 +604,7 @@ this.INTERNAL_ID = abap.internalIdCounter++;\n`;
|
|
|
604
604
|
}
|
|
605
605
|
return ret;
|
|
606
606
|
}
|
|
607
|
+
// todo: delete this method?
|
|
607
608
|
lookupType(node, scope) {
|
|
608
609
|
if (scope === undefined) {
|
|
609
610
|
return undefined;
|
|
@@ -673,9 +674,10 @@ this.INTERNAL_ID = abap.internalIdCounter++;\n`;
|
|
|
673
674
|
lookupInferred(node, scope) {
|
|
674
675
|
if (scope === undefined) {
|
|
675
676
|
return undefined;
|
|
676
|
-
|
|
677
|
-
|
|
677
|
+
/*
|
|
678
|
+
} else if (node.concatTokens() !== "#") {
|
|
678
679
|
throw new Error("lookupInferred, unexpected, " + node.get());
|
|
680
|
+
*/
|
|
679
681
|
}
|
|
680
682
|
return this.findInferredTypeReference(node.getFirstToken());
|
|
681
683
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abaplint/transpiler",
|
|
3
|
-
"version": "2.11.
|
|
3
|
+
"version": "2.11.26",
|
|
4
4
|
"description": "Transpiler",
|
|
5
5
|
"main": "build/src/index.js",
|
|
6
6
|
"typings": "build/src/index.d.ts",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"author": "abaplint",
|
|
30
30
|
"license": "MIT",
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@abaplint/core": "^2.113.
|
|
32
|
+
"@abaplint/core": "^2.113.172",
|
|
33
33
|
"source-map": "^0.7.6"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|