@abaplint/transpiler 2.7.0 → 2.7.1

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.
@@ -26,9 +26,11 @@ class SelectTranspiler {
26
26
  const packageSize = (_b = node.findFirstExpression(abaplint.Expressions.SelectLoop)) === null || _b === void 0 ? void 0 : _b.findExpressionAfterToken("SIZE");
27
27
  if (packageSize) {
28
28
  const getSize = new expressions_1.SQLSourceTranspiler().transpile(packageSize, traversal).getCode() + ".get()";
29
- ret.appendString(`if (${targetName}.array().length > ${getSize}) { throw new Error("PACKAGE SIZED loop larger than package size not supported"); };\n`);
30
- ret.appendString(`abap.statements.append({source: ${targetName}, target: ${intoName}, lines: true});\n`);
31
- ret.appendString(`{\n`);
29
+ ret.appendString(`if (${targetName}.array().length > ${getSize}) {
30
+ throw new Error("PACKAGE SIZED loop larger than package size not supported");
31
+ };
32
+ abap.statements.append({source: ${targetName}, target: ${intoName}, lines: true});
33
+ {\n`);
32
34
  }
33
35
  else if (concat.includes(" INTO CORRESPONDING FIELDS OF ")) {
34
36
  ret.appendString(`\nfor (const ${loopName} of ${targetName}.array()) {\n`);
@@ -340,10 +340,12 @@ class Traversal {
340
340
  ret += "this.me = new abap.types.ABAPObject();\n";
341
341
  ret += "this.me.set(this);\n";
342
342
  for (const a of ((_a = def.getAttributes()) === null || _a === void 0 ? void 0 : _a.getAll()) || []) {
343
+ const escaped = Traversal.escapeNamespace(a.getName().toLowerCase());
343
344
  if (a.getMeta().includes("static" /* abaplint.IdentifierMeta.Static */) === true) {
345
+ ret += "this." + escaped + " = " + cName + "." + escaped + ";\n";
344
346
  continue;
345
347
  }
346
- const name = "this." + Traversal.escapeNamespace(a.getName().toLowerCase());
348
+ const name = "this." + escaped;
347
349
  ret += name + " = " + new transpile_types_1.TranspileTypes().toType(a.getType()) + ";\n";
348
350
  ret += this.setValues(a, name);
349
351
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/transpiler",
3
- "version": "2.7.0",
3
+ "version": "2.7.1",
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.100.2",
32
+ "@abaplint/core": "^2.100.3",
33
33
  "source-map": "^0.7.4"
34
34
  },
35
35
  "devDependencies": {