@abaplint/core
Version:
abaplint - Core API
17 lines • 1.59 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.Find = void 0;
const combi_1 = require("../combi");
const expressions_1 = require("../expressions");
class Find {
getMatcher() {
// SUBMATCHES handling is a workaround
const options = (0, combi_1.per)("IGNORING CASE", "RESPECTING CASE", "IN BYTE MODE", "IN CHARACTER MODE", (0, combi_1.seq)("OF", expressions_1.Source), (0, combi_1.seq)("FROM", expressions_1.Source), (0, combi_1.seq)("TO", expressions_1.Source), (0, combi_1.seq)("MATCH OFFSET", expressions_1.Target), (0, combi_1.seq)("MATCH LINE", expressions_1.Target), (0, combi_1.seq)("MATCH COUNT", expressions_1.Target), (0, combi_1.seq)("MATCH LENGTH", expressions_1.Target), (0, combi_1.seq)("LENGTH", expressions_1.Source), (0, combi_1.seq)("RESULTS", expressions_1.Target), (0, combi_1.seq)("SUBMATCHES", expressions_1.Target), (0, combi_1.seq)("SUBMATCHES", expressions_1.Target, expressions_1.Target), (0, combi_1.seq)("SUBMATCHES", (0, combi_1.plus)(expressions_1.Target)));
const sectionLength = (0, combi_1.seq)("SECTION LENGTH", expressions_1.Source, "OF");
const before = (0, combi_1.seq)((0, combi_1.optPrio)((0, combi_1.altPrio)("TABLE", "SECTION OFFSET", sectionLength)), expressions_1.Source);
const ret = (0, combi_1.seq)("FIND", (0, combi_1.opt)((0, combi_1.altPrio)("FIRST OCCURRENCE OF", "ALL OCCURRENCES OF")), expressions_1.FindType, expressions_1.Source, "IN", before, (0, combi_1.opt)(options));
return ret;
}
}
exports.Find = Find;
//# sourceMappingURL=find.js.map