@abaplint/transpiler-cli 2.5.65 → 2.5.66
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 +16 -1
- package/package.json +2 -2
package/build/bundle.js
CHANGED
|
@@ -71487,7 +71487,8 @@ class ClassImplementationTranspiler {
|
|
|
71487
71487
|
const scope = traversal.findCurrentScopeByToken(token);
|
|
71488
71488
|
return new chunk_1.Chunk().append(ret + ` {
|
|
71489
71489
|
static INTERNAL_TYPE = 'CLAS';
|
|
71490
|
-
static IMPLEMENTED_INTERFACES = [${this.findImplementedClass(traversal, def, scope).map(e => `"` + e.toUpperCase() + `"`).join(",")}]
|
|
71490
|
+
static IMPLEMENTED_INTERFACES = [${this.findImplementedClass(traversal, def, scope).map(e => `"` + e.toUpperCase() + `"`).join(",")}];
|
|
71491
|
+
static ATTRIBUTES = {};`, node, traversal);
|
|
71491
71492
|
}
|
|
71492
71493
|
findImplementedInterface(traversal, def, scope) {
|
|
71493
71494
|
if (def === undefined || scope === undefined) {
|
|
@@ -76141,6 +76142,7 @@ class ClassDefinitionTranspiler {
|
|
|
76141
76142
|
return new chunk_1.Chunk(`
|
|
76142
76143
|
class ${className === null || className === void 0 ? void 0 : className.toLowerCase()} {
|
|
76143
76144
|
static INTERNAL_TYPE = 'CLAS';
|
|
76145
|
+
static ATTRIBUTES = {};
|
|
76144
76146
|
async constructor_() {
|
|
76145
76147
|
this.me = new abap.types.ABAPObject();
|
|
76146
76148
|
this.me.set(this);
|
|
@@ -76608,6 +76610,7 @@ class InterfaceTranspiler {
|
|
|
76608
76610
|
name = traversal_1.Traversal.escapeNamespace(name);
|
|
76609
76611
|
ret += `class ${name} {\n`;
|
|
76610
76612
|
ret += `static INTERNAL_TYPE = 'INTF';\n`;
|
|
76613
|
+
ret += `static ATTRIBUTES = {${this.buildAttributes(def)}};\n`;
|
|
76611
76614
|
}
|
|
76612
76615
|
else if (c instanceof abaplint.Nodes.StatementNode && c.get() instanceof abaplint.Statements.EndInterface) {
|
|
76613
76616
|
ret += "}\n";
|
|
@@ -76618,6 +76621,18 @@ class InterfaceTranspiler {
|
|
|
76618
76621
|
ret += this.buildTypes(def);
|
|
76619
76622
|
return new chunk_1.Chunk(ret);
|
|
76620
76623
|
}
|
|
76624
|
+
buildAttributes(idef) {
|
|
76625
|
+
const attr = [];
|
|
76626
|
+
for (const a of (idef === null || idef === void 0 ? void 0 : idef.getAttributes().getAll()) || []) {
|
|
76627
|
+
const type = new transpile_types_1.TranspileTypes().toType(a.getType());
|
|
76628
|
+
attr.push(`"${a.getName().toUpperCase()}": {"type": ${type}, "visibility": "U", "is_constant": " "}`);
|
|
76629
|
+
}
|
|
76630
|
+
for (const a of (idef === null || idef === void 0 ? void 0 : idef.getAttributes().getConstants()) || []) {
|
|
76631
|
+
const type = new transpile_types_1.TranspileTypes().toType(a.getType());
|
|
76632
|
+
attr.push(`"${a.getName().toUpperCase()}": {"type": ${type}, "visibility": "U", "is_constant": "X"}`);
|
|
76633
|
+
}
|
|
76634
|
+
return attr.join(",\n");
|
|
76635
|
+
}
|
|
76621
76636
|
buildTypes(idef) {
|
|
76622
76637
|
if (idef === undefined) {
|
|
76623
76638
|
return "";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abaplint/transpiler-cli",
|
|
3
|
-
"version": "2.5.
|
|
3
|
+
"version": "2.5.66",
|
|
4
4
|
"description": "Transpiler - Command Line Interface",
|
|
5
5
|
"bin": {
|
|
6
6
|
"abap_transpile": "./abap_transpile"
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"author": "abaplint",
|
|
26
26
|
"license": "MIT",
|
|
27
27
|
"devDependencies": {
|
|
28
|
-
"@abaplint/transpiler": "^2.5.
|
|
28
|
+
"@abaplint/transpiler": "^2.5.66",
|
|
29
29
|
"@types/glob": "^7.2.0",
|
|
30
30
|
"glob": "=7.2.0",
|
|
31
31
|
"@types/progress": "^2.0.5",
|