@abaplint/runtime
Version:
Transpiler - Runtime
26 lines • 809 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.getReference = getReference;
const types_1 = require("../types");
/**
* note target and source is switched vs the ABAP statement for acommodating expression REF
*/
function getReference(target, source) {
// console.dir(input);
if (source instanceof types_1.FieldSymbol) {
source = source.getPointer();
if (source === undefined) {
throw new Error("GETWA_NOT_ASSIGNED");
}
}
if (target instanceof types_1.FieldSymbol) {
target = target.getPointer();
if (target === undefined) {
throw new Error("GETWA_NOT_ASSIGNED");
}
}
target = target;
target.assign(source);
return target;
}
//# sourceMappingURL=get_reference.js.map