@abaplint/runtime 2.3.100 → 2.3.102

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.
@@ -108,8 +108,12 @@ function assign(input) {
108
108
  }
109
109
  }
110
110
  else {
111
+ // console.dir(input);
111
112
  if (input.source instanceof types_1.FieldSymbol) {
112
113
  input.target.assign(input.source.getPointer());
114
+ // } else if (input.source instanceof DataReference) {
115
+ // input.target.assign(input.source.getPointer());
116
+ // console.dir(input.target);
113
117
  }
114
118
  else {
115
119
  if (input.casting) {
@@ -15,10 +15,11 @@ export declare class DataReference {
15
15
  assign(pointer: PointerType): void;
16
16
  unassign(): void;
17
17
  getPointer(): PointerType;
18
+ dereference(): PointerType;
18
19
  clear(): void;
19
20
  get(): any;
20
21
  array(): any;
21
- set(value: any): any;
22
+ set(value: any): void | Float | Structure | ABAPObject | this;
22
23
  getOffset(input: {
23
24
  offset?: number | INumeric | Hex;
24
25
  length?: number | INumeric | Hex;
@@ -21,6 +21,9 @@ class DataReference {
21
21
  getPointer() {
22
22
  return this.pointer;
23
23
  }
24
+ dereference() {
25
+ return this.pointer;
26
+ }
24
27
  ///////////////
25
28
  clear() {
26
29
  this.unassign();
@@ -42,10 +45,20 @@ class DataReference {
42
45
  set(value) {
43
46
  var _a;
44
47
  if (value instanceof DataReference) {
45
- return this.pointer = value.getPointer();
48
+ this.pointer = value.getPointer();
49
+ return this;
46
50
  }
47
- else if (value instanceof field_symbol_1.FieldSymbol && value.getPointer() instanceof DataReference) {
48
- return this.pointer = value.getPointer();
51
+ else if (value instanceof field_symbol_1.FieldSymbol) {
52
+ if (value.getPointer() === undefined) {
53
+ throw "GETWA_NOT_ASSIGNED";
54
+ }
55
+ else if (value.getPointer() instanceof DataReference) {
56
+ this.pointer = value.getPointer();
57
+ return this;
58
+ }
59
+ else {
60
+ throw "OBJECTS_MOVE_NOT_SUPPORTED";
61
+ }
49
62
  }
50
63
  else {
51
64
  return (_a = this.pointer) === null || _a === void 0 ? void 0 : _a.set(value);
@@ -5,7 +5,8 @@ import { Table } from "./table";
5
5
  import { String } from "./string";
6
6
  import { Structure } from "./structure";
7
7
  import { Hex } from "./hex";
8
- declare type PointerType = INumeric | Table | ICharacter | ABAPObject | undefined | Structure;
8
+ import { Float } from "./float";
9
+ declare type PointerType = INumeric | Table | ICharacter | ABAPObject | undefined | Structure | Float;
9
10
  export declare class FieldSymbol {
10
11
  private pointer;
11
12
  private casting;
@@ -17,6 +18,7 @@ export declare class FieldSymbol {
17
18
  unassign(): void;
18
19
  isAssigned(): boolean;
19
20
  getPointer(): any;
21
+ dereference(): INumeric | Float | ICharacter | Structure | Table | ABAPObject | undefined;
20
22
  clear(): void | Structure | undefined;
21
23
  get(): any;
22
24
  appendInitial(): import("./table").TableRowType | undefined;
@@ -6,6 +6,7 @@ const string_1 = require("./string");
6
6
  const hex_1 = require("./hex");
7
7
  const _parse_1 = require("../operators/_parse");
8
8
  const float_1 = require("./float");
9
+ const data_reference_1 = require("./data_reference");
9
10
  class FieldSymbol {
10
11
  constructor(type) {
11
12
  this.pointer = undefined;
@@ -35,6 +36,14 @@ class FieldSymbol {
35
36
  }
36
37
  return this.pointer;
37
38
  }
39
+ dereference() {
40
+ if (this.pointer instanceof data_reference_1.DataReference) {
41
+ return this.pointer.getPointer();
42
+ }
43
+ else {
44
+ return this.pointer;
45
+ }
46
+ }
38
47
  ///////////////
39
48
  clear() {
40
49
  var _a;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/runtime",
3
- "version": "2.3.100",
3
+ "version": "2.3.102",
4
4
  "description": "Transpiler - Runtime",
5
5
  "main": "build/src/index.js",
6
6
  "typings": "build/src/index.d.ts",