@abaplint/runtime 2.3.116 → 2.3.118
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/boolc.d.ts +1 -1
- package/build/src/builtin/boolc.js +3 -0
- package/build/src/builtin/contains.d.ts +12 -0
- package/build/src/builtin/contains.js +16 -0
- package/build/src/builtin/index.d.ts +1 -0
- package/build/src/builtin/index.js +1 -0
- package/build/src/statements/create_data.js +9 -0
- package/package.json +1 -1
|
@@ -9,6 +9,9 @@ function boolc(input) {
|
|
|
9
9
|
else if (input === false || input === undefined) {
|
|
10
10
|
return new types_1.String().set(" ");
|
|
11
11
|
}
|
|
12
|
+
else if (input.val instanceof types_1.String && input.val.get().trim() === "") {
|
|
13
|
+
return new types_1.String().set(" ");
|
|
14
|
+
}
|
|
12
15
|
else if (input.val instanceof types_1.Character && input.val.get().trim() === "") {
|
|
13
16
|
return new types_1.String().set(" ");
|
|
14
17
|
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { String } from "../types";
|
|
2
|
+
import { ICharacter } from "../types/_character";
|
|
3
|
+
import { INumeric } from "../types/_numeric";
|
|
4
|
+
export declare type ContainsInput = {
|
|
5
|
+
val: ICharacter;
|
|
6
|
+
regex: ICharacter;
|
|
7
|
+
case?: ICharacter;
|
|
8
|
+
off?: INumeric;
|
|
9
|
+
len?: INumeric;
|
|
10
|
+
occ?: INumeric;
|
|
11
|
+
};
|
|
12
|
+
export declare function contains(input: ContainsInput): String;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.contains = void 0;
|
|
4
|
+
const types_1 = require("../types");
|
|
5
|
+
function contains(input) {
|
|
6
|
+
if (input.case !== undefined
|
|
7
|
+
|| input.off !== undefined
|
|
8
|
+
|| input.len !== undefined
|
|
9
|
+
|| input.occ !== undefined) {
|
|
10
|
+
throw "runtime, contains() todo";
|
|
11
|
+
}
|
|
12
|
+
const ret = input.val.get().match(input.regex.get()) !== null ? "X" : " ";
|
|
13
|
+
return new types_1.String().set(ret);
|
|
14
|
+
}
|
|
15
|
+
exports.contains = contains;
|
|
16
|
+
//# sourceMappingURL=contains.js.map
|
|
@@ -21,6 +21,7 @@ __exportStar(require("./boolc"), exports);
|
|
|
21
21
|
__exportStar(require("./ceil"), exports);
|
|
22
22
|
__exportStar(require("./concat_lines_of"), exports);
|
|
23
23
|
__exportStar(require("./condense"), exports);
|
|
24
|
+
__exportStar(require("./contains"), exports);
|
|
24
25
|
__exportStar(require("./cos"), exports);
|
|
25
26
|
__exportStar(require("./count_any_of"), exports);
|
|
26
27
|
__exportStar(require("./count"), exports);
|
|
@@ -33,6 +33,15 @@ function createData(target, options) {
|
|
|
33
33
|
// @ts-ignore
|
|
34
34
|
target.assign((0, clone_1.clone)(abap.Classes[className][typeName.toLowerCase()]));
|
|
35
35
|
}
|
|
36
|
+
else if (options.name.startsWith("\\TYPE=%")) {
|
|
37
|
+
// currently, only the runtime knows the references to the anonymous types
|
|
38
|
+
// @ts-ignore
|
|
39
|
+
const clas = abap.Classes["KERNEL_CREATE_DATA_HANDLE"];
|
|
40
|
+
if (clas === undefined) {
|
|
41
|
+
throw new Error("CreateData, kernel class missing");
|
|
42
|
+
}
|
|
43
|
+
clas.anonymous({ name: options.name, dref: target });
|
|
44
|
+
}
|
|
36
45
|
else {
|
|
37
46
|
(0, throw_error_1.throwError)("CX_SY_CREATE_DATA_ERROR");
|
|
38
47
|
}
|