@abaplint/runtime 1.7.14 → 1.7.15
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.
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Hex } from "./hex";
|
|
2
|
+
import { ICharacter } from "./_character";
|
|
3
|
+
import { INumeric } from "./_numeric";
|
|
4
|
+
export declare class DecFloat34 {
|
|
5
|
+
private value;
|
|
6
|
+
constructor();
|
|
7
|
+
set(value: INumeric | ICharacter | Hex | string | number): this;
|
|
8
|
+
clear(): void;
|
|
9
|
+
getRaw(): number;
|
|
10
|
+
get(): string;
|
|
11
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DecFloat34 = void 0;
|
|
4
|
+
const _1 = require(".");
|
|
5
|
+
const hex_1 = require("./hex");
|
|
6
|
+
const xstring_1 = require("./xstring");
|
|
7
|
+
class DecFloat34 {
|
|
8
|
+
constructor() {
|
|
9
|
+
this.value = 0;
|
|
10
|
+
}
|
|
11
|
+
set(value) {
|
|
12
|
+
if (typeof value === "number") {
|
|
13
|
+
this.value = value;
|
|
14
|
+
}
|
|
15
|
+
else if (typeof value === "string" && value.trim().length === 0) {
|
|
16
|
+
this.value = 0;
|
|
17
|
+
}
|
|
18
|
+
else if (typeof value === "string") {
|
|
19
|
+
this.value = parseFloat(value);
|
|
20
|
+
}
|
|
21
|
+
else if (value instanceof _1.Float) {
|
|
22
|
+
this.value = value.getRaw();
|
|
23
|
+
}
|
|
24
|
+
else if (value instanceof hex_1.Hex || value instanceof xstring_1.XString) {
|
|
25
|
+
// todo, how/if should this work?
|
|
26
|
+
this.set(parseInt(value.get(), 16));
|
|
27
|
+
}
|
|
28
|
+
else {
|
|
29
|
+
this.set(value.get());
|
|
30
|
+
}
|
|
31
|
+
return this;
|
|
32
|
+
}
|
|
33
|
+
clear() {
|
|
34
|
+
this.value = 0;
|
|
35
|
+
}
|
|
36
|
+
getRaw() {
|
|
37
|
+
return this.value;
|
|
38
|
+
}
|
|
39
|
+
get() {
|
|
40
|
+
let text = new Number(this.value).toString();
|
|
41
|
+
text = text.replace(".", ",");
|
|
42
|
+
return text;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
exports.DecFloat34 = DecFloat34;
|
|
46
|
+
//# sourceMappingURL=decfloat34.js.map
|
|
@@ -2,11 +2,12 @@ export * from "./abap_object";
|
|
|
2
2
|
export * from "./character";
|
|
3
3
|
export * from "./data_reference";
|
|
4
4
|
export * from "./date";
|
|
5
|
+
export * from "./decfloat34";
|
|
5
6
|
export * from "./field_symbol";
|
|
7
|
+
export * from "./float";
|
|
6
8
|
export * from "./hex";
|
|
7
9
|
export * from "./integer";
|
|
8
10
|
export * from "./numc";
|
|
9
|
-
export * from "./float";
|
|
10
11
|
export * from "./packed";
|
|
11
12
|
export * from "./string";
|
|
12
13
|
export * from "./structure";
|
package/build/src/types/index.js
CHANGED
|
@@ -14,11 +14,12 @@ __exportStar(require("./abap_object"), exports);
|
|
|
14
14
|
__exportStar(require("./character"), exports);
|
|
15
15
|
__exportStar(require("./data_reference"), exports);
|
|
16
16
|
__exportStar(require("./date"), exports);
|
|
17
|
+
__exportStar(require("./decfloat34"), exports);
|
|
17
18
|
__exportStar(require("./field_symbol"), exports);
|
|
19
|
+
__exportStar(require("./float"), exports);
|
|
18
20
|
__exportStar(require("./hex"), exports);
|
|
19
21
|
__exportStar(require("./integer"), exports);
|
|
20
22
|
__exportStar(require("./numc"), exports);
|
|
21
|
-
__exportStar(require("./float"), exports);
|
|
22
23
|
__exportStar(require("./packed"), exports);
|
|
23
24
|
__exportStar(require("./string"), exports);
|
|
24
25
|
__exportStar(require("./structure"), exports);
|
package/package.json
CHANGED
|
@@ -1,42 +1,42 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@abaplint/runtime",
|
|
3
|
-
"version": "1.7.
|
|
4
|
-
"description": "Transpiler - Runtime",
|
|
5
|
-
"main": "build/src/index.js",
|
|
6
|
-
"typings": "build/src/index.d.ts",
|
|
7
|
-
"repository": {
|
|
8
|
-
"type": "git",
|
|
9
|
-
"url": "git+https://github.com/abaplint/transpiler.git"
|
|
10
|
-
},
|
|
11
|
-
"scripts": {
|
|
12
|
-
"compile": "tsc",
|
|
13
|
-
"publish:minor": "npm --no-git-tag-version version minor && rm -rf build && npm install && npm run test && npm publish --access public",
|
|
14
|
-
"publish:patch": "npm --no-git-tag-version version patch && rm -rf build && npm install && npm run test && npm publish --access public",
|
|
15
|
-
"test": "npm run compile && mocha"
|
|
16
|
-
},
|
|
17
|
-
"mocha": {
|
|
18
|
-
"recursive": true,
|
|
19
|
-
"reporter": "progress",
|
|
20
|
-
"spec": "build/test/**/*.js",
|
|
21
|
-
"require": "source-map-support/register"
|
|
22
|
-
},
|
|
23
|
-
"keywords": [
|
|
24
|
-
"ABAP",
|
|
25
|
-
"abaplint"
|
|
26
|
-
],
|
|
27
|
-
"author": "abaplint",
|
|
28
|
-
"license": "MIT",
|
|
29
|
-
"dependencies": {
|
|
30
|
-
"hdb": "^0.19.1",
|
|
31
|
-
"sql.js": "^1.6.2"
|
|
32
|
-
},
|
|
33
|
-
"devDependencies": {
|
|
34
|
-
"@types/chai": "^4.3.0",
|
|
35
|
-
"@types/mocha": "^9.0.0",
|
|
36
|
-
"@types/sql.js": "^1.4.3",
|
|
37
|
-
"chai": "^4.3.4",
|
|
38
|
-
"mocha": "^9.1.3",
|
|
39
|
-
"source-map-support": "^0.5.21",
|
|
40
|
-
"typescript": "^4.5.4"
|
|
41
|
-
}
|
|
42
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@abaplint/runtime",
|
|
3
|
+
"version": "1.7.15",
|
|
4
|
+
"description": "Transpiler - Runtime",
|
|
5
|
+
"main": "build/src/index.js",
|
|
6
|
+
"typings": "build/src/index.d.ts",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "git+https://github.com/abaplint/transpiler.git"
|
|
10
|
+
},
|
|
11
|
+
"scripts": {
|
|
12
|
+
"compile": "tsc",
|
|
13
|
+
"publish:minor": "npm --no-git-tag-version version minor && rm -rf build && npm install && npm run test && npm publish --access public",
|
|
14
|
+
"publish:patch": "npm --no-git-tag-version version patch && rm -rf build && npm install && npm run test && npm publish --access public",
|
|
15
|
+
"test": "npm run compile && mocha"
|
|
16
|
+
},
|
|
17
|
+
"mocha": {
|
|
18
|
+
"recursive": true,
|
|
19
|
+
"reporter": "progress",
|
|
20
|
+
"spec": "build/test/**/*.js",
|
|
21
|
+
"require": "source-map-support/register"
|
|
22
|
+
},
|
|
23
|
+
"keywords": [
|
|
24
|
+
"ABAP",
|
|
25
|
+
"abaplint"
|
|
26
|
+
],
|
|
27
|
+
"author": "abaplint",
|
|
28
|
+
"license": "MIT",
|
|
29
|
+
"dependencies": {
|
|
30
|
+
"hdb": "^0.19.1",
|
|
31
|
+
"sql.js": "^1.6.2"
|
|
32
|
+
},
|
|
33
|
+
"devDependencies": {
|
|
34
|
+
"@types/chai": "^4.3.0",
|
|
35
|
+
"@types/mocha": "^9.0.0",
|
|
36
|
+
"@types/sql.js": "^1.4.3",
|
|
37
|
+
"chai": "^4.3.4",
|
|
38
|
+
"mocha": "^9.1.3",
|
|
39
|
+
"source-map-support": "^0.5.21",
|
|
40
|
+
"typescript": "^4.5.4"
|
|
41
|
+
}
|
|
42
|
+
}
|