@abaplint/transpiler 2.8.17 → 2.8.19
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.
|
@@ -27,13 +27,11 @@ class MethodSourceTranspiler {
|
|
|
27
27
|
if (second.get() instanceof core_1.Expressions.FieldChain && second instanceof core_1.Nodes.ExpressionNode) {
|
|
28
28
|
const t = new _1.FieldChainTranspiler(true).transpile(second, traversal).getCode();
|
|
29
29
|
call = traversal.lookupClassOrInterface(t, child.getFirstToken(), true);
|
|
30
|
-
ret.appendString(`if (${call} === undefined
|
|
31
|
-
ret.appendString(`if (${call} === undefined) { throw new ${illegalClass}(); }\n`);
|
|
30
|
+
ret.appendString(`if (${call} === undefined) { if (${illegalClass} === undefined) { throw "CX_SY_DYN_CALL_ILLEGAL_CLASS not found"; } else {throw new ${illegalClass}(); } }\n`);
|
|
32
31
|
}
|
|
33
32
|
else if (second.get() instanceof core_1.Expressions.Constant) {
|
|
34
33
|
call = traversal.lookupClassOrInterface(second.getFirstToken().getStr(), child.getFirstToken(), true);
|
|
35
|
-
ret.appendString(`if (${call} === undefined
|
|
36
|
-
ret.appendString(`if (${call} === undefined) { throw new ${illegalClass}(); }\n`);
|
|
34
|
+
ret.appendString(`if (${call} === undefined) { if (${illegalClass} === undefined) { throw "CX_SY_DYN_CALL_ILLEGAL_CLASS not found"; } else {throw new ${illegalClass}(); } }\n`);
|
|
37
35
|
const name = children[i + 2];
|
|
38
36
|
if (name.get() instanceof core_1.Expressions.AttributeName) {
|
|
39
37
|
const suffix = "." + name.concatTokens().toLowerCase().replace("~", "$");
|
package/build/src/traversal.js
CHANGED
|
@@ -34,7 +34,8 @@ class Traversal {
|
|
|
34
34
|
return this.traverseExpression(node);
|
|
35
35
|
}
|
|
36
36
|
else if (node === undefined) {
|
|
37
|
-
|
|
37
|
+
// perhaps the file contains syntax errors? these are not reported for dependencies
|
|
38
|
+
throw new Error("Traverse, node undefined, " + this.getFilename());
|
|
38
39
|
}
|
|
39
40
|
else {
|
|
40
41
|
throw new Error("Traverse, unexpected node type");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abaplint/transpiler",
|
|
3
|
-
"version": "2.8.
|
|
3
|
+
"version": "2.8.19",
|
|
4
4
|
"description": "Transpiler",
|
|
5
5
|
"main": "build/src/index.js",
|
|
6
6
|
"typings": "build/src/index.d.ts",
|
|
@@ -29,15 +29,15 @@
|
|
|
29
29
|
"author": "abaplint",
|
|
30
30
|
"license": "MIT",
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@abaplint/core": "^2.106.
|
|
32
|
+
"@abaplint/core": "^2.106.3",
|
|
33
33
|
"source-map": "^0.7.4"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
|
-
"@types/chai": "^4.3.
|
|
36
|
+
"@types/chai": "^4.3.14",
|
|
37
37
|
"@types/mocha": "^10.0.6",
|
|
38
38
|
"chai": "^4.4.1",
|
|
39
39
|
"mocha": "^10.3.0",
|
|
40
40
|
"source-map-support": "^0.5.21",
|
|
41
|
-
"typescript": "^5.4.
|
|
41
|
+
"typescript": "^5.4.3"
|
|
42
42
|
}
|
|
43
43
|
}
|