@abaplint/runtime 2.0.31 → 2.0.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.
|
@@ -8,12 +8,13 @@ declare type PointerType = INumeric | Table | ICharacter | ABAPObject | undefine
|
|
|
8
8
|
export declare class FieldSymbol {
|
|
9
9
|
private pointer;
|
|
10
10
|
private casting;
|
|
11
|
-
|
|
11
|
+
private readonly type;
|
|
12
|
+
constructor(type?: PointerType);
|
|
12
13
|
assign(pointer: PointerType): void;
|
|
13
14
|
setCasting(): void;
|
|
14
15
|
unassign(): void;
|
|
15
16
|
isAssigned(): boolean;
|
|
16
|
-
getPointer():
|
|
17
|
+
getPointer(): any;
|
|
17
18
|
clear(): void | Structure | undefined;
|
|
18
19
|
get(): any;
|
|
19
20
|
appendInitial(): import("./table").TableRowType | undefined;
|
|
@@ -3,11 +3,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.FieldSymbol = void 0;
|
|
4
4
|
const table_1 = require("./table");
|
|
5
5
|
const string_1 = require("./string");
|
|
6
|
+
const hex_1 = require("./hex");
|
|
6
7
|
class FieldSymbol {
|
|
7
|
-
|
|
8
|
-
constructor() {
|
|
8
|
+
constructor(type) {
|
|
9
9
|
this.pointer = undefined;
|
|
10
10
|
this.casting = false;
|
|
11
|
+
this.type = type;
|
|
11
12
|
}
|
|
12
13
|
assign(pointer) {
|
|
13
14
|
this.pointer = pointer;
|
|
@@ -22,6 +23,10 @@ class FieldSymbol {
|
|
|
22
23
|
return this.pointer !== undefined;
|
|
23
24
|
}
|
|
24
25
|
getPointer() {
|
|
26
|
+
if (this.casting) {
|
|
27
|
+
// todo, this wont work for everything, eg changing CASTING'ed values
|
|
28
|
+
return this.get();
|
|
29
|
+
}
|
|
25
30
|
return this.pointer;
|
|
26
31
|
}
|
|
27
32
|
///////////////
|
|
@@ -30,14 +35,22 @@ class FieldSymbol {
|
|
|
30
35
|
return (_a = this.pointer) === null || _a === void 0 ? void 0 : _a.clear();
|
|
31
36
|
}
|
|
32
37
|
get() {
|
|
33
|
-
var _a, _b;
|
|
38
|
+
var _a, _b, _c;
|
|
34
39
|
if (this.casting) {
|
|
35
|
-
|
|
36
|
-
|
|
40
|
+
if (this.type instanceof hex_1.Hex) {
|
|
41
|
+
// @ts-ignore
|
|
42
|
+
const ret = new string_1.String().set(Buffer.from((_a = this.pointer) === null || _a === void 0 ? void 0 : _a.get(), "utf16le").toString("hex"));
|
|
43
|
+
return ret.get();
|
|
44
|
+
}
|
|
45
|
+
else {
|
|
46
|
+
// @ts-ignore
|
|
47
|
+
const ret = new string_1.String().set(Buffer.from((_b = this.pointer) === null || _b === void 0 ? void 0 : _b.get(), "hex").toString("utf16le"));
|
|
48
|
+
return ret.get();
|
|
49
|
+
}
|
|
37
50
|
}
|
|
38
51
|
else {
|
|
39
52
|
// @ts-ignore
|
|
40
|
-
return (
|
|
53
|
+
return (_c = this.pointer) === null || _c === void 0 ? void 0 : _c.get();
|
|
41
54
|
}
|
|
42
55
|
}
|
|
43
56
|
appendInitial() {
|
package/build/src/types/hex.js
CHANGED