@abaplint/runtime 2.10.75 → 2.10.76
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Structure } from "../types";
|
|
2
|
-
export declare function moveCorresponding(source: Structure, target: Structure): void;
|
|
1
|
+
import { FieldSymbol, Structure } from "../types";
|
|
2
|
+
export declare function moveCorresponding(source: Structure | FieldSymbol, target: Structure | FieldSymbol): void;
|
|
@@ -1,9 +1,29 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.moveCorresponding = moveCorresponding;
|
|
4
|
+
const types_1 = require("../types");
|
|
4
5
|
function moveCorresponding(source, target) {
|
|
6
|
+
if (source instanceof types_1.FieldSymbol) {
|
|
7
|
+
if (source.isAssigned() === false) {
|
|
8
|
+
throw new Error("GETWA_NOT_ASSIGNED");
|
|
9
|
+
}
|
|
10
|
+
moveCorresponding(source.getPointer(), target);
|
|
11
|
+
return;
|
|
12
|
+
}
|
|
13
|
+
if (target instanceof types_1.FieldSymbol) {
|
|
14
|
+
if (target.isAssigned() === false) {
|
|
15
|
+
throw new Error("GETWA_NOT_ASSIGNED");
|
|
16
|
+
}
|
|
17
|
+
moveCorresponding(source, target.getPointer());
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
5
20
|
for (const n in source.get()) {
|
|
6
|
-
target.get()[n]
|
|
21
|
+
if (target.get()[n] instanceof types_1.Structure) {
|
|
22
|
+
moveCorresponding(source.get()[n], target.get()[n]);
|
|
23
|
+
}
|
|
24
|
+
else {
|
|
25
|
+
target.get()[n]?.set(source.get()[n]);
|
|
26
|
+
}
|
|
7
27
|
}
|
|
8
28
|
}
|
|
9
29
|
//# sourceMappingURL=move_corresponding.js.map
|