@abaplint/runtime 2.4.20 → 2.4.22
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/build/src/compare/cp.js +1 -1
- package/build/src/compare/gt.js +2 -2
- package/build/src/statements/assign.js +14 -6
- package/build/src/statements/cast.js +1 -1
- package/build/src/statements/loop.js +1 -1
- package/build/src/statements/sort.js +1 -1
- package/build/src/template_formatting.js +2 -2
- package/build/src/types/character.js +1 -1
- package/build/src/types/data_reference.js +2 -2
- package/package.json +1 -1
package/build/src/compare/cp.js
CHANGED
package/build/src/compare/gt.js
CHANGED
|
@@ -6,13 +6,13 @@ const integer_1 = require("../types/integer");
|
|
|
6
6
|
function gt(left, right) {
|
|
7
7
|
if (left instanceof types_1.FieldSymbol) {
|
|
8
8
|
if (left.getPointer() === undefined) {
|
|
9
|
-
throw "GETWA_NOT_ASSIGNED";
|
|
9
|
+
throw new Error("GETWA_NOT_ASSIGNED");
|
|
10
10
|
}
|
|
11
11
|
return gt(left.getPointer(), right);
|
|
12
12
|
}
|
|
13
13
|
else if (right instanceof types_1.FieldSymbol) {
|
|
14
14
|
if (right.getPointer() === undefined) {
|
|
15
|
-
throw "GETWA_NOT_ASSIGNED";
|
|
15
|
+
throw new Error("GETWA_NOT_ASSIGNED");
|
|
16
16
|
}
|
|
17
17
|
return gt(left, right.getPointer());
|
|
18
18
|
}
|
|
@@ -4,6 +4,7 @@ exports.assign = void 0;
|
|
|
4
4
|
const types_1 = require("../types");
|
|
5
5
|
function assign(input) {
|
|
6
6
|
var _a;
|
|
7
|
+
// console.dir(input);
|
|
7
8
|
if (input.dynamicName) {
|
|
8
9
|
if (input.dynamicSource instanceof types_1.FieldSymbol) {
|
|
9
10
|
input.dynamicSource = input.dynamicSource.getPointer();
|
|
@@ -110,19 +111,26 @@ function assign(input) {
|
|
|
110
111
|
else {
|
|
111
112
|
// console.dir(input);
|
|
112
113
|
if (input.source instanceof types_1.FieldSymbol) {
|
|
113
|
-
input.
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
114
|
+
const pnt = input.source.getPointer();
|
|
115
|
+
if (pnt === undefined) {
|
|
116
|
+
throw new Error("GETWA_NOT_ASSIGNED");
|
|
117
|
+
}
|
|
118
|
+
input.target.assign(pnt);
|
|
119
|
+
// @ts-ignore
|
|
120
|
+
abap.builtin.sy.get().subrc.set(0);
|
|
121
|
+
}
|
|
122
|
+
else if (input.source === undefined) {
|
|
123
|
+
// @ts-ignore
|
|
124
|
+
abap.builtin.sy.get().subrc.set(4);
|
|
117
125
|
}
|
|
118
126
|
else {
|
|
119
127
|
if (input.casting) {
|
|
120
128
|
input.target.setCasting();
|
|
121
129
|
}
|
|
122
130
|
input.target.assign(input.source);
|
|
131
|
+
// @ts-ignore
|
|
132
|
+
abap.builtin.sy.get().subrc.set(0);
|
|
123
133
|
}
|
|
124
|
-
// @ts-ignore
|
|
125
|
-
abap.builtin.sy.get().subrc.set(0);
|
|
126
134
|
}
|
|
127
135
|
}
|
|
128
136
|
exports.assign = assign;
|
|
@@ -17,7 +17,7 @@ async function cast(target, source) {
|
|
|
17
17
|
// eslint-disable-next-line prefer-const
|
|
18
18
|
let checkIntf = true;
|
|
19
19
|
if (target instanceof types_1.FieldSymbol && target.getPointer() === undefined) {
|
|
20
|
-
throw "GETWA_NOT_ASSIGNED";
|
|
20
|
+
throw new Error("GETWA_NOT_ASSIGNED");
|
|
21
21
|
}
|
|
22
22
|
let targetName = undefined;
|
|
23
23
|
if (target.getQualifiedName) {
|
|
@@ -55,7 +55,7 @@ function loop(table, options) {
|
|
|
55
55
|
else if (table instanceof types_1.FieldSymbol) {
|
|
56
56
|
const pnt = table.getPointer();
|
|
57
57
|
if (pnt === undefined) {
|
|
58
|
-
throw "GETWA_NOT_ASSIGNED";
|
|
58
|
+
throw new Error("GETWA_NOT_ASSIGNED");
|
|
59
59
|
}
|
|
60
60
|
yield __await(yield* __asyncDelegator(__asyncValues(loop(pnt, options))));
|
|
61
61
|
return yield __await(void 0);
|
|
@@ -5,10 +5,10 @@ const types_1 = require("./types");
|
|
|
5
5
|
function templateFormatting(source, options) {
|
|
6
6
|
let text = "";
|
|
7
7
|
if (source instanceof types_1.FieldSymbol && source.getPointer() === undefined) {
|
|
8
|
-
throw "GETWA_NOT_ASSIGNED";
|
|
8
|
+
throw new Error("GETWA_NOT_ASSIGNED");
|
|
9
9
|
}
|
|
10
10
|
else if (source instanceof types_1.Table) {
|
|
11
|
-
throw "STRG_ILLEGAL_DATA_TYPE";
|
|
11
|
+
throw new Error("STRG_ILLEGAL_DATA_TYPE");
|
|
12
12
|
}
|
|
13
13
|
else if (source instanceof types_1.Character) {
|
|
14
14
|
text = source.getTrimEnd();
|
|
@@ -50,14 +50,14 @@ class DataReference {
|
|
|
50
50
|
}
|
|
51
51
|
else if (value instanceof field_symbol_1.FieldSymbol) {
|
|
52
52
|
if (value.getPointer() === undefined) {
|
|
53
|
-
throw "GETWA_NOT_ASSIGNED";
|
|
53
|
+
throw new Error("GETWA_NOT_ASSIGNED");
|
|
54
54
|
}
|
|
55
55
|
else if (value.getPointer() instanceof DataReference) {
|
|
56
56
|
this.pointer = value.getPointer();
|
|
57
57
|
return this;
|
|
58
58
|
}
|
|
59
59
|
else {
|
|
60
|
-
throw "OBJECTS_MOVE_NOT_SUPPORTED";
|
|
60
|
+
throw new Error("OBJECTS_MOVE_NOT_SUPPORTED");
|
|
61
61
|
}
|
|
62
62
|
}
|
|
63
63
|
else {
|