@abaplint/runtime 2.13.48 → 2.13.49

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,5 @@
1
+ import { ICharacter } from "../types/_character";
2
+ import { INumeric } from "../types/_numeric";
3
+ export declare function acos(input: {
4
+ val: number | string | ICharacter | INumeric;
5
+ }): number;
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.acos = acos;
4
+ const types_1 = require("../types");
5
+ function acos(input) {
6
+ let num_in = undefined;
7
+ if (typeof input.val === "number") {
8
+ num_in = input.val;
9
+ }
10
+ else if (typeof input.val === "string") {
11
+ num_in = parseFloat(input.val);
12
+ }
13
+ else if (input.val instanceof types_1.Float) {
14
+ num_in = input.val.getRaw();
15
+ }
16
+ else {
17
+ num_in = parseFloat(input.val.get().toString());
18
+ }
19
+ return Math.acos(num_in);
20
+ }
21
+ //# sourceMappingURL=acos.js.map
@@ -0,0 +1,5 @@
1
+ import { ICharacter } from "../types/_character";
2
+ import { INumeric } from "../types/_numeric";
3
+ export declare function asin(input: {
4
+ val: number | string | ICharacter | INumeric;
5
+ }): number;
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.asin = asin;
4
+ const types_1 = require("../types");
5
+ function asin(input) {
6
+ let num_in = undefined;
7
+ if (typeof input.val === "number") {
8
+ num_in = input.val;
9
+ }
10
+ else if (typeof input.val === "string") {
11
+ num_in = parseFloat(input.val);
12
+ }
13
+ else if (input.val instanceof types_1.Float) {
14
+ num_in = input.val.getRaw();
15
+ }
16
+ else {
17
+ num_in = parseFloat(input.val.get().toString());
18
+ }
19
+ return Math.asin(num_in);
20
+ }
21
+ //# sourceMappingURL=asin.js.map
@@ -0,0 +1,5 @@
1
+ import { ICharacter } from "../types/_character";
2
+ import { INumeric } from "../types/_numeric";
3
+ export declare function atan(input: {
4
+ val: number | string | ICharacter | INumeric;
5
+ }): number;
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.atan = atan;
4
+ const types_1 = require("../types");
5
+ function atan(input) {
6
+ let num_in = undefined;
7
+ if (typeof input.val === "number") {
8
+ num_in = input.val;
9
+ }
10
+ else if (typeof input.val === "string") {
11
+ num_in = parseFloat(input.val);
12
+ }
13
+ else if (input.val instanceof types_1.Float) {
14
+ num_in = input.val.getRaw();
15
+ }
16
+ else {
17
+ num_in = parseFloat(input.val.get().toString());
18
+ }
19
+ return Math.atan(num_in);
20
+ }
21
+ //# sourceMappingURL=atan.js.map
@@ -0,0 +1,5 @@
1
+ import { ICharacter } from "../types/_character";
2
+ import { INumeric } from "../types/_numeric";
3
+ export declare function cosh(input: {
4
+ val: number | string | ICharacter | INumeric;
5
+ }): number;
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.cosh = cosh;
4
+ const types_1 = require("../types");
5
+ function cosh(input) {
6
+ let num_in = undefined;
7
+ if (typeof input.val === "number") {
8
+ num_in = input.val;
9
+ }
10
+ else if (typeof input.val === "string") {
11
+ num_in = parseFloat(input.val);
12
+ }
13
+ else if (input.val instanceof types_1.Float) {
14
+ num_in = input.val.getRaw();
15
+ }
16
+ else {
17
+ num_in = parseFloat(input.val.get().toString());
18
+ }
19
+ return Math.cosh(num_in);
20
+ }
21
+ //# sourceMappingURL=cosh.js.map
@@ -0,0 +1,5 @@
1
+ import { ICharacter } from "../types/_character";
2
+ import { INumeric } from "../types/_numeric";
3
+ export declare function exp(input: {
4
+ val: number | string | ICharacter | INumeric;
5
+ }): number;
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.exp = exp;
4
+ const types_1 = require("../types");
5
+ function exp(input) {
6
+ let num_in = undefined;
7
+ if (typeof input.val === "number") {
8
+ num_in = input.val;
9
+ }
10
+ else if (typeof input.val === "string") {
11
+ num_in = parseFloat(input.val);
12
+ }
13
+ else if (input.val instanceof types_1.Float) {
14
+ num_in = input.val.getRaw();
15
+ }
16
+ else {
17
+ num_in = parseFloat(input.val.get().toString());
18
+ }
19
+ return Math.exp(num_in);
20
+ }
21
+ //# sourceMappingURL=exp.js.map
@@ -1,14 +1,19 @@
1
1
  import { Character } from "../types";
2
2
  export * from "./abs";
3
+ export * from "./acos";
4
+ export * from "./asin";
5
+ export * from "./atan";
3
6
  export * from "./boolc";
4
7
  export * from "./ceil";
5
8
  export * from "./concat_lines_of";
6
9
  export * from "./condense";
7
10
  export * from "./contains";
8
11
  export * from "./cos";
12
+ export * from "./cosh";
9
13
  export * from "./count_any_of";
10
14
  export * from "./count";
11
15
  export * from "./escape";
16
+ export * from "./exp";
12
17
  export * from "./find";
13
18
  export * from "./floor";
14
19
  export * from "./frac";
@@ -18,6 +23,8 @@ export * from "./ipow";
18
23
  export * from "./line_exists";
19
24
  export * from "./line_index";
20
25
  export * from "./lines";
26
+ export * from "./log";
27
+ export * from "./log10";
21
28
  export * from "./match";
22
29
  export * from "./matches";
23
30
  export * from "./nmax";
@@ -32,6 +39,7 @@ export * from "./shift_left";
32
39
  export * from "./shift_right";
33
40
  export * from "./sign";
34
41
  export * from "./sin";
42
+ export * from "./sinh";
35
43
  export * from "./sqrt";
36
44
  export * from "./strlen";
37
45
  export * from "./substring_after";
@@ -39,6 +47,7 @@ export * from "./substring_before";
39
47
  export * from "./substring";
40
48
  export * from "./sy";
41
49
  export * from "./tan";
50
+ export * from "./tanh";
42
51
  export * from "./to_lower";
43
52
  export * from "./to_mixed";
44
53
  export * from "./to_upper";
@@ -17,15 +17,20 @@ Object.defineProperty(exports, "__esModule", { value: true });
17
17
  exports.$_vertical_tab = exports.$_newline = exports.$_horizontal_tab = exports.$_formfeed = exports.$_cr_lf = exports.$_backspace = exports.space = exports.abap_undefined = exports.abap_false = exports.abap_true = void 0;
18
18
  const types_1 = require("../types");
19
19
  __exportStar(require("./abs"), exports);
20
+ __exportStar(require("./acos"), exports);
21
+ __exportStar(require("./asin"), exports);
22
+ __exportStar(require("./atan"), exports);
20
23
  __exportStar(require("./boolc"), exports);
21
24
  __exportStar(require("./ceil"), exports);
22
25
  __exportStar(require("./concat_lines_of"), exports);
23
26
  __exportStar(require("./condense"), exports);
24
27
  __exportStar(require("./contains"), exports);
25
28
  __exportStar(require("./cos"), exports);
29
+ __exportStar(require("./cosh"), exports);
26
30
  __exportStar(require("./count_any_of"), exports);
27
31
  __exportStar(require("./count"), exports);
28
32
  __exportStar(require("./escape"), exports);
33
+ __exportStar(require("./exp"), exports);
29
34
  __exportStar(require("./find"), exports);
30
35
  __exportStar(require("./floor"), exports);
31
36
  __exportStar(require("./frac"), exports);
@@ -35,6 +40,8 @@ __exportStar(require("./ipow"), exports);
35
40
  __exportStar(require("./line_exists"), exports);
36
41
  __exportStar(require("./line_index"), exports);
37
42
  __exportStar(require("./lines"), exports);
43
+ __exportStar(require("./log"), exports);
44
+ __exportStar(require("./log10"), exports);
38
45
  __exportStar(require("./match"), exports);
39
46
  __exportStar(require("./matches"), exports);
40
47
  __exportStar(require("./nmax"), exports);
@@ -49,6 +56,7 @@ __exportStar(require("./shift_left"), exports);
49
56
  __exportStar(require("./shift_right"), exports);
50
57
  __exportStar(require("./sign"), exports);
51
58
  __exportStar(require("./sin"), exports);
59
+ __exportStar(require("./sinh"), exports);
52
60
  __exportStar(require("./sqrt"), exports);
53
61
  __exportStar(require("./strlen"), exports);
54
62
  __exportStar(require("./substring_after"), exports);
@@ -56,6 +64,7 @@ __exportStar(require("./substring_before"), exports);
56
64
  __exportStar(require("./substring"), exports);
57
65
  __exportStar(require("./sy"), exports);
58
66
  __exportStar(require("./tan"), exports);
67
+ __exportStar(require("./tanh"), exports);
59
68
  __exportStar(require("./to_lower"), exports);
60
69
  __exportStar(require("./to_mixed"), exports);
61
70
  __exportStar(require("./to_upper"), exports);
@@ -76,5 +85,5 @@ exports.$_vertical_tab = new types_1.Character(1).set("\v").setConstant();
76
85
  /*
77
86
  export const $_maxchar = new Character(1).set(Buffer.from("FDFF", "hex").toString()).setConstant();
78
87
  export const $_minchar = new Character(1).set(Buffer.from("0000", "hex").toString()).setConstant();
79
- */
88
+ */
80
89
  //# sourceMappingURL=index.js.map
@@ -0,0 +1,5 @@
1
+ import { ICharacter } from "../types/_character";
2
+ import { INumeric } from "../types/_numeric";
3
+ export declare function log(input: {
4
+ val: number | string | ICharacter | INumeric;
5
+ }): number;
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.log = log;
4
+ const types_1 = require("../types");
5
+ function log(input) {
6
+ let num_in = undefined;
7
+ if (typeof input.val === "number") {
8
+ num_in = input.val;
9
+ }
10
+ else if (typeof input.val === "string") {
11
+ num_in = parseFloat(input.val);
12
+ }
13
+ else if (input.val instanceof types_1.Float) {
14
+ num_in = input.val.getRaw();
15
+ }
16
+ else {
17
+ num_in = parseFloat(input.val.get().toString());
18
+ }
19
+ return Math.log(num_in);
20
+ }
21
+ //# sourceMappingURL=log.js.map
@@ -0,0 +1,5 @@
1
+ import { ICharacter } from "../types/_character";
2
+ import { INumeric } from "../types/_numeric";
3
+ export declare function log10(input: {
4
+ val: number | string | ICharacter | INumeric;
5
+ }): number;
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.log10 = log10;
4
+ const types_1 = require("../types");
5
+ function log10(input) {
6
+ let num_in = undefined;
7
+ if (typeof input.val === "number") {
8
+ num_in = input.val;
9
+ }
10
+ else if (typeof input.val === "string") {
11
+ num_in = parseFloat(input.val);
12
+ }
13
+ else if (input.val instanceof types_1.Float) {
14
+ num_in = input.val.getRaw();
15
+ }
16
+ else {
17
+ num_in = parseFloat(input.val.get().toString());
18
+ }
19
+ return Math.log10(num_in);
20
+ }
21
+ //# sourceMappingURL=log10.js.map
@@ -0,0 +1,5 @@
1
+ import { ICharacter } from "../types/_character";
2
+ import { INumeric } from "../types/_numeric";
3
+ export declare function sinh(input: {
4
+ val: number | string | ICharacter | INumeric;
5
+ }): number;
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.sinh = sinh;
4
+ const types_1 = require("../types");
5
+ function sinh(input) {
6
+ let num_in = undefined;
7
+ if (typeof input.val === "number") {
8
+ num_in = input.val;
9
+ }
10
+ else if (typeof input.val === "string") {
11
+ num_in = parseFloat(input.val);
12
+ }
13
+ else if (input.val instanceof types_1.Float) {
14
+ num_in = input.val.getRaw();
15
+ }
16
+ else {
17
+ num_in = parseFloat(input.val.get().toString());
18
+ }
19
+ return Math.sinh(num_in);
20
+ }
21
+ //# sourceMappingURL=sinh.js.map
@@ -0,0 +1,5 @@
1
+ import { ICharacter } from "../types/_character";
2
+ import { INumeric } from "../types/_numeric";
3
+ export declare function tanh(input: {
4
+ val: number | string | ICharacter | INumeric;
5
+ }): number;
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.tanh = tanh;
4
+ const types_1 = require("../types");
5
+ function tanh(input) {
6
+ let num_in = undefined;
7
+ if (typeof input.val === "number") {
8
+ num_in = input.val;
9
+ }
10
+ else if (typeof input.val === "string") {
11
+ num_in = parseFloat(input.val);
12
+ }
13
+ else if (input.val instanceof types_1.Float) {
14
+ num_in = input.val.getRaw();
15
+ }
16
+ else {
17
+ num_in = parseFloat(input.val.get().toString());
18
+ }
19
+ return Math.tanh(num_in);
20
+ }
21
+ //# sourceMappingURL=tanh.js.map
@@ -1,4 +1,4 @@
1
- import { ABAPObject, FieldSymbol, Float, HashedTable, String, Hex, Structure, Table, Integer8 } from "../types";
1
+ import { ABAPObject, DecFloat34, FieldSymbol, Float, HashedTable, String, Hex, Structure, Table, Integer8 } from "../types";
2
2
  import { ICharacter } from "../types/_character";
3
3
  import { INumeric } from "../types/_numeric";
4
- export declare function eq(left: number | string | ICharacter | Integer8 | INumeric | Float | String | ABAPObject | Structure | Hex | HashedTable | Table | FieldSymbol, right: number | string | ICharacter | Integer8 | INumeric | Float | String | ABAPObject | Structure | Hex | HashedTable | Table | FieldSymbol): boolean;
4
+ export declare function eq(left: number | string | ICharacter | Integer8 | INumeric | Float | DecFloat34 | String | ABAPObject | Structure | Hex | HashedTable | Table | FieldSymbol, right: number | string | ICharacter | Integer8 | INumeric | Float | DecFloat34 | String | ABAPObject | Structure | Hex | HashedTable | Table | FieldSymbol): boolean;
@@ -45,6 +45,7 @@ const DateC = types_1.Date;
45
45
  const TimeC = types_1.Time;
46
46
  const PackedC = types_1.Packed;
47
47
  const FloatC = types_1.Float;
48
+ const DecFloat34C = types_1.DecFloat34;
48
49
  const TableC = types_1.Table;
49
50
  const HashedTableC = types_1.HashedTable;
50
51
  const StructureC = types_1.Structure;
@@ -92,6 +93,9 @@ function eq(left, right) {
92
93
  else if (leftConstructor === FloatC) {
93
94
  return left.getRaw() === right.getRaw();
94
95
  }
96
+ else if (leftConstructor === DecFloat34C) {
97
+ return left.getRaw() === right.getRaw();
98
+ }
95
99
  else if (leftConstructor === TableC || leftConstructor === HashedTableC) {
96
100
  return compareTables(left, right);
97
101
  }
@@ -252,6 +256,9 @@ function eq(left, right) {
252
256
  else if (left instanceof types_1.Integer) {
253
257
  return right.get() === left.get();
254
258
  }
259
+ else if (left instanceof types_1.DecFloat34) {
260
+ return right.get() === left.getRaw();
261
+ }
255
262
  }
256
263
  else if (right instanceof types_1.Integer8) {
257
264
  if (left instanceof types_1.Integer
@@ -272,6 +279,14 @@ function eq(left, right) {
272
279
  return right.getRaw() === left.get();
273
280
  }
274
281
  }
282
+ else if (right instanceof types_1.DecFloat34) {
283
+ if (left instanceof types_1.Float || left instanceof types_1.DecFloat34) {
284
+ return right.getRaw() === left.getRaw();
285
+ }
286
+ else if (left instanceof types_1.Integer || left instanceof types_1.Packed) {
287
+ return right.getRaw() === left.get();
288
+ }
289
+ }
275
290
  if (left instanceof types_1.Structure || right instanceof types_1.Structure) {
276
291
  if (!(right instanceof types_1.Structure)) {
277
292
  return eq(left.getCharacter(), right);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/runtime",
3
- "version": "2.13.48",
3
+ "version": "2.13.49",
4
4
  "description": "Transpiler - Runtime",
5
5
  "main": "build/src/index.js",
6
6
  "typings": "build/src/index.d.ts",