@abaplint/runtime 2.1.7 → 2.1.10

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/README.md CHANGED
@@ -1,3 +1,3 @@
1
- # @abaplint/runtime
2
-
1
+ # @abaplint/runtime
2
+
3
3
  Runtime
@@ -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);
@@ -27,7 +27,7 @@ function shift_character_mode(target, options) {
27
27
  if (typeof trailing !== "string") {
28
28
  trailing = trailing.get();
29
29
  }
30
- if (value.endsWith(trailing)) {
30
+ while (value.endsWith(trailing)) {
31
31
  value = " ".repeat(trailing.length) + value.substring(0, value.length - trailing.length);
32
32
  }
33
33
  }
@@ -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,38 +1,38 @@
1
- {
2
- "name": "@abaplint/runtime",
3
- "version": "2.1.7",
4
- "description": "Transpiler - Runtime",
5
- "main": "build/src/index.js",
6
- "typings": "build/src/index.d.ts",
7
- "repository": {
8
- "type": "git",
9
- "url": "git+https://github.com/abaplint/transpiler.git"
10
- },
11
- "scripts": {
12
- "compile": "tsc",
13
- "publish:major": "npm --no-git-tag-version version major && rm -rf build && npm install && npm run test && npm publish --access public",
14
- "publish:minor": "npm --no-git-tag-version version minor && rm -rf build && npm install && npm run test && npm publish --access public",
15
- "publish:patch": "npm --no-git-tag-version version patch && rm -rf build && npm install && npm run test && npm publish --access public",
16
- "test": "npm run compile && mocha"
17
- },
18
- "mocha": {
19
- "recursive": true,
20
- "reporter": "progress",
21
- "spec": "build/test/**/*.js",
22
- "require": "source-map-support/register"
23
- },
24
- "keywords": [
25
- "ABAP",
26
- "abaplint"
27
- ],
28
- "author": "abaplint",
29
- "license": "MIT",
30
- "devDependencies": {
31
- "@types/chai": "^4.3.1",
32
- "@types/mocha": "^9.1.1",
33
- "chai": "^4.3.6",
34
- "mocha": "^10.0.0",
35
- "source-map-support": "^0.5.21",
36
- "typescript": "^4.7.4"
37
- }
38
- }
1
+ {
2
+ "name": "@abaplint/runtime",
3
+ "version": "2.1.10",
4
+ "description": "Transpiler - Runtime",
5
+ "main": "build/src/index.js",
6
+ "typings": "build/src/index.d.ts",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "git+https://github.com/abaplint/transpiler.git"
10
+ },
11
+ "scripts": {
12
+ "compile": "tsc",
13
+ "publish:major": "npm --no-git-tag-version version major && rm -rf build && npm install && npm run test && npm publish --access public",
14
+ "publish:minor": "npm --no-git-tag-version version minor && rm -rf build && npm install && npm run test && npm publish --access public",
15
+ "publish:patch": "npm --no-git-tag-version version patch && rm -rf build && npm install && npm run test && npm publish --access public",
16
+ "test": "npm run compile && mocha"
17
+ },
18
+ "mocha": {
19
+ "recursive": true,
20
+ "reporter": "progress",
21
+ "spec": "build/test/**/*.js",
22
+ "require": "source-map-support/register"
23
+ },
24
+ "keywords": [
25
+ "ABAP",
26
+ "abaplint"
27
+ ],
28
+ "author": "abaplint",
29
+ "license": "MIT",
30
+ "devDependencies": {
31
+ "@types/chai": "^4.3.1",
32
+ "@types/mocha": "^9.1.1",
33
+ "chai": "^4.3.6",
34
+ "mocha": "^10.0.0",
35
+ "source-map-support": "^0.5.21",
36
+ "typescript": "^4.7.4"
37
+ }
38
+ }