UNPKG

@abaplint/transpiler

Version:
28 lines 942 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.HandleOA2P = void 0; const chunk_1 = require("../chunk"); class HandleOA2P { runObject(obj, _reg) { const filename = obj.getXMLFile()?.getFilename().replace(".xml", ".mjs").toLowerCase(); if (filename === undefined) { return []; } const chunk = new chunk_1.Chunk().appendString(`abap.OA2P["${obj.getName().toUpperCase()}"] = {\n`); chunk.appendString(` "scopes": ${JSON.stringify(obj.listScopes())},\n`); chunk.appendString(`};`); const output = { object: { name: obj.getName(), type: obj.getType(), }, filename: filename, chunk: chunk, requires: [], exports: [], }; return [output]; } } exports.HandleOA2P = HandleOA2P; //# sourceMappingURL=handle_oa2p.js.map