@abaplint/transpiler 2.11.19 → 2.11.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.
|
@@ -33,7 +33,7 @@ class ValueBodyTranspiler {
|
|
|
33
33
|
ret.appendString(new value_body_line_1.ValueBodyLineTranspiler().transpile(rowType, child, traversal, extraFields).getCode());
|
|
34
34
|
}
|
|
35
35
|
else {
|
|
36
|
-
throw new Error("ValueBodyTranspiler, unknown " + child.get().constructor.name);
|
|
36
|
+
throw new Error("ValueBodyTranspiler, unknown " + child.get().constructor.name + " " + child.concatTokens());
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
39
|
return ret;
|
package/build/src/traversal.js
CHANGED
|
@@ -636,12 +636,28 @@ this.INTERNAL_ID = abap.internalIdCounter++;\n`;
|
|
|
636
636
|
if (dtel) {
|
|
637
637
|
return dtel.parseType(this.reg);
|
|
638
638
|
}
|
|
639
|
+
const tabl = this.reg.getObject("TABL", name);
|
|
640
|
+
if (tabl) {
|
|
641
|
+
return tabl.parseType(this.reg);
|
|
642
|
+
}
|
|
643
|
+
const view = this.reg.getObject("VIEW", name);
|
|
644
|
+
if (view) {
|
|
645
|
+
return view.parseType(this.reg);
|
|
646
|
+
}
|
|
647
|
+
const ttyp = this.reg.getObject("TTYP", name);
|
|
648
|
+
if (ttyp) {
|
|
649
|
+
return ttyp.parseType(this.reg);
|
|
650
|
+
}
|
|
639
651
|
if (name.includes("=>")) {
|
|
640
652
|
const [className, typeName] = name.split("=>");
|
|
641
653
|
const cls = this.findClassDefinition(className, scope);
|
|
642
654
|
if (cls) {
|
|
643
655
|
return cls.getTypeDefinitions().getByName(typeName)?.getType();
|
|
644
656
|
}
|
|
657
|
+
const intf = this.findInterfaceDefinition(className, scope);
|
|
658
|
+
if (intf) {
|
|
659
|
+
return intf.getTypeDefinitions().getByName(typeName)?.getType();
|
|
660
|
+
}
|
|
645
661
|
}
|
|
646
662
|
// todo: yea, well, yea
|
|
647
663
|
throw new Error("lookupType, type not found, " + node.concatTokens());
|