@abaplint/runtime 2.1.32 → 2.1.35
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.
|
@@ -25,6 +25,9 @@ function initial(val) {
|
|
|
25
25
|
else if (val instanceof types_1.Character) {
|
|
26
26
|
return val.get().match(/^ *$/) !== null;
|
|
27
27
|
}
|
|
28
|
+
else if (val instanceof types_1.FieldSymbol && val.getPointer() === undefined) {
|
|
29
|
+
throw "FS not assigned";
|
|
30
|
+
}
|
|
28
31
|
if (typeof val === "string") {
|
|
29
32
|
return val === "";
|
|
30
33
|
}
|
|
@@ -4,7 +4,7 @@ import { INumeric } from "../types/_numeric";
|
|
|
4
4
|
export interface IAssignInput {
|
|
5
5
|
source?: INumeric | ICharacter | Structure | DataReference;
|
|
6
6
|
target: FieldSymbol;
|
|
7
|
-
|
|
7
|
+
dynamicName?: string;
|
|
8
8
|
dynamicSource?: ICharacter;
|
|
9
9
|
casting?: boolean;
|
|
10
10
|
component?: string | ICharacter;
|
|
@@ -3,13 +3,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.assign = void 0;
|
|
4
4
|
const types_1 = require("../types");
|
|
5
5
|
function assign(input) {
|
|
6
|
-
|
|
6
|
+
// console.dir(input);
|
|
7
|
+
if (input.dynamicName) {
|
|
7
8
|
if (input.dynamicSource instanceof types_1.FieldSymbol) {
|
|
8
9
|
input.dynamicSource = input.dynamicSource.getPointer();
|
|
9
10
|
}
|
|
10
|
-
if (input.
|
|
11
|
+
if (input.dynamicName.includes("->")) {
|
|
11
12
|
if (input.dynamicSource instanceof types_1.ABAPObject) {
|
|
12
|
-
const split = input.
|
|
13
|
+
const split = input.dynamicName.split("->");
|
|
13
14
|
// @ts-ignore
|
|
14
15
|
input.dynamicSource = input.dynamicSource.get()[split[1].toLowerCase()];
|
|
15
16
|
}
|
|
@@ -19,6 +20,28 @@ function assign(input) {
|
|
|
19
20
|
return;
|
|
20
21
|
}
|
|
21
22
|
}
|
|
23
|
+
else if (input.dynamicName.includes("=>")) {
|
|
24
|
+
const split = input.dynamicName.split("=>");
|
|
25
|
+
// @ts-ignore
|
|
26
|
+
const clas = abap.Classes[split[0].toUpperCase()];
|
|
27
|
+
if (clas === undefined) {
|
|
28
|
+
// @ts-ignore
|
|
29
|
+
abap.builtin.sy.get().subrc.set(4);
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
if (clas[split[1].toLowerCase()] !== undefined) {
|
|
33
|
+
input.target.assign(clas[split[1].toLowerCase()]);
|
|
34
|
+
// @ts-ignore
|
|
35
|
+
abap.builtin.sy.get().subrc.set(0);
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
else if (clas[split[0].toLowerCase() + "$" + split[1].toLowerCase()] !== undefined) {
|
|
39
|
+
input.target.assign(clas[split[0].toLowerCase() + "$" + split[1].toLowerCase()]);
|
|
40
|
+
// @ts-ignore
|
|
41
|
+
abap.builtin.sy.get().subrc.set(0);
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
22
45
|
if (input.dynamicSource) {
|
|
23
46
|
input.target.assign(input.dynamicSource);
|
|
24
47
|
// @ts-ignore
|
|
@@ -38,8 +38,8 @@ function* loop(table, options) {
|
|
|
38
38
|
}
|
|
39
39
|
// @ts-ignore
|
|
40
40
|
abap.builtin.sy.get().tabix.set(loopIndex.index + 1);
|
|
41
|
-
yield current;
|
|
42
41
|
entered = true;
|
|
42
|
+
yield current;
|
|
43
43
|
loopIndex.index++;
|
|
44
44
|
loopTo = (options === null || options === void 0 ? void 0 : options.to) && options.to.get() < array.length ? options.to.get() : array.length;
|
|
45
45
|
}
|