@abaplint/runtime 2.11.5 → 2.11.7
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/dynamic_call_lookup.js +4 -8
- package/build/src/operators/div.d.ts +1 -1
- package/build/src/operators/divide.d.ts +1 -1
- package/build/src/operators/mod.d.ts +1 -1
- package/build/src/operators/multiply.d.ts +1 -1
- package/build/src/operators/power.d.ts +1 -1
- package/build/src/statements/sort.js +22 -0
- package/build/src/throw_error.js +1 -2
- package/build/src/types/data_reference.d.ts +1 -1
- package/build/src/types/field_symbol.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.dynamicCallLookup = dynamicCallLookup;
|
|
4
|
+
const throw_error_1 = require("./throw_error");
|
|
4
5
|
function dynamicCallLookup(obj, methodName) {
|
|
5
|
-
|
|
6
|
-
|
|
6
|
+
let name = typeof methodName === "string" ? methodName : methodName.get().toLowerCase().trimEnd();
|
|
7
|
+
name = name.replaceAll("~", "$").replaceAll("/", "$");
|
|
7
8
|
let ret = obj[name];
|
|
8
9
|
if (ret !== undefined) {
|
|
9
10
|
ret = ret.bind(obj);
|
|
@@ -14,12 +15,7 @@ function dynamicCallLookup(obj, methodName) {
|
|
|
14
15
|
ret = obj.FRIENDS_ACCESS_INSTANCE[name];
|
|
15
16
|
}
|
|
16
17
|
if (ret === undefined) {
|
|
17
|
-
|
|
18
|
-
if (abap.Classes['CX_SY_DYN_CALL_ILLEGAL_METHOD'] === undefined) {
|
|
19
|
-
throw "CX_SY_DYN_CALL_ILLEGAL_METHOD not found";
|
|
20
|
-
}
|
|
21
|
-
// @ts-ignore
|
|
22
|
-
throw new abap.Classes['CX_SY_DYN_CALL_ILLEGAL_METHOD']();
|
|
18
|
+
(0, throw_error_1.throwError)("CX_SY_DYN_CALL_ILLEGAL_METHOD");
|
|
23
19
|
}
|
|
24
20
|
return ret;
|
|
25
21
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { Integer, Integer8 } from "../types";
|
|
2
2
|
import { ICharacter } from "../types/_character";
|
|
3
3
|
import { INumeric } from "../types/_numeric";
|
|
4
|
-
export declare function div(left: INumeric | ICharacter | Integer8 | string | number, right: INumeric | Integer8 | ICharacter | string | number):
|
|
4
|
+
export declare function div(left: INumeric | ICharacter | Integer8 | string | number, right: INumeric | Integer8 | ICharacter | string | number): Integer8 | Integer;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { Float, Integer, Integer8 } from "../types";
|
|
2
2
|
import { ICharacter } from "../types/_character";
|
|
3
3
|
import { INumeric } from "../types/_numeric";
|
|
4
|
-
export declare function divide(left: INumeric | ICharacter | Integer8 | string | number, right: INumeric | ICharacter | Integer8 | string | number):
|
|
4
|
+
export declare function divide(left: INumeric | ICharacter | Integer8 | string | number, right: INumeric | ICharacter | Integer8 | string | number): Float | Integer8 | Integer;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { Integer, Integer8 } from "../types";
|
|
2
2
|
import { ICharacter } from "../types/_character";
|
|
3
3
|
import { INumeric } from "../types/_numeric";
|
|
4
|
-
export declare function mod(left: INumeric | ICharacter | string | Integer8 | number, right: INumeric | Integer8 | ICharacter | string | number):
|
|
4
|
+
export declare function mod(left: INumeric | ICharacter | string | Integer8 | number, right: INumeric | Integer8 | ICharacter | string | number): Integer8 | Integer;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { Float, Integer, Integer8 } from "../types";
|
|
2
2
|
import { ICharacter } from "../types/_character";
|
|
3
3
|
import { INumeric } from "../types/_numeric";
|
|
4
|
-
export declare function multiply(left: INumeric | ICharacter | string | Integer8 | number, right: INumeric | ICharacter | string | Integer8 | number):
|
|
4
|
+
export declare function multiply(left: INumeric | ICharacter | string | Integer8 | number, right: INumeric | ICharacter | string | Integer8 | number): Float | Integer8 | Integer;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { Float, Integer8 } from "../types";
|
|
2
2
|
import { ICharacter } from "../types/_character";
|
|
3
3
|
import { INumeric } from "../types/_numeric";
|
|
4
|
-
export declare function power(left: INumeric | ICharacter | Integer8 | string | number, right: INumeric | ICharacter | Integer8 | string | number):
|
|
4
|
+
export declare function power(left: INumeric | ICharacter | Integer8 | string | number, right: INumeric | ICharacter | Integer8 | string | number): Float | Integer8;
|
|
@@ -12,6 +12,28 @@ function compare(a, b, input) {
|
|
|
12
12
|
vala = a.get();
|
|
13
13
|
valb = b.get();
|
|
14
14
|
}
|
|
15
|
+
else if (componentName.includes("->")) {
|
|
16
|
+
const sub = componentName.split("->");
|
|
17
|
+
vala = a;
|
|
18
|
+
valb = b;
|
|
19
|
+
for (const s of sub) {
|
|
20
|
+
if (s === "table_line") {
|
|
21
|
+
continue;
|
|
22
|
+
}
|
|
23
|
+
if (vala.get()[s] !== undefined) {
|
|
24
|
+
vala = vala.get()[s];
|
|
25
|
+
}
|
|
26
|
+
else {
|
|
27
|
+
vala = vala.get().FRIENDS_ACCESS_INSTANCE[s];
|
|
28
|
+
}
|
|
29
|
+
if (valb.get()[s] !== undefined) {
|
|
30
|
+
valb = valb.get()[s];
|
|
31
|
+
}
|
|
32
|
+
else {
|
|
33
|
+
valb = valb.get().FRIENDS_ACCESS_INSTANCE[s];
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
15
37
|
else if (componentName.includes("-")) {
|
|
16
38
|
const sub = componentName.split("-");
|
|
17
39
|
vala = a;
|
package/build/src/throw_error.js
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.throwError = throwError;
|
|
4
|
+
// todo: add possibility to pass parameters to the exception constructor
|
|
4
5
|
function throwError(name) {
|
|
5
|
-
// @ts-ignore
|
|
6
6
|
if (abap.Classes[name] !== undefined) {
|
|
7
|
-
// @ts-ignore
|
|
8
7
|
throw new abap.Classes[name]();
|
|
9
8
|
}
|
|
10
9
|
else {
|
|
@@ -22,7 +22,7 @@ export declare class DataReference {
|
|
|
22
22
|
get(): any;
|
|
23
23
|
array(): any;
|
|
24
24
|
getArrayLength(): any;
|
|
25
|
-
set(value: any): void |
|
|
25
|
+
set(value: any): void | Table | Structure | ABAPObject | Float | Integer8 | this;
|
|
26
26
|
getOffset(input: {
|
|
27
27
|
offset?: number | INumeric | Hex;
|
|
28
28
|
length?: number | INumeric | Hex;
|
|
@@ -18,7 +18,7 @@ export declare class FieldSymbol {
|
|
|
18
18
|
unassign(): void;
|
|
19
19
|
isAssigned(): boolean;
|
|
20
20
|
getPointer(): any;
|
|
21
|
-
dereference(): INumeric |
|
|
21
|
+
dereference(): INumeric | Table | ICharacter | Structure | ABAPObject | Float | import("./integer8").Integer8 | undefined;
|
|
22
22
|
clear(): void | Structure | undefined;
|
|
23
23
|
get(): any;
|
|
24
24
|
appendInitial(): import("./table").TableRowType | undefined;
|