@abaplint/core 2.91.19 → 2.91.20
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/src/registry.js
CHANGED
|
@@ -924,14 +924,15 @@ ${indentation}RAISE EXCEPTION ${uniqueName2}.`;
|
|
|
924
924
|
}
|
|
925
925
|
const enumName = (_b = high.findExpressionAfterToken("ENUM")) === null || _b === void 0 ? void 0 : _b.concatTokens();
|
|
926
926
|
const structureName = (_c = high.findExpressionAfterToken("STRUCTURE")) === null || _c === void 0 ? void 0 : _c.concatTokens();
|
|
927
|
-
|
|
927
|
+
// all ENUMS are char like?
|
|
928
|
+
let code = `TYPES ${enumName} TYPE string.
|
|
928
929
|
CONSTANTS: BEGIN OF ${structureName},\n`;
|
|
929
930
|
let count = 1;
|
|
930
931
|
for (const e of enumStructure.findDirectStatements(Statements.TypeEnum).concat(enumStructure.findDirectStatements(Statements.Type))) {
|
|
931
932
|
const name = (_d = e.findFirstExpression(Expressions.NamespaceSimpleName)) === null || _d === void 0 ? void 0 : _d.concatTokens();
|
|
932
933
|
let value = (_e = e.findFirstExpression(Expressions.Value)) === null || _e === void 0 ? void 0 : _e.concatTokens();
|
|
933
934
|
if (value === undefined) {
|
|
934
|
-
value = "VALUE " + count
|
|
935
|
+
value = "VALUE '" + count++ + "'";
|
|
935
936
|
}
|
|
936
937
|
code += ` ${name} TYPE ${enumName} ${value},\n`;
|
|
937
938
|
}
|