@abaplint/core
Version:
abaplint - Core API
23 lines • 1.36 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.MethodSource = void 0;
const combi_1 = require("../combi");
const tokens_1 = require("../../1_lexer/tokens");
const _1 = require(".");
class MethodSource extends combi_1.Expression {
getRunnable() {
// note: AttributeName can be both an attribute and a method name, the syntax check will tell
// note: its allowed to end with MethodCall, however if this is done it will give a syntax error via syntax check
const afterArrow = (0, combi_1.alt)(_1.AttributeName, _1.MethodCall, _1.Dynamic);
const arrow = (0, combi_1.altPrio)((0, combi_1.tok)(tokens_1.InstanceArrow), (0, combi_1.tok)(tokens_1.StaticArrow));
const attr = (0, combi_1.seq)(arrow, afterArrow);
const comp = (0, combi_1.seq)((0, combi_1.tok)(tokens_1.Dash), _1.ComponentName);
const attrOrComp = (0, combi_1.altPrio)(attr, comp);
const staticClass = (0, combi_1.seq)(_1.ClassName, (0, combi_1.tok)(tokens_1.StaticArrow));
const clas = (0, combi_1.seq)(staticClass, afterArrow);
const start = (0, combi_1.seq)((0, combi_1.altPrio)(clas, _1.SourceField, _1.SourceFieldSymbol, _1.Dynamic), (0, combi_1.star)(attrOrComp));
return start;
}
}
exports.MethodSource = MethodSource;
//# sourceMappingURL=method_source.js.map