UNPKG

@abaplint/core

Version:
16 lines 1.09 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.CDSDefineCustom = void 0; const _1 = require("."); const combi_1 = require("../../abap/2_statements/combi"); const cds_name_1 = require("./cds_name"); const cds_type_1 = require("./cds_type"); class CDSDefineCustom extends combi_1.Expression { getRunnable() { const field = (0, combi_1.seq)((0, combi_1.opt)((0, combi_1.str)("KEY")), cds_name_1.CDSName, ":", cds_type_1.CDSType, ";"); const compsiOrAssoci = (0, combi_1.seq)(cds_name_1.CDSName, ":", (0, combi_1.alt)(_1.CDSComposition, _1.CDSAssociation), ";"); return (0, combi_1.seq)((0, combi_1.star)(_1.CDSAnnotation), (0, combi_1.str)("DEFINE"), (0, combi_1.opt)((0, combi_1.str)("ROOT")), (0, combi_1.str)("CUSTOM ENTITY"), cds_name_1.CDSName, (0, combi_1.str)("{"), (0, combi_1.plus)((0, combi_1.seq)((0, combi_1.star)(_1.CDSAnnotation), (0, combi_1.alt)(field, compsiOrAssoci))), (0, combi_1.str)("}"), (0, combi_1.opt)(";")); } } exports.CDSDefineCustom = CDSDefineCustom; //# sourceMappingURL=cds_define_custom.js.map