@abaplint/runtime 2.1.6 → 2.1.9

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.
@@ -22,6 +22,9 @@ function initial(val) {
22
22
  else if (val instanceof types_1.Time) {
23
23
  return val.get() === "000000";
24
24
  }
25
+ else if (val instanceof types_1.Character) {
26
+ return val.get().match(/^ *$/) !== null;
27
+ }
25
28
  if (typeof val === "string") {
26
29
  return val === "";
27
30
  }
@@ -23,7 +23,7 @@ function replace(text, w) {
23
23
  }
24
24
  return text.trim();
25
25
  }
26
- async function findText(context, arbgb, msgnr) {
26
+ async function findText(context, arbgb, msgnr, msgty) {
27
27
  let text = undefined;
28
28
  if (arbgb && msgnr) {
29
29
  try {
@@ -40,7 +40,7 @@ async function findText(context, arbgb, msgnr) {
40
40
  }
41
41
  if (text === undefined) {
42
42
  // fallback
43
- text = arbgb + ":" + msgnr + " &1 &2 &3 &4";
43
+ text = msgty + ":" + arbgb + ":" + msgnr + " &1 &2 &3 &4";
44
44
  }
45
45
  return text;
46
46
  }
@@ -69,7 +69,7 @@ class MessageStatement {
69
69
  abap.builtin.sy.get().msgno.set(msgnr);
70
70
  // @ts-ignore
71
71
  abap.builtin.sy.get().msgty.set(msgty);
72
- const text = await findText(this.context, arbgb, msgnr);
72
+ const text = await findText(this.context, arbgb, msgnr, msgty);
73
73
  const replaced = replace(text, options.with);
74
74
  if (options.into) {
75
75
  options.into.set(replaced);
@@ -3,10 +3,13 @@ export declare class Packed implements INumeric {
3
3
  private value;
4
4
  private readonly length;
5
5
  private readonly decimals;
6
+ private readonly qualifiedName;
6
7
  constructor(input?: {
7
8
  length?: number;
8
9
  decimals?: number;
10
+ qualifiedName?: string;
9
11
  });
12
+ getQualifiedName(): string | undefined;
10
13
  set(value: INumeric | number | string): void;
11
14
  getLength(): number;
12
15
  getDecimals(): number;
@@ -13,6 +13,10 @@ class Packed {
13
13
  if (input === null || input === void 0 ? void 0 : input.decimals) {
14
14
  this.decimals = input.decimals;
15
15
  }
16
+ this.qualifiedName = input === null || input === void 0 ? void 0 : input.qualifiedName;
17
+ }
18
+ getQualifiedName() {
19
+ return this.qualifiedName;
16
20
  }
17
21
  set(value) {
18
22
  if (typeof value === "number") {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/runtime",
3
- "version": "2.1.6",
3
+ "version": "2.1.9",
4
4
  "description": "Transpiler - Runtime",
5
5
  "main": "build/src/index.js",
6
6
  "typings": "build/src/index.d.ts",