@abaplint/runtime 2.0.35 → 2.0.38

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.
package/README.md CHANGED
@@ -1,3 +1,3 @@
1
- # @abaplint/runtime
2
-
1
+ # @abaplint/runtime
2
+
3
3
  Runtime
@@ -11,6 +11,12 @@ function add(left, right) {
11
11
  && Number.isInteger(left) && Number.isInteger(right)) {
12
12
  return new types_1.Integer().set(left + right);
13
13
  }
14
+ else if (typeof left === "number" && Number.isInteger(left) && right instanceof types_1.Integer) {
15
+ return new types_1.Integer().set(left + right.get());
16
+ }
17
+ else if (typeof right === "number" && Number.isInteger(right) && left instanceof types_1.Integer) {
18
+ return new types_1.Integer().set(left.get() + right);
19
+ }
14
20
  return new types_1.Float().set((0, _parse_1.parse)(left) + (0, _parse_1.parse)(right));
15
21
  }
16
22
  exports.add = add;
@@ -11,6 +11,12 @@ function minus(left, right) {
11
11
  && Number.isInteger(left) && Number.isInteger(right)) {
12
12
  return new types_1.Integer().set(left - right);
13
13
  }
14
+ else if (typeof left === "number" && Number.isInteger(left) && right instanceof types_1.Integer) {
15
+ return new types_1.Integer().set(left - right.get());
16
+ }
17
+ else if (typeof right === "number" && Number.isInteger(right) && left instanceof types_1.Integer) {
18
+ return new types_1.Integer().set(left.get() - right);
19
+ }
14
20
  return new types_1.Float().set((0, _parse_1.parse)(left) - (0, _parse_1.parse)(right));
15
21
  }
16
22
  exports.minus = minus;
@@ -11,6 +11,12 @@ function multiply(left, right) {
11
11
  && Number.isInteger(left) && Number.isInteger(right)) {
12
12
  return new types_1.Integer().set(left * right);
13
13
  }
14
+ else if (typeof left === "number" && Number.isInteger(left) && right instanceof types_1.Integer) {
15
+ return new types_1.Integer().set(left * right.get());
16
+ }
17
+ else if (typeof right === "number" && Number.isInteger(right) && left instanceof types_1.Integer) {
18
+ return new types_1.Integer().set(left.get() * right);
19
+ }
14
20
  return new types_1.Float().set((0, _parse_1.parse)(left) * (0, _parse_1.parse)(right));
15
21
  }
16
22
  exports.multiply = multiply;
@@ -105,7 +105,7 @@ class Table {
105
105
  const p = (0, clone_1.clone)(this.rowType);
106
106
  p.set(val);
107
107
  this.value.push(p);
108
- return val;
108
+ return p;
109
109
  }
110
110
  }
111
111
  appendInitial() {
package/package.json CHANGED
@@ -1,38 +1,38 @@
1
- {
2
- "name": "@abaplint/runtime",
3
- "version": "2.0.35",
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:major": "npm --no-git-tag-version version major && rm -rf build && npm install && npm run test && npm publish --access public",
14
- "publish:minor": "npm --no-git-tag-version version minor && rm -rf build && npm install && npm run test && npm publish --access public",
15
- "publish:patch": "npm --no-git-tag-version version patch && rm -rf build && npm install && npm run test && npm publish --access public",
16
- "test": "npm run compile && mocha"
17
- },
18
- "mocha": {
19
- "recursive": true,
20
- "reporter": "progress",
21
- "spec": "build/test/**/*.js",
22
- "require": "source-map-support/register"
23
- },
24
- "keywords": [
25
- "ABAP",
26
- "abaplint"
27
- ],
28
- "author": "abaplint",
29
- "license": "MIT",
30
- "devDependencies": {
31
- "@types/chai": "^4.3.1",
32
- "@types/mocha": "^9.1.1",
33
- "chai": "^4.3.6",
34
- "mocha": "^10.0.0",
35
- "source-map-support": "^0.5.21",
36
- "typescript": "^4.7.3"
37
- }
38
- }
1
+ {
2
+ "name": "@abaplint/runtime",
3
+ "version": "2.0.38",
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:major": "npm --no-git-tag-version version major && rm -rf build && npm install && npm run test && npm publish --access public",
14
+ "publish:minor": "npm --no-git-tag-version version minor && rm -rf build && npm install && npm run test && npm publish --access public",
15
+ "publish:patch": "npm --no-git-tag-version version patch && rm -rf build && npm install && npm run test && npm publish --access public",
16
+ "test": "npm run compile && mocha"
17
+ },
18
+ "mocha": {
19
+ "recursive": true,
20
+ "reporter": "progress",
21
+ "spec": "build/test/**/*.js",
22
+ "require": "source-map-support/register"
23
+ },
24
+ "keywords": [
25
+ "ABAP",
26
+ "abaplint"
27
+ ],
28
+ "author": "abaplint",
29
+ "license": "MIT",
30
+ "devDependencies": {
31
+ "@types/chai": "^4.3.1",
32
+ "@types/mocha": "^9.1.1",
33
+ "chai": "^4.3.6",
34
+ "mocha": "^10.0.0",
35
+ "source-map-support": "^0.5.21",
36
+ "typescript": "^4.7.3"
37
+ }
38
+ }