@abaplint/runtime 2.13.7 → 2.13.9
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.
|
@@ -19,10 +19,25 @@ function assign(input) {
|
|
|
19
19
|
const split = input.dynamicName.split(/->|-/);
|
|
20
20
|
split.shift();
|
|
21
21
|
for (const s of split) {
|
|
22
|
-
|
|
22
|
+
const upperS = s.toUpperCase().trimEnd();
|
|
23
|
+
if (upperS === "*") {
|
|
23
24
|
// @ts-ignore
|
|
24
25
|
input.dynamicSource = input.dynamicSource.dereference();
|
|
25
26
|
}
|
|
27
|
+
else if (upperS === "TABLE_LINE" && input.dynamicSource instanceof types_1.DataReference) {
|
|
28
|
+
// @ts-ignore
|
|
29
|
+
input.dynamicSource = input.dynamicSource.getPointer();
|
|
30
|
+
if (input.dynamicSource instanceof types_1.Table) {
|
|
31
|
+
const options = input.dynamicSource.getOptions();
|
|
32
|
+
if (options?.withHeader === true) {
|
|
33
|
+
// @ts-ignore
|
|
34
|
+
input.dynamicSource = input.dynamicSource.getHeader();
|
|
35
|
+
}
|
|
36
|
+
else {
|
|
37
|
+
input.dynamicSource = undefined;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
26
41
|
else {
|
|
27
42
|
// @ts-ignore
|
|
28
43
|
const source = input.dynamicSource.get();
|
|
@@ -30,6 +45,7 @@ function assign(input) {
|
|
|
30
45
|
abap.builtin.sy.get().subrc.set(4);
|
|
31
46
|
return;
|
|
32
47
|
}
|
|
48
|
+
// @ts-ignore
|
|
33
49
|
input.dynamicSource = source[s.toLowerCase().replace(/[~\\/]/g, "$")];
|
|
34
50
|
}
|
|
35
51
|
}
|
|
@@ -133,6 +149,11 @@ function assign(input) {
|
|
|
133
149
|
if (input.source instanceof types_1.Table && input.source.getOptions()?.withHeader === true) {
|
|
134
150
|
input.target.assign(input.source.getHeader());
|
|
135
151
|
}
|
|
152
|
+
else if (input.target.getType() instanceof types_1.Table
|
|
153
|
+
&& !(input.source instanceof types_1.Table)
|
|
154
|
+
&& !(input.source instanceof types_1.HashedTable)) {
|
|
155
|
+
throw new Error("ASSIGN_TYPE_CONFLICT");
|
|
156
|
+
}
|
|
136
157
|
else {
|
|
137
158
|
if (input.casting) {
|
|
138
159
|
input.target.setCasting();
|
|
@@ -18,6 +18,7 @@ function find(input, options) {
|
|
|
18
18
|
abap.builtin.sy.get().subrc.set(0);
|
|
19
19
|
return;
|
|
20
20
|
}
|
|
21
|
+
s = s.replace(/\\/g, "\\\\");
|
|
21
22
|
s = s.replace(/\[/g, "\\[");
|
|
22
23
|
s = s.replace(/\]/g, "\\]");
|
|
23
24
|
s = s.replace(/\?/g, "\\?");
|
|
@@ -27,7 +28,11 @@ function find(input, options) {
|
|
|
27
28
|
s = s.replace(/\|/g, "\\|");
|
|
28
29
|
s = s.replace(/\*/g, "\\*");
|
|
29
30
|
s = s.replace(/\+/g, "\\+");
|
|
30
|
-
|
|
31
|
+
let flags = "g";
|
|
32
|
+
if (options.ignoringCase === true) {
|
|
33
|
+
flags += "i";
|
|
34
|
+
}
|
|
35
|
+
s = new RegExp(s, flags);
|
|
31
36
|
}
|
|
32
37
|
else if (options.regex || options.pcre) {
|
|
33
38
|
s = abap_regex_1.ABAPRegExp.getRegex({ all: true, ...options });
|