@abaplint/transpiler 2.7.130 → 2.7.131

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.
@@ -47,7 +47,6 @@ class MethodImplementationTranspiler {
47
47
  const type = identifier.getType();
48
48
  if (identifier.getMeta().includes("exporting" /* abaplint.IdentifierMeta.MethodExporting */)) {
49
49
  after += `let ${varName} = ${unique}?.${varName} || ${new transpile_types_1.TranspileTypes().toType(identifier.getType())};\n`;
50
- // begin new
51
50
  }
52
51
  else if (identifier.getMeta().includes("importing" /* abaplint.IdentifierMeta.MethodImporting */)
53
52
  && parameterDefault === undefined
@@ -68,7 +67,12 @@ class MethodImplementationTranspiler {
68
67
  else {
69
68
  after += `let ${varName} = ${unique}?.${varName};\n`;
70
69
  }
71
- // end new
70
+ if (type instanceof abaplint.BasicTypes.NumericGenericType) {
71
+ after += `if (${varName}.constructor.name === "Character") {
72
+ ${varName} = ${new transpile_types_1.TranspileTypes().toType(identifier.getType())};
73
+ ${varName}.set(${unique}?.${varName});
74
+ }\n`;
75
+ }
72
76
  }
73
77
  else if (identifier.getMeta().includes("importing" /* abaplint.IdentifierMeta.MethodImporting */)
74
78
  && type.isGeneric() === false) {
@@ -18,6 +18,10 @@ class WriteTranspiler {
18
18
  if (exponent) {
19
19
  extra.push("exponent: " + traversal.traverse(exponent).getCode());
20
20
  }
21
+ const currency = node.findExpressionAfterToken("CURRENCY");
22
+ if (currency) {
23
+ extra.push("currency: " + traversal.traverse(currency).getCode());
24
+ }
21
25
  if (concat.includes("NO-GROUPING")) {
22
26
  extra.push("noGrouping: true");
23
27
  }
@@ -148,7 +148,7 @@ class TranspileTypes {
148
148
  }
149
149
  else if (type instanceof abaplint.BasicTypes.NumericGenericType) {
150
150
  resolved = "Packed";
151
- extra = "{length: 8, decimals: 0}";
151
+ extra = "{length: 8, decimals: 2}";
152
152
  }
153
153
  else if (type instanceof abaplint.BasicTypes.XStringType) {
154
154
  resolved = "XString";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/transpiler",
3
- "version": "2.7.130",
3
+ "version": "2.7.131",
4
4
  "description": "Transpiler",
5
5
  "main": "build/src/index.js",
6
6
  "typings": "build/src/index.d.ts",
@@ -29,7 +29,7 @@
29
29
  "author": "abaplint",
30
30
  "license": "MIT",
31
31
  "dependencies": {
32
- "@abaplint/core": "^2.102.69",
32
+ "@abaplint/core": "^2.103.0",
33
33
  "source-map": "^0.7.4"
34
34
  },
35
35
  "devDependencies": {