@abaplint/core
Version:
abaplint - Core API
14 lines • 676 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.SwitchBody = void 0;
const combi_1 = require("../combi");
const _1 = require(".");
class SwitchBody extends combi_1.Expression {
getRunnable() {
const or = (0, combi_1.seq)("OR", _1.Source);
const swhen = (0, combi_1.seq)("WHEN", _1.Source, (0, combi_1.star)(or), "THEN", (0, combi_1.alt)(_1.Source, _1.Throw));
return (0, combi_1.seq)((0, combi_1.opt)(_1.Let), _1.Source, (0, combi_1.plus)(swhen), (0, combi_1.opt)((0, combi_1.seq)("ELSE", (0, combi_1.alt)(_1.Source, _1.Throw))));
}
}
exports.SwitchBody = SwitchBody;
//# sourceMappingURL=switch_body.js.map