@abaplint/runtime 2.3.41 → 2.3.43
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.d.ts +2 -1
- package/build/src/compare/cp.js +10 -0
- package/package.json +1 -1
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Structure } from "../types";
|
|
1
2
|
import { ICharacter } from "../types/_character";
|
|
2
3
|
import { INumeric } from "../types/_numeric";
|
|
3
|
-
export declare function cp(left: number | string | ICharacter | INumeric, right: string | ICharacter): boolean;
|
|
4
|
+
export declare function cp(left: number | string | ICharacter | INumeric | Structure, right: string | ICharacter): boolean;
|
package/build/src/compare/cp.js
CHANGED
|
@@ -1,11 +1,21 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.cp = void 0;
|
|
4
|
+
const types_1 = require("../types");
|
|
4
5
|
function cp(left, right) {
|
|
5
6
|
let l = "";
|
|
6
7
|
if (typeof left === "number" || typeof left === "string") {
|
|
7
8
|
l = left.toString();
|
|
8
9
|
}
|
|
10
|
+
else if (left instanceof types_1.Structure) {
|
|
11
|
+
l = left.getCharacter();
|
|
12
|
+
}
|
|
13
|
+
else if (left instanceof types_1.FieldSymbol) {
|
|
14
|
+
if (left.getPointer() === undefined) {
|
|
15
|
+
throw "GETWA_NOT_ASSIGNED";
|
|
16
|
+
}
|
|
17
|
+
return cp(left.getPointer(), right);
|
|
18
|
+
}
|
|
9
19
|
else {
|
|
10
20
|
l = left.get().toString();
|
|
11
21
|
}
|