@abaplint/runtime 2.5.35 → 2.5.37
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.
|
@@ -58,8 +58,8 @@ __exportStar(require("./to_upper"), exports);
|
|
|
58
58
|
__exportStar(require("./translate"), exports);
|
|
59
59
|
__exportStar(require("./trunc"), exports);
|
|
60
60
|
__exportStar(require("./xstrlen"), exports);
|
|
61
|
-
exports.abap_true = new types_1.Character(1, { qualifiedName: "ABAP_BOOL", ddicName: "ABAP_BOOL" }).set("X");
|
|
62
|
-
exports.abap_false = new types_1.Character(1, { qualifiedName: "ABAP_BOOL", ddicName: "ABAP_BOOL" }).set("");
|
|
63
|
-
exports.abap_undefined = new types_1.Character(1, { qualifiedName: "ABAP_BOOL", ddicName: "ABAP_BOOL" }).set("-");
|
|
64
|
-
exports.space = new types_1.Character(1, { qualifiedName: "ABAP_BOOL", ddicName: "ABAP_BOOL" }).set(" ");
|
|
61
|
+
exports.abap_true = new types_1.Character(1, { qualifiedName: "ABAP_BOOL", ddicName: "ABAP_BOOL" }).set("X").setConstant();
|
|
62
|
+
exports.abap_false = new types_1.Character(1, { qualifiedName: "ABAP_BOOL", ddicName: "ABAP_BOOL" }).set("").setConstant();
|
|
63
|
+
exports.abap_undefined = new types_1.Character(1, { qualifiedName: "ABAP_BOOL", ddicName: "ABAP_BOOL" }).set("-").setConstant();
|
|
64
|
+
exports.space = new types_1.Character(1, { qualifiedName: "ABAP_BOOL", ddicName: "ABAP_BOOL" }).set(" ").setConstant();
|
|
65
65
|
//# sourceMappingURL=index.js.map
|
|
@@ -12,5 +12,5 @@ export interface ICreateDataOptions {
|
|
|
12
12
|
likeLineOf?: FieldSymbol | Table;
|
|
13
13
|
like?: any;
|
|
14
14
|
}
|
|
15
|
-
export declare function createData(target: DataReference, options?: ICreateDataOptions): void;
|
|
15
|
+
export declare function createData(target: DataReference | FieldSymbol, options?: ICreateDataOptions): void;
|
|
16
16
|
export {};
|
|
@@ -6,6 +6,13 @@ const throw_error_1 = require("../throw_error");
|
|
|
6
6
|
const types_1 = require("../types");
|
|
7
7
|
function createData(target, options) {
|
|
8
8
|
// console.dir(options);
|
|
9
|
+
if (target instanceof types_1.FieldSymbol) {
|
|
10
|
+
createData(target.getPointer(), options);
|
|
11
|
+
return;
|
|
12
|
+
}
|
|
13
|
+
else if (!(target instanceof types_1.DataReference)) {
|
|
14
|
+
throw new Error("CREATE_DATA_REFERENCE_EXPECTED");
|
|
15
|
+
}
|
|
9
16
|
if ((options === null || options === void 0 ? void 0 : options.name) && (options === null || options === void 0 ? void 0 : options.table)) {
|
|
10
17
|
// @ts-ignore
|
|
11
18
|
if (abap.DDIC[options.name] === undefined) {
|
|
@@ -6,9 +6,11 @@ import { ICharacter } from "./_character";
|
|
|
6
6
|
import { INumeric } from "./_numeric";
|
|
7
7
|
export declare class Character implements ICharacter {
|
|
8
8
|
private value;
|
|
9
|
+
private constant;
|
|
9
10
|
private readonly length;
|
|
10
11
|
private readonly extra;
|
|
11
12
|
constructor(length?: number, extra?: AbstractTypeData);
|
|
13
|
+
setConstant(): this;
|
|
12
14
|
set(value: ICharacter | string | Structure | FieldSymbol): this;
|
|
13
15
|
getQualifiedName(): string | undefined;
|
|
14
16
|
getConversionExit(): string | undefined;
|
|
@@ -9,6 +9,7 @@ const structure_1 = require("./structure");
|
|
|
9
9
|
let featureFixLength = true;
|
|
10
10
|
class Character {
|
|
11
11
|
constructor(length, extra) {
|
|
12
|
+
this.constant = false;
|
|
12
13
|
this.length = length || 1;
|
|
13
14
|
if (typeof this.length === "object") {
|
|
14
15
|
throw "Character, invalid length, object: " + JSON.stringify(this.length);
|
|
@@ -19,7 +20,14 @@ class Character {
|
|
|
19
20
|
this.extra = extra;
|
|
20
21
|
this.clear();
|
|
21
22
|
}
|
|
23
|
+
setConstant() {
|
|
24
|
+
this.constant = true;
|
|
25
|
+
return this;
|
|
26
|
+
}
|
|
22
27
|
set(value) {
|
|
28
|
+
if (this.constant === true) {
|
|
29
|
+
throw new Error("Changing constant");
|
|
30
|
+
}
|
|
23
31
|
if (typeof value === "string" || typeof value === "number") {
|
|
24
32
|
this.value = value;
|
|
25
33
|
}
|