@abaplint/runtime 2.0.63 → 2.0.64
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 +2 -2
- package/build/src/statements/assign.d.ts +3 -1
- package/build/src/statements/assign.js +20 -2
- package/package.json +38 -38
package/README.md
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
# @abaplint/runtime
|
|
2
|
-
|
|
1
|
+
# @abaplint/runtime
|
|
2
|
+
|
|
3
3
|
Runtime
|
|
@@ -2,8 +2,10 @@ import { DataReference, FieldSymbol, Structure } from "../types";
|
|
|
2
2
|
import { ICharacter } from "../types/_character";
|
|
3
3
|
import { INumeric } from "../types/_numeric";
|
|
4
4
|
export interface IAssignInput {
|
|
5
|
-
source
|
|
5
|
+
source?: INumeric | ICharacter | Structure | DataReference;
|
|
6
6
|
target: FieldSymbol;
|
|
7
|
+
dynamicText?: string;
|
|
8
|
+
dynamicSource?: ICharacter;
|
|
7
9
|
casting?: boolean;
|
|
8
10
|
component?: string | ICharacter;
|
|
9
11
|
}
|
|
@@ -3,14 +3,32 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.assign = void 0;
|
|
4
4
|
const types_1 = require("../types");
|
|
5
5
|
function assign(input) {
|
|
6
|
-
if (input.
|
|
6
|
+
if (input.dynamicText) {
|
|
7
|
+
if (input.dynamicText.includes("->") && input.dynamicSource instanceof types_1.ABAPObject) {
|
|
8
|
+
const split = input.dynamicText.split("->");
|
|
9
|
+
// @ts-ignore
|
|
10
|
+
input.dynamicSource = input.dynamicSource.get()[split[1].toLowerCase()];
|
|
11
|
+
}
|
|
12
|
+
if (input.dynamicSource) {
|
|
13
|
+
input.target.assign(input.dynamicSource);
|
|
14
|
+
// @ts-ignore
|
|
15
|
+
abap.builtin.sy.get().subrc.set(0);
|
|
16
|
+
}
|
|
17
|
+
else {
|
|
18
|
+
// @ts-ignore
|
|
19
|
+
abap.builtin.sy.get().subrc.set(4);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
else if (input.component) {
|
|
7
23
|
if (input.source instanceof types_1.FieldSymbol || input.source instanceof types_1.DataReference) {
|
|
8
24
|
input.source = input.source.getPointer();
|
|
9
25
|
assign(input);
|
|
10
26
|
return;
|
|
11
27
|
}
|
|
12
28
|
else if (!(input.source instanceof types_1.Structure)) {
|
|
13
|
-
|
|
29
|
+
// @ts-ignore
|
|
30
|
+
abap.builtin.sy.get().subrc.set(4);
|
|
31
|
+
return;
|
|
14
32
|
}
|
|
15
33
|
let component = input.component;
|
|
16
34
|
if (typeof component !== "string") {
|
package/package.json
CHANGED
|
@@ -1,38 +1,38 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@abaplint/runtime",
|
|
3
|
-
"version": "2.0.
|
|
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.4"
|
|
37
|
-
}
|
|
38
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@abaplint/runtime",
|
|
3
|
+
"version": "2.0.64",
|
|
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.4"
|
|
37
|
+
}
|
|
38
|
+
}
|