UNPKG

@abaplint/core

Version:
23 lines 1.38 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.SimpleTarget = void 0; const combi_1 = require("../combi"); const _1 = require("."); const tokens_1 = require("../../1_lexer/tokens"); const attribute_name_1 = require("./attribute_name"); const dereference_1 = require("./dereference"); class SimpleTarget extends combi_1.Expression { getRunnable() { const attr = (0, combi_1.seq)((0, combi_1.tok)(tokens_1.InstanceArrow), attribute_name_1.AttributeName); const comp = (0, combi_1.seq)((0, combi_1.tok)(tokens_1.Dash), _1.ComponentName); const something = (0, combi_1.starPrio)((0, combi_1.altPrio)(dereference_1.Dereference, attr, comp, _1.TableExpression)); const cast = (0, combi_1.seq)((0, combi_1.altPrio)(_1.Cast, _1.NewObject), _1.Arrow, _1.FieldAll); const clas = (0, combi_1.seq)(_1.ClassName, (0, combi_1.tok)(tokens_1.StaticArrow), attribute_name_1.AttributeName); const start = (0, combi_1.altPrio)(cast, clas, _1.TargetField, _1.TargetFieldSymbol); const fields = (0, combi_1.seq)((0, combi_1.optPrio)(_1.FieldOffset), (0, combi_1.optPrio)(_1.FieldLength)); const optional = (0, combi_1.altPrio)(_1.TableBody, fields); return (0, combi_1.seq)(start, something, optional); } } exports.SimpleTarget = SimpleTarget; //# sourceMappingURL=simple_target.js.map