@abaplint/runtime 2.3.45 → 2.3.46

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.
@@ -1,4 +1,6 @@
1
+ import { FieldSymbol } from "./field_symbol";
1
2
  import { Hex } from "./hex";
3
+ import { Structure } from "./structure";
2
4
  import { ICharacter } from "./_character";
3
5
  import { INumeric } from "./_numeric";
4
6
  export declare class Character implements ICharacter {
@@ -9,7 +11,7 @@ export declare class Character implements ICharacter {
9
11
  length?: number;
10
12
  qualifiedName?: string;
11
13
  });
12
- set(value: ICharacter | string): this;
14
+ set(value: ICharacter | string | Structure | FieldSymbol): this;
13
15
  getQualifiedName(): string | undefined;
14
16
  getLength(): number;
15
17
  clear(): void;
@@ -3,6 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Character = void 0;
4
4
  const _parse_1 = require("../operators/_parse");
5
5
  const throw_error_1 = require("../throw_error");
6
+ const field_symbol_1 = require("./field_symbol");
7
+ const structure_1 = require("./structure");
6
8
  // eslint-disable-next-line prefer-const
7
9
  let featureFixLength = true;
8
10
  class Character {
@@ -18,6 +20,17 @@ class Character {
18
20
  if (typeof value === "string" || typeof value === "number") {
19
21
  this.value = value;
20
22
  }
23
+ else if (value instanceof field_symbol_1.FieldSymbol) {
24
+ if (value.getPointer() === undefined) {
25
+ throw "GETWA_NOT_ASSIGNED";
26
+ }
27
+ this.set(value.getPointer());
28
+ return this;
29
+ }
30
+ else if (value instanceof structure_1.Structure) {
31
+ this.set(value.getCharacter());
32
+ return this;
33
+ }
21
34
  else {
22
35
  this.value = value.get() + "";
23
36
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/runtime",
3
- "version": "2.3.45",
3
+ "version": "2.3.46",
4
4
  "description": "Transpiler - Runtime",
5
5
  "main": "build/src/index.js",
6
6
  "typings": "build/src/index.d.ts",