@abaplint/runtime 1.8.31 → 1.8.34
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.
|
@@ -15,7 +15,9 @@ function find(input, options) {
|
|
|
15
15
|
s = s.get();
|
|
16
16
|
}
|
|
17
17
|
if (s === "") {
|
|
18
|
-
|
|
18
|
+
// @ts-ignore
|
|
19
|
+
abap.builtin.sy.get().subrc.set(0);
|
|
20
|
+
return;
|
|
19
21
|
}
|
|
20
22
|
s = s.replace(/\[/g, "\\[");
|
|
21
23
|
s = s.replace(/\]/g, "\\]");
|
|
@@ -47,15 +49,17 @@ function find(input, options) {
|
|
|
47
49
|
}
|
|
48
50
|
const matches = [];
|
|
49
51
|
if (input instanceof types_1.Table) {
|
|
52
|
+
let line = 1;
|
|
50
53
|
for (const blah of input.array()) {
|
|
51
54
|
let temp;
|
|
52
55
|
// eslint-disable-next-line no-cond-assign
|
|
53
56
|
while (temp = s.exec(blah.get())) {
|
|
54
|
-
matches.push(temp);
|
|
57
|
+
matches.push(Object.assign(Object.assign({}, temp), { line }));
|
|
55
58
|
if (options.first === true) {
|
|
56
59
|
break;
|
|
57
60
|
}
|
|
58
61
|
}
|
|
62
|
+
line++;
|
|
59
63
|
}
|
|
60
64
|
}
|
|
61
65
|
else {
|
|
@@ -92,7 +96,7 @@ function find(input, options) {
|
|
|
92
96
|
length: new types_1.Integer(),
|
|
93
97
|
submatches: new types_1.Table(new types_1.Structure({ offset: new types_1.Integer(), length: new types_1.Integer() })),
|
|
94
98
|
});
|
|
95
|
-
match.get().line.set(0);
|
|
99
|
+
match.get().line.set(m.line || 0);
|
|
96
100
|
match.get().offset.set(m.index);
|
|
97
101
|
match.get().length.set(m[0].length);
|
|
98
102
|
const submatch = new types_1.Structure({ offset: new types_1.Integer(), length: new types_1.Integer() });
|