@abaplint/runtime 2.7.37 → 2.7.39

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.
@@ -1,6 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ceil = void 0;
4
+ /* eslint-disable radix */
5
+ const types_1 = require("../types");
4
6
  function ceil(input) {
5
7
  let num_in = undefined;
6
8
  if (typeof input.val === "number") {
@@ -9,6 +11,9 @@ function ceil(input) {
9
11
  else if (typeof input.val === "string") {
10
12
  num_in = parseFloat(input.val);
11
13
  }
14
+ else if (input.val instanceof types_1.Float) {
15
+ num_in = input.val.getRaw();
16
+ }
12
17
  else {
13
18
  num_in = parseFloat(input.val.get().toString());
14
19
  }
@@ -1,6 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.floor = void 0;
4
+ /* eslint-disable radix */
5
+ const types_1 = require("../types");
4
6
  function floor(input) {
5
7
  let num_in = undefined;
6
8
  if (typeof input.val === "number") {
@@ -9,6 +11,9 @@ function floor(input) {
9
11
  else if (typeof input.val === "string") {
10
12
  num_in = parseFloat(input.val);
11
13
  }
14
+ else if (input.val instanceof types_1.Float) {
15
+ num_in = input.val.getRaw();
16
+ }
12
17
  else {
13
18
  num_in = parseFloat(input.val.get().toString());
14
19
  }
@@ -2,7 +2,6 @@ import { INumeric } from "./_numeric";
2
2
  import { ICharacter } from "./_character";
3
3
  import { ABAPObject } from "./abap_object";
4
4
  import { Table } from "./table";
5
- import { String } from "./string";
6
5
  import { Structure } from "./structure";
7
6
  import { Hex } from "./hex";
8
7
  import { Float } from "./float";
@@ -28,6 +27,6 @@ export declare class FieldSymbol {
28
27
  getOffset(input: {
29
28
  offset?: number | INumeric | Hex;
30
29
  length?: number | INumeric | Hex;
31
- }): String;
30
+ }): any;
32
31
  }
33
32
  export {};
@@ -4,7 +4,6 @@ exports.FieldSymbol = void 0;
4
4
  const table_1 = require("./table");
5
5
  const string_1 = require("./string");
6
6
  const hex_1 = require("./hex");
7
- const _parse_1 = require("../operators/_parse");
8
7
  const float_1 = require("./float");
9
8
  const data_reference_1 = require("./data_reference");
10
9
  class FieldSymbol {
@@ -98,23 +97,7 @@ class FieldSymbol {
98
97
  return this;
99
98
  }
100
99
  getOffset(input) {
101
- if (input === null || input === void 0 ? void 0 : input.offset) {
102
- input.offset = (0, _parse_1.parse)(input.offset);
103
- }
104
- if (input === null || input === void 0 ? void 0 : input.length) {
105
- input.length = (0, _parse_1.parse)(input.length);
106
- }
107
- // Assuming we're interested in Strings here, for now...
108
- let ret = this.get();
109
- if (input === null || input === void 0 ? void 0 : input.offset) {
110
- ret = ret.substr(input.offset);
111
- }
112
- if ((input === null || input === void 0 ? void 0 : input.length) !== undefined) {
113
- ret = ret.substr(0, input.length);
114
- }
115
- const r = new string_1.String();
116
- r.set(ret);
117
- return r;
100
+ return this.getPointer().getOffset(input);
118
101
  }
119
102
  }
120
103
  exports.FieldSymbol = FieldSymbol;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/runtime",
3
- "version": "2.7.37",
3
+ "version": "2.7.39",
4
4
  "description": "Transpiler - Runtime",
5
5
  "main": "build/src/index.js",
6
6
  "typings": "build/src/index.d.ts",