@abaplint/transpiler-cli 2.5.65 → 2.5.67
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 +17 -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 = {${traversal.buildAttributes(def)}};`, 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 = {${traversal.buildAttributes(def)}};\n`;
|
|
76611
76614
|
}
|
|
76612
76615
|
else if (c instanceof abaplint.Nodes.StatementNode && c.get() instanceof abaplint.Statements.EndInterface) {
|
|
76613
76616
|
ret += "}\n";
|
|
@@ -77351,6 +77354,19 @@ class Traversal {
|
|
|
77351
77354
|
}
|
|
77352
77355
|
return undefined;
|
|
77353
77356
|
}
|
|
77357
|
+
buildAttributes(def) {
|
|
77358
|
+
const attr = [];
|
|
77359
|
+
// TODO: visibility is wrong for classes
|
|
77360
|
+
for (const a of (def === null || def === void 0 ? void 0 : def.getAttributes().getAll()) || []) {
|
|
77361
|
+
const type = new transpile_types_1.TranspileTypes().toType(a.getType());
|
|
77362
|
+
attr.push(`"${a.getName().toUpperCase()}": {"type": ${type}, "visibility": "U", "is_constant": " "}`);
|
|
77363
|
+
}
|
|
77364
|
+
for (const a of (def === null || def === void 0 ? void 0 : def.getAttributes().getConstants()) || []) {
|
|
77365
|
+
const type = new transpile_types_1.TranspileTypes().toType(a.getType());
|
|
77366
|
+
attr.push(`"${a.getName().toUpperCase()}": {"type": ${type}, "visibility": "U", "is_constant": "X"}`);
|
|
77367
|
+
}
|
|
77368
|
+
return attr.join(",\n");
|
|
77369
|
+
}
|
|
77354
77370
|
isBuiltinMethod(token) {
|
|
77355
77371
|
const scope = this.findCurrentScopeByToken(token);
|
|
77356
77372
|
if (scope === undefined) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abaplint/transpiler-cli",
|
|
3
|
-
"version": "2.5.
|
|
3
|
+
"version": "2.5.67",
|
|
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.67",
|
|
29
29
|
"@types/glob": "^7.2.0",
|
|
30
30
|
"glob": "=7.2.0",
|
|
31
31
|
"@types/progress": "^2.0.5",
|