@abaplint/runtime 2.1.77 → 2.1.79
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.
|
@@ -4,7 +4,13 @@ exports.templateFormatting = void 0;
|
|
|
4
4
|
const types_1 = require("./types");
|
|
5
5
|
function templateFormatting(source, options) {
|
|
6
6
|
let text = "";
|
|
7
|
-
if (source instanceof types_1.
|
|
7
|
+
if (source instanceof types_1.FieldSymbol && source.getPointer() === undefined) {
|
|
8
|
+
throw "GETWA_NOT_ASSIGNED";
|
|
9
|
+
}
|
|
10
|
+
else if (source instanceof types_1.Table) {
|
|
11
|
+
throw "STRG_ILLEGAL_DATA_TYPE";
|
|
12
|
+
}
|
|
13
|
+
else if (source instanceof types_1.Character) {
|
|
8
14
|
text = source.getTrimEnd();
|
|
9
15
|
}
|
|
10
16
|
else {
|
|
@@ -5,6 +5,7 @@ const table_1 = require("./table");
|
|
|
5
5
|
const string_1 = require("./string");
|
|
6
6
|
const hex_1 = require("./hex");
|
|
7
7
|
const _parse_1 = require("../operators/_parse");
|
|
8
|
+
const float_1 = require("./float");
|
|
8
9
|
class FieldSymbol {
|
|
9
10
|
constructor(type) {
|
|
10
11
|
this.pointer = undefined;
|
|
@@ -39,9 +40,17 @@ class FieldSymbol {
|
|
|
39
40
|
var _a, _b, _c;
|
|
40
41
|
if (this.casting) {
|
|
41
42
|
if (this.type instanceof hex_1.Hex) {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
43
|
+
const pt = this.pointer;
|
|
44
|
+
if (pt instanceof float_1.Float) {
|
|
45
|
+
const buf = Buffer.allocUnsafe(8);
|
|
46
|
+
buf.writeDoubleLE(pt.getRaw());
|
|
47
|
+
return buf.toString("hex").toUpperCase();
|
|
48
|
+
}
|
|
49
|
+
else {
|
|
50
|
+
// @ts-ignore
|
|
51
|
+
const ret = new string_1.String().set(Buffer.from((_a = this.pointer) === null || _a === void 0 ? void 0 : _a.get(), "utf16le").toString("hex"));
|
|
52
|
+
return ret.get();
|
|
53
|
+
}
|
|
45
54
|
}
|
|
46
55
|
else {
|
|
47
56
|
// @ts-ignore
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abaplint/runtime",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.79",
|
|
4
4
|
"description": "Transpiler - Runtime",
|
|
5
5
|
"main": "build/src/index.js",
|
|
6
6
|
"typings": "build/src/index.d.ts",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"chai": "^4.3.6",
|
|
34
34
|
"mocha": "^10.0.0",
|
|
35
35
|
"source-map-support": "^0.5.21",
|
|
36
|
-
"typescript": "^4.8.
|
|
36
|
+
"typescript": "^4.8.4"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"temporal-polyfill": "^0.0.8"
|