@abaplint/runtime 2.11.29 → 2.11.31
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.
- package/build/src/builtin/index.d.ts +3 -1
- package/build/src/builtin/index.js +3 -1
- package/build/src/builtin/line_exists.d.ts +3 -0
- package/build/src/builtin/line_exists.js +22 -0
- package/build/src/builtin/line_index.d.ts +2 -0
- package/build/src/builtin/line_index.js +22 -0
- package/build/src/operators/table_expression.d.ts +1 -0
- package/build/src/operators/table_expression.js +7 -2
- package/package.json +1 -1
|
@@ -15,13 +15,14 @@ export * from "./frac";
|
|
|
15
15
|
export * from "./from_mixed";
|
|
16
16
|
export * from "./insert";
|
|
17
17
|
export * from "./ipow";
|
|
18
|
+
export * from "./line_exists";
|
|
19
|
+
export * from "./line_index";
|
|
18
20
|
export * from "./lines";
|
|
19
21
|
export * from "./match";
|
|
20
22
|
export * from "./matches";
|
|
21
23
|
export * from "./nmax";
|
|
22
24
|
export * from "./nmin";
|
|
23
25
|
export * from "./numofchar";
|
|
24
|
-
export * from "./xsdbool";
|
|
25
26
|
export * from "./repeat";
|
|
26
27
|
export * from "./replace";
|
|
27
28
|
export * from "./reverse";
|
|
@@ -43,6 +44,7 @@ export * from "./to_mixed";
|
|
|
43
44
|
export * from "./to_upper";
|
|
44
45
|
export * from "./translate";
|
|
45
46
|
export * from "./trunc";
|
|
47
|
+
export * from "./xsdbool";
|
|
46
48
|
export * from "./xstrlen";
|
|
47
49
|
export declare const abap_true: Character;
|
|
48
50
|
export declare const abap_false: Character;
|
|
@@ -32,13 +32,14 @@ __exportStar(require("./frac"), exports);
|
|
|
32
32
|
__exportStar(require("./from_mixed"), exports);
|
|
33
33
|
__exportStar(require("./insert"), exports);
|
|
34
34
|
__exportStar(require("./ipow"), exports);
|
|
35
|
+
__exportStar(require("./line_exists"), exports);
|
|
36
|
+
__exportStar(require("./line_index"), exports);
|
|
35
37
|
__exportStar(require("./lines"), exports);
|
|
36
38
|
__exportStar(require("./match"), exports);
|
|
37
39
|
__exportStar(require("./matches"), exports);
|
|
38
40
|
__exportStar(require("./nmax"), exports);
|
|
39
41
|
__exportStar(require("./nmin"), exports);
|
|
40
42
|
__exportStar(require("./numofchar"), exports);
|
|
41
|
-
__exportStar(require("./xsdbool"), exports);
|
|
42
43
|
__exportStar(require("./repeat"), exports);
|
|
43
44
|
__exportStar(require("./replace"), exports);
|
|
44
45
|
__exportStar(require("./reverse"), exports);
|
|
@@ -60,6 +61,7 @@ __exportStar(require("./to_mixed"), exports);
|
|
|
60
61
|
__exportStar(require("./to_upper"), exports);
|
|
61
62
|
__exportStar(require("./translate"), exports);
|
|
62
63
|
__exportStar(require("./trunc"), exports);
|
|
64
|
+
__exportStar(require("./xsdbool"), exports);
|
|
63
65
|
__exportStar(require("./xstrlen"), exports);
|
|
64
66
|
exports.abap_true = new types_1.Character(1, { qualifiedName: "ABAP_BOOL", ddicName: "ABAP_BOOL" }).set("X").setConstant();
|
|
65
67
|
exports.abap_false = new types_1.Character(1, { qualifiedName: "ABAP_BOOL", ddicName: "ABAP_BOOL" }).set("").setConstant();
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LINE_NOT_FOUND = void 0;
|
|
4
|
+
exports.line_exists = line_exists;
|
|
5
|
+
exports.LINE_NOT_FOUND = "CX_SY_ITAB_LINE_NOT_FOUND";
|
|
6
|
+
function line_exists(callback) {
|
|
7
|
+
try {
|
|
8
|
+
callback();
|
|
9
|
+
}
|
|
10
|
+
catch (error) {
|
|
11
|
+
if (abap.Classes[exports.LINE_NOT_FOUND] !== undefined
|
|
12
|
+
&& error instanceof abap.Classes[exports.LINE_NOT_FOUND]) {
|
|
13
|
+
return abap.builtin.abap_false;
|
|
14
|
+
}
|
|
15
|
+
else if (error.toString() === `Error: Global class ${exports.LINE_NOT_FOUND} not found`) {
|
|
16
|
+
return abap.builtin.abap_false;
|
|
17
|
+
}
|
|
18
|
+
throw error;
|
|
19
|
+
}
|
|
20
|
+
return abap.builtin.abap_true;
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=line_exists.js.map
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.line_index = line_index;
|
|
4
|
+
const operators_1 = require("../operators");
|
|
5
|
+
const line_exists_1 = require("./line_exists");
|
|
6
|
+
function line_index(callback) {
|
|
7
|
+
try {
|
|
8
|
+
callback();
|
|
9
|
+
}
|
|
10
|
+
catch (error) {
|
|
11
|
+
if (abap.Classes[line_exists_1.LINE_NOT_FOUND] !== undefined
|
|
12
|
+
&& error instanceof abap.Classes[line_exists_1.LINE_NOT_FOUND]) {
|
|
13
|
+
return abap.IntegerFactory.get(0);
|
|
14
|
+
}
|
|
15
|
+
else if (error.toString() === `Error: Global class ${line_exists_1.LINE_NOT_FOUND} not found`) {
|
|
16
|
+
return abap.IntegerFactory.get(0);
|
|
17
|
+
}
|
|
18
|
+
throw error;
|
|
19
|
+
}
|
|
20
|
+
return abap.IntegerFactory.get(operators_1.foundIndex);
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=line_index.js.map
|
|
@@ -1,16 +1,21 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.foundIndex = void 0;
|
|
3
4
|
exports.tableExpression = tableExpression;
|
|
4
5
|
const read_table_1 = require("../statements/read_table");
|
|
5
6
|
const throw_error_1 = require("../throw_error");
|
|
6
7
|
const _parse_1 = require("./_parse");
|
|
8
|
+
exports.foundIndex = 0;
|
|
7
9
|
function tableExpression(source, options) {
|
|
8
10
|
let found;
|
|
9
11
|
if (options.index) {
|
|
10
|
-
|
|
12
|
+
exports.foundIndex = (0, _parse_1.parse)(options.index) - 1;
|
|
13
|
+
found = source.array()[exports.foundIndex];
|
|
11
14
|
}
|
|
12
15
|
else if (options.withKey) {
|
|
13
|
-
|
|
16
|
+
const search = (0, read_table_1.searchWithKey)(source.array(), options.withKey, 0, options?.usesTableLine);
|
|
17
|
+
found = search.found;
|
|
18
|
+
exports.foundIndex = search.foundIndex;
|
|
14
19
|
}
|
|
15
20
|
else {
|
|
16
21
|
throw new Error("TableExpression runtime: todo");
|