@abaplint/transpiler-cli 2.5.66 → 2.5.68
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 +15 -14
- package/package.json +2 -2
package/build/bundle.js
CHANGED
|
@@ -71488,7 +71488,7 @@ class ClassImplementationTranspiler {
|
|
|
71488
71488
|
return new chunk_1.Chunk().append(ret + ` {
|
|
71489
71489
|
static INTERNAL_TYPE = 'CLAS';
|
|
71490
71490
|
static IMPLEMENTED_INTERFACES = [${this.findImplementedClass(traversal, def, scope).map(e => `"` + e.toUpperCase() + `"`).join(",")}];
|
|
71491
|
-
static ATTRIBUTES = {};`, node, traversal);
|
|
71491
|
+
static ATTRIBUTES = {${traversal.buildAttributes(def)}};`, node, traversal);
|
|
71492
71492
|
}
|
|
71493
71493
|
findImplementedInterface(traversal, def, scope) {
|
|
71494
71494
|
if (def === undefined || scope === undefined) {
|
|
@@ -76610,7 +76610,7 @@ class InterfaceTranspiler {
|
|
|
76610
76610
|
name = traversal_1.Traversal.escapeNamespace(name);
|
|
76611
76611
|
ret += `class ${name} {\n`;
|
|
76612
76612
|
ret += `static INTERNAL_TYPE = 'INTF';\n`;
|
|
76613
|
-
ret += `static ATTRIBUTES = {${
|
|
76613
|
+
ret += `static ATTRIBUTES = {${traversal.buildAttributes(def)}};\n`;
|
|
76614
76614
|
}
|
|
76615
76615
|
else if (c instanceof abaplint.Nodes.StatementNode && c.get() instanceof abaplint.Statements.EndInterface) {
|
|
76616
76616
|
ret += "}\n";
|
|
@@ -76621,18 +76621,6 @@ class InterfaceTranspiler {
|
|
|
76621
76621
|
ret += this.buildTypes(def);
|
|
76622
76622
|
return new chunk_1.Chunk(ret);
|
|
76623
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
|
-
}
|
|
76636
76624
|
buildTypes(idef) {
|
|
76637
76625
|
if (idef === undefined) {
|
|
76638
76626
|
return "";
|
|
@@ -77366,6 +77354,19 @@ class Traversal {
|
|
|
77366
77354
|
}
|
|
77367
77355
|
return undefined;
|
|
77368
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": () => {return ${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": () => {return ${type};}, "visibility": "U", "is_constant": "X"}`);
|
|
77367
|
+
}
|
|
77368
|
+
return attr.join(",\n");
|
|
77369
|
+
}
|
|
77369
77370
|
isBuiltinMethod(token) {
|
|
77370
77371
|
const scope = this.findCurrentScopeByToken(token);
|
|
77371
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.68",
|
|
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.68",
|
|
29
29
|
"@types/glob": "^7.2.0",
|
|
30
30
|
"glob": "=7.2.0",
|
|
31
31
|
"@types/progress": "^2.0.5",
|